GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
CodeGenerator::Substitutions Class Reference

#include <substitutions.h>

Classes

struct  FunctionTemplate
 

Public Member Functions

 Substitutions (const Substitutions *parent=nullptr)
 
 Substitutions (const std::vector< FunctionTemplate > &functions)
 
template<typename T >
void addVarNameSubstitution (const std::vector< T > &variables, const std::string &sourceSuffix="", const std::string &destPrefix="", const std::string &destSuffix="")
 
template<typename T , typename S >
void addVarNameSubstitution (const std::vector< T > &variables, const std::string &sourceSuffix, const std::string &destPrefix, S getDestSuffixFn)
 
template<typename T >
void addVarValueSubstitution (const std::vector< T > &variables, const std::vector< double > &values, const std::string &sourceSuffix="")
 
void addParamValueSubstitution (const std::vector< std::string > &paramNames, const std::vector< double > &values, const std::string &sourceSuffix="")
 
template<typename G >
void addParamValueSubstitution (const std::vector< std::string > &paramNames, const std::vector< double > &values, G isHeterogeneousFn, const std::string &sourceSuffix="", const std::string &destPrefix="", const std::string &destSuffix="")
 
template<typename T , typename G >
void addVarValueSubstitution (const std::vector< T > &variables, const std::vector< double > &values, G isHeterogeneousFn, const std::string &sourceSuffix="", const std::string &destPrefix="", const std::string &destSuffix="")
 
void addVarSubstitution (const std::string &source, const std::string &destionation, bool allowOverride=false)
 
void addFuncSubstitution (const std::string &source, unsigned int numArguments, const std::string &funcTemplate, bool allowOverride=false)
 
bool hasVarSubstitution (const std::string &source) const
 
const std::string & getVarSubstitution (const std::string &source) const
 
void apply (std::string &code) const
 
void applyCheckUnreplaced (std::string &code, const std::string &context) const
 
const std::string operator[] (const std::string &source) const
 

Constructor & Destructor Documentation

◆ Substitutions() [1/2]

CodeGenerator::Substitutions::Substitutions ( const Substitutions parent = nullptr)
inline

◆ Substitutions() [2/2]

CodeGenerator::Substitutions::Substitutions ( const std::vector< FunctionTemplate > &  functions)
inline

Member Function Documentation

◆ addFuncSubstitution()

void CodeGenerator::Substitutions::addFuncSubstitution ( const std::string &  source,
unsigned int  numArguments,
const std::string &  funcTemplate,
bool  allowOverride = false 
)

◆ addParamValueSubstitution() [1/2]

void CodeGenerator::Substitutions::addParamValueSubstitution ( const std::vector< std::string > &  paramNames,
const std::vector< double > &  values,
const std::string &  sourceSuffix = "" 
)

◆ addParamValueSubstitution() [2/2]

template<typename G >
void CodeGenerator::Substitutions::addParamValueSubstitution ( const std::vector< std::string > &  paramNames,
const std::vector< double > &  values,
isHeterogeneousFn,
const std::string &  sourceSuffix = "",
const std::string &  destPrefix = "",
const std::string &  destSuffix = "" 
)
inline

◆ addVarNameSubstitution() [1/2]

template<typename T >
void CodeGenerator::Substitutions::addVarNameSubstitution ( const std::vector< T > &  variables,
const std::string &  sourceSuffix = "",
const std::string &  destPrefix = "",
const std::string &  destSuffix = "" 
)
inline

◆ addVarNameSubstitution() [2/2]

template<typename T , typename S >
void CodeGenerator::Substitutions::addVarNameSubstitution ( const std::vector< T > &  variables,
const std::string &  sourceSuffix,
const std::string &  destPrefix,
getDestSuffixFn 
)
inline

◆ addVarSubstitution()

void CodeGenerator::Substitutions::addVarSubstitution ( const std::string &  source,
const std::string &  destionation,
bool  allowOverride = false 
)

◆ addVarValueSubstitution() [1/2]

template<typename T >
void CodeGenerator::Substitutions::addVarValueSubstitution ( const std::vector< T > &  variables,
const std::vector< double > &  values,
const std::string &  sourceSuffix = "" 
)
inline

◆ addVarValueSubstitution() [2/2]

template<typename T , typename G >
void CodeGenerator::Substitutions::addVarValueSubstitution ( const std::vector< T > &  variables,
const std::vector< double > &  values,
isHeterogeneousFn,
const std::string &  sourceSuffix = "",
const std::string &  destPrefix = "",
const std::string &  destSuffix = "" 
)
inline

◆ apply()

void CodeGenerator::Substitutions::apply ( std::string &  code) const

◆ applyCheckUnreplaced()

void CodeGenerator::Substitutions::applyCheckUnreplaced ( std::string &  code,
const std::string &  context 
) const

◆ getVarSubstitution()

const std::string & CodeGenerator::Substitutions::getVarSubstitution ( const std::string &  source) const

◆ hasVarSubstitution()

bool CodeGenerator::Substitutions::hasVarSubstitution ( const std::string &  source) const

◆ operator[]()

const std::string CodeGenerator::Substitutions::operator[] ( const std::string &  source) const
inline

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