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

#include <customUpdate.h>

Inheritance diagram for CustomUpdateBase:
CustomUpdate CustomUpdateWU CustomUpdateInternal CustomUpdateWUInternal

Public Member Functions

 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

 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

◆ CustomUpdateBase() [1/3]

CustomUpdateBase::CustomUpdateBase ( const CustomUpdateBase )
delete

◆ CustomUpdateBase() [2/3]

CustomUpdateBase::CustomUpdateBase ( )
delete

◆ CustomUpdateBase() [3/3]

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 
)
protected

Member Function Documentation

◆ checkVarReferenceBatching()

template<typename V >
void CustomUpdateBase::checkVarReferenceBatching ( const std::vector< V > &  varRefs,
unsigned int  batchSize 
)
inlineprotected

Helper function to check if variable reference types match those specified in model.

◆ checkVarReferences()

template<typename V >
void CustomUpdateBase::checkVarReferences ( const std::vector< V > &  varRefs)
inlineprotected

Helper function to check if variable reference types match those specified in model.

◆ getCustomUpdateModel()

const CustomUpdateModels::Base* CustomUpdateBase::getCustomUpdateModel ( ) const
inline

Gets the custom update model used by this group.

◆ getDerivedParams()

const std::vector<double>& CustomUpdateBase::getDerivedParams ( ) const
inlineprotected

◆ getEGPReferences()

const std::vector<Models::EGPReference>& CustomUpdateBase::getEGPReferences ( ) const
inline

◆ getName()

const std::string& CustomUpdateBase::getName ( ) const
inline

◆ getParams()

const std::vector<double>& CustomUpdateBase::getParams ( ) const
inline

◆ getUpdateGroupName()

const std::string& CustomUpdateBase::getUpdateGroupName ( ) const
inline

◆ getVarInitialisers()

const std::vector<Models::VarInit>& CustomUpdateBase::getVarInitialisers ( ) const
inline

◆ getVarLocation() [1/2]

VarLocation CustomUpdateBase::getVarLocation ( const std::string &  varName) const

Get variable location for custom update model state variable.

◆ getVarLocation() [2/2]

VarLocation CustomUpdateBase::getVarLocation ( size_t  index) const
inline

Get variable location for custom update model state variable.

◆ getVarLocationHashDigest()

boost::uuids::detail::sha1::digest_type CustomUpdateBase::getVarLocationHashDigest ( ) const
protected

◆ initDerivedParams()

void CustomUpdateBase::initDerivedParams ( double  dt)
protected

◆ isBatched()

bool CustomUpdateBase::isBatched ( ) const
inlineprotected

Is this custom update batched i.e. run in parallel across model batches.

◆ isInitRNGRequired()

bool CustomUpdateBase::isInitRNGRequired ( ) const
protected

Does this current source group require an RNG for it's init code.

◆ isReduction()

template<typename V >
bool CustomUpdateBase::isReduction ( const std::vector< V > &  varRefs,
VarAccessDuplication  duplication 
) const
inlineprotected

◆ isVarInitRequired()

bool CustomUpdateBase::isVarInitRequired ( ) const

Is var init code required for any variables in this custom update group's custom update model?

◆ isZeroCopyEnabled()

bool CustomUpdateBase::isZeroCopyEnabled ( ) const
protected

◆ setVarLocation()

void CustomUpdateBase::setVarLocation ( const std::string &  varName,
VarLocation  loc 
)

Set location of state variable.

This is ignored for simulations on hardware with a single memory space

◆ updateHash()

void CustomUpdateBase::updateHash ( boost::uuids::detail::sha1 &  hash) const
protected

Updates hash with custom update.

NOTE: this can only be called after model is finalized

◆ updateInitHash()

void CustomUpdateBase::updateInitHash ( boost::uuids::detail::sha1 &  hash) const
protected

Updates hash with custom update.

NOTE: this can only be called after model is finalized


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