GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
CustomUpdate Class Reference

#include <customUpdate.h>

Inheritance diagram for CustomUpdate:
CustomUpdateBase CustomUpdateInternal

Public Member Functions

const std::vector< Models::VarReference > & getVarReferences () const
 
unsigned int getSize () const
 
- Public Member Functions inherited from CustomUpdateBase
 CustomUpdateBase (const CustomUpdateBase &)=delete
 
 CustomUpdateBase ()=delete
 
void setVarLocation (const std::string &varName, VarLocation loc)
 Set location of state variable. More...
 
const std::string & getName () const
 
const std::string & getUpdateGroupName () const
 
const CustomUpdateModels::BasegetCustomUpdateModel () const
 Gets the custom update model used by this group. More...
 
const std::vector< double > & getParams () const
 
const std::vector< Models::VarInit > & getVarInitialisers () const
 
const std::vector< Models::EGPReference > & getEGPReferences () const
 
VarLocation getVarLocation (const std::string &varName) const
 Get variable location for custom update model state variable. More...
 
VarLocation getVarLocation (size_t index) const
 Get variable location for custom update model state variable. More...
 
bool isVarInitRequired () const
 Is var init code required for any variables in this custom update group's custom update model? More...
 

Protected Member Functions

 CustomUpdate (const std::string &name, const std::string &updateGroupName, const CustomUpdateModels::Base *customUpdateModel, const std::vector< double > &params, const std::vector< Models::VarInit > &varInitialisers, const std::vector< Models::VarReference > &varReferences, const std::vector< Models::EGPReference > &egpReferences, VarLocation defaultVarLocation, VarLocation defaultExtraGlobalParamLocation)
 
void finalize (unsigned int batchSize)
 
bool isBatchReduction () const
 
bool isNeuronReduction () const
 
bool isPerNeuron () const
 
boost::uuids::detail::sha1::digest_type getHashDigest () const
 Updates hash with custom update. More...
 
boost::uuids::detail::sha1::digest_type getInitHashDigest () const
 Updates hash with custom update. More...
 
const NeuronGroupgetDelayNeuronGroup () const
 
- Protected Member Functions inherited from CustomUpdateBase
 CustomUpdateBase (const std::string &name, const std::string &updateGroupName, const CustomUpdateModels::Base *customUpdateModel, const std::vector< double > &params, const std::vector< Models::VarInit > &varInitialisers, const std::vector< Models::EGPReference > &egpReferences, VarLocation defaultVarLocation, VarLocation defaultExtraGlobalParamLocation)
 
void initDerivedParams (double dt)
 
const std::vector< double > & getDerivedParams () const
 
bool isInitRNGRequired () const
 Does this current source group require an RNG for it's init code. More...
 
bool isZeroCopyEnabled () const
 
bool isBatched () const
 Is this custom update batched i.e. run in parallel across model batches. More...
 
void updateHash (boost::uuids::detail::sha1 &hash) const
 Updates hash with custom update. More...
 
void updateInitHash (boost::uuids::detail::sha1 &hash) const
 Updates hash with custom update. More...
 
boost::uuids::detail::sha1::digest_type getVarLocationHashDigest () const
 
template<typename V >
bool isReduction (const std::vector< V > &varRefs, VarAccessDuplication duplication) const
 
template<typename V >
void checkVarReferences (const std::vector< V > &varRefs)
 Helper function to check if variable reference types match those specified in model. More...
 
template<typename V >
void checkVarReferenceBatching (const std::vector< V > &varRefs, unsigned int batchSize)
 Helper function to check if variable reference types match those specified in model. More...
 

Constructor & Destructor Documentation

◆ CustomUpdate()

CustomUpdate::CustomUpdate ( const std::string &  name,
const std::string &  updateGroupName,
const CustomUpdateModels::Base customUpdateModel,
const std::vector< double > &  params,
const std::vector< Models::VarInit > &  varInitialisers,
const std::vector< Models::VarReference > &  varReferences,
const std::vector< Models::EGPReference > &  egpReferences,
VarLocation  defaultVarLocation,
VarLocation  defaultExtraGlobalParamLocation 
)
protected

Member Function Documentation

◆ finalize()

void CustomUpdate::finalize ( unsigned int  batchSize)
protected

◆ getDelayNeuronGroup()

const NeuronGroup* CustomUpdate::getDelayNeuronGroup ( ) const
inlineprotected

◆ getHashDigest()

boost::uuids::detail::sha1::digest_type CustomUpdate::getHashDigest ( ) const
protected

Updates hash with custom update.

NOTE: this can only be called after model is finalized

◆ getInitHashDigest()

boost::uuids::detail::sha1::digest_type CustomUpdate::getInitHashDigest ( ) const
protected

Updates hash with custom update.

NOTE: this can only be called after model is finalized

◆ getSize()

unsigned int CustomUpdate::getSize ( ) const
inline

◆ getVarReferences()

const std::vector<Models::VarReference>& CustomUpdate::getVarReferences ( ) const
inline

◆ isBatchReduction()

bool CustomUpdate::isBatchReduction ( ) const
inlineprotected

◆ isNeuronReduction()

bool CustomUpdate::isNeuronReduction ( ) const
inlineprotected

◆ isPerNeuron()

bool CustomUpdate::isPerNeuron ( ) const
inlineprotected

The documentation for this class was generated from the following files: