GeNN
4.9.0
GPU enhanced Neuronal Networks (GeNN)
|
This is the complete list of members for InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement, including all inherited members.
CalcKernelSizeFunc typedef | InitSparseConnectivitySnippet::Base | |
CalcMaxLengthFunc typedef | InitSparseConnectivitySnippet::Base | |
DECLARE_SNIPPET(InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement, 1) | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | |
DerivedParamVec typedef | Snippet::Base | |
EGPVec typedef | Snippet::Base | |
getCalcKernelSizeFunc() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getCalcMaxColLengthFunc() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getCalcMaxRowLengthFunc() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getColBuildCode() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getColBuildStateVars() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getDerivedParams() const | Snippet::Base | inlinevirtual |
getExtraGlobalParamIndex(const std::string ¶mName) const | Snippet::Base | inline |
getExtraGlobalParams() const override | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | inlinevirtual |
getHashDigest() const | InitSparseConnectivitySnippet::Base | |
getHostInitCode() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getNamedVecIndex(const std::string &name, const std::vector< T > &vec) | Snippet::Base | inlineprotectedstatic |
getParamNames() const override | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | inlinevirtual |
getRowBuildCode() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
getRowBuildStateVars() const | InitSparseConnectivitySnippet::Base | inlinevirtual |
ParamValVec typedef | Snippet::Base | |
SET_CALC_MAX_COL_LENGTH_FUNC([](unsigned int numPre, unsigned int numPost, const std::vector< double > &pars) { const double quantile=pow(0.9999, 1.0/(double) numPost);return binomialInverseCDF(quantile,(unsigned int) pars[0],(double) numPre/((double) numPre *(double) numPost));}) | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | |
SET_CALC_MAX_ROW_LENGTH_FUNC([](unsigned int numPre, unsigned int numPost, const std::vector< double > &pars) { const double quantile=pow(0.9999, 1.0/(double) numPre);return binomialInverseCDF(quantile,(unsigned int) pars[0],(double) numPost/((double) numPre *(double) numPost));}) | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | |
SET_HOST_INIT_CODE("// Allocate pre-calculated row length array\ "$(allocatepreCalcRowLength, $(num_pre) *$(num_threads));\" "//Calculate row lengths\" "const size_t numPostPerThread=($(num_post)+$(num_threads) - 1)/$(num_threads);\" "const size_t leftOverNeurons=$(num_post) % numPostPerThread;\" "size_t remainingConnections=$(total);\" "size_t matrixSize=(size_t)$(num_pre) *(size_t)$(num_post);\" "uint16_t *subRowLengths=$(preCalcRowLength);\" "//Loop through rows\" "for(size_t i=0;i< $(num_pre);i++) {\" " const bool lastPre=(i==($(num_pre) - 1));\" "//Loop through subrows\" " for(size_t j=0;j< $(num_threads);j++) {\" " const bool lastSubRow=(j==($(num_threads) - 1));\" "//If this isn 't the last sub-row of the matrix\" " if(!lastPre||! lastSubRow) {\" "//Get length of this subrow\" " const unsigned int numSubRowNeurons=(leftOverNeurons !=0 &&lastSubRow) ? leftOverNeurons :numPostPerThread;\" "//Calculate probability\" " const double probability=(double) numSubRowNeurons/(double) matrixSize;\" "//Create distribution to sample row length\" " std::binomial_distribution< size_t > rowLengthDist(remainingConnections, probability);\" "//Sample row length;\" " const size_t subRowLength=rowLengthDist($(rng));\" "//Update counters\" " remainingConnections -=subRowLength;\" " matrixSize -=numSubRowNeurons;\" "//Add row length to array\" " assert(subRowLength< std::numeric_limits< uint16_t >::max());\" " *subRowLengths++=(uint16_t) subRowLength;\" " }\" " }\" "}\" "//Insert remaining connections into last sub-row\" " *subRowLengths=(uint16_t) remainingConnections;\" "//Push populated row length array\" "$(pushpreCalcRowLength, $(num_pre) *$(num_threads));\") | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | |
SET_ROW_BUILD_CODE("if(c == 0) {\ " $(endRow);\" "}\" "const scalar u=$(gennrand_uniform);\" "x+=(1.0 - x) *(1.0 - pow(u, 1.0/(scalar) c));\" "unsigned int postIdx=(unsigned int)(x *$(num_post));\" "postIdx=(postIdx< $(num_post)) ? postIdx :($(num_post) - 1);\" "$(addSynapse, postIdx+$(id_post_begin));\" "c--;\") | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | |
SET_ROW_BUILD_STATE_VARS({{"x", "scalar", 0.0},{"c", "unsigned int", "$(preCalcRowLength)[($(id_pre) * $(num_threads)) + $(id_thread)]"}}) | InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement | |
StringVec typedef | Snippet::Base | |
updateHash(boost::uuids::detail::sha1 &hash) const | Snippet::Base | inlineprotected |
validate() const | InitSparseConnectivitySnippet::Base | |
~Base() | Snippet::Base | inlinevirtual |