GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
generate_swig_interfaces Namespace Reference

Classes

class  CppBlockScope
 
class  SwigAsIsScope
 
class  SwigExtendScope
 
class  SwigInitScope
 
class  SwigInlineScope
 
class  SwigModuleGenerator
 A helper class for generating SWIG interface files. More...
 

Functions

def writeValueMakerFunc (modelName, valueName, numValues, mg)
 Generates a helper make*Values function and writes it. More...
 
def generateCustomClassDeclaration (nSpace, initVarSnippet=False, weightUpdateModel=False)
 Generates nSpace::Custom class declaration string. More...
 
def generateNumpyApplyArgoutviewArray1D (dataType, varName, sizeName)
 Generates a line which applies numpy ARGOUTVIEW_ARRAY1 typemap to variable. More...
 
def generateNumpyApplyInArray1D (dataType, varName, sizeName)
 Generates a line which applies numpy IN_ARRAY1 typemap to variable. More...
 
def generateBuiltInGetter (models)
 
def generateSharedLibraryModelInterface (swigPath)
 Generates SharedLibraryModel.i file. More...
 
def generateStlContainersInterface (swigPath)
 Generates StlContainers interface which wraps std::string, std::pair, std::vector, std::function and creates template specializations for pairs and vectors. More...
 
def generateCustomModelDeclImpls (swigPath)
 Generates headers/sources with *::Custom classes. More...
 
def generateConfigs (gennPath)
 

Variables

string NEURONMODELS = 'newNeuronModels'
 
string POSTSYNMODELS = 'newPostsynapticModels'
 
string WUPDATEMODELS = 'newWeightUpdateModels'
 
string CURRSOURCEMODELS = 'currentSourceModels'
 
string INITVARSNIPPET = 'initVarSnippet'
 
string SPARSEINITSNIPPET = 'initSparseConnectivitySnippet'
 
string NNMODEL = 'modelSpec'
 
string MAIN_MODULE = 'genn_wrapper'
 
 parser = ArgumentParser( description='Generate SWIG interfaces' )
 
 type
 
 str
 
 help
 
 gennPath = parser.parse_args().genn_path
 
 includePath = os.path.join( gennPath, 'lib', 'include' )
 

Function Documentation

◆ generateBuiltInGetter()

def generate_swig_interfaces.generateBuiltInGetter (   models)

◆ generateConfigs()

def generate_swig_interfaces.generateConfigs (   gennPath)

◆ generateCustomClassDeclaration()

def generate_swig_interfaces.generateCustomClassDeclaration (   nSpace,
  initVarSnippet = False,
  weightUpdateModel = False 
)

Generates nSpace::Custom class declaration string.

◆ generateCustomModelDeclImpls()

def generate_swig_interfaces.generateCustomModelDeclImpls (   swigPath)

Generates headers/sources with *::Custom classes.

◆ generateNumpyApplyArgoutviewArray1D()

def generate_swig_interfaces.generateNumpyApplyArgoutviewArray1D (   dataType,
  varName,
  sizeName 
)

Generates a line which applies numpy ARGOUTVIEW_ARRAY1 typemap to variable.

ARGOUTVIEW_ARRAY1 gives access to C array via numpy array.

◆ generateNumpyApplyInArray1D()

def generate_swig_interfaces.generateNumpyApplyInArray1D (   dataType,
  varName,
  sizeName 
)

Generates a line which applies numpy IN_ARRAY1 typemap to variable.

IN_ARRAY1 is used to pass a numpy array as C array to C code

◆ generateSharedLibraryModelInterface()

def generate_swig_interfaces.generateSharedLibraryModelInterface (   swigPath)

Generates SharedLibraryModel.i file.

◆ generateStlContainersInterface()

def generate_swig_interfaces.generateStlContainersInterface (   swigPath)

Generates StlContainers interface which wraps std::string, std::pair, std::vector, std::function and creates template specializations for pairs and vectors.

◆ writeValueMakerFunc()

def generate_swig_interfaces.writeValueMakerFunc (   modelName,
  valueName,
  numValues,
  mg 
)

Generates a helper make*Values function and writes it.

Variable Documentation

◆ CURRSOURCEMODELS

string generate_swig_interfaces.CURRSOURCEMODELS = 'currentSourceModels'

◆ gennPath

generate_swig_interfaces.gennPath = parser.parse_args().genn_path

◆ help

generate_swig_interfaces.help

◆ includePath

generate_swig_interfaces.includePath = os.path.join( gennPath, 'lib', 'include' )

◆ INITVARSNIPPET

string generate_swig_interfaces.INITVARSNIPPET = 'initVarSnippet'

◆ MAIN_MODULE

string generate_swig_interfaces.MAIN_MODULE = 'genn_wrapper'

◆ NEURONMODELS

string generate_swig_interfaces.NEURONMODELS = 'newNeuronModels'

◆ NNMODEL

string generate_swig_interfaces.NNMODEL = 'modelSpec'

◆ parser

generate_swig_interfaces.parser = ArgumentParser( description='Generate SWIG interfaces' )

◆ POSTSYNMODELS

string generate_swig_interfaces.POSTSYNMODELS = 'newPostsynapticModels'

◆ SPARSEINITSNIPPET

string generate_swig_interfaces.SPARSEINITSNIPPET = 'initSparseConnectivitySnippet'

◆ str

generate_swig_interfaces.str

◆ type

generate_swig_interfaces.type

◆ WUPDATEMODELS

string generate_swig_interfaces.WUPDATEMODELS = 'newWeightUpdateModels'