![]() |
GeNN
2.2.3
GPU enhanced Neuronal Networks (GeNN)
|
Contains functions to generate code for running the simulation on the GPU, and for I/O convenience functions between GPU and CPU space. Part of the code generation section. More...
Go to the source code of this file.
Functions | |
void | variable_def (ofstream &os, const string &type, const string &name) |
This fucntion generates host and device variable definitions, of the given type and name. More... | |
void | extern_variable_def (ofstream &os, const string &type, const string &name) |
This fucntion generates host extern variable definitions, of the given type and name. More... | |
void | genRunner (const NNmodel &model, const string &path) |
A function that generates predominantly host-side code. More... | |
void | genRunnerGPU (const NNmodel &model, const string &path) |
A function to generate the code that simulates the model on the GPU. More... | |
void | genMakefile (const NNmodel &model, const string &path) |
A function that generates the Makefile for all generated GeNN code. More... | |
Contains functions to generate code for running the simulation on the GPU, and for I/O convenience functions between GPU and CPU space. Part of the code generation section.
void extern_variable_def | ( | ofstream & | os, |
const string & | type, | ||
const string & | name | ||
) |
This fucntion generates host extern variable definitions, of the given type and name.
This fucntion generates host extern variable definitions, of the given type and name.
void genMakefile | ( | const NNmodel & | model, |
const string & | path | ||
) |
A function that generates the Makefile for all generated GeNN code.
model | Model description |
path | Path for code generation |
void genRunner | ( | const NNmodel & | model, |
const string & | path | ||
) |
A function that generates predominantly host-side code.
In this function host-side functions and other code are generated, including: Global host variables, "allocatedMem()" function for allocating memories, "freeMem" function for freeing the allocated memories, "initialize" for initializing host variables, "gFunc" and "initGRaw()" for use with plastic synapses if such synapses exist in the model.
Method for cleaning up and resetting device while quitting GeNN
model | Model description |
path | Path for code generationn |
void genRunnerGPU | ( | const NNmodel & | model, |
const string & | path | ||
) |
A function to generate the code that simulates the model on the GPU.
The function generates functions that will spawn kernel grids onto the GPU (but not the actual kernel code which is generated in "genNeuronKernel()" and "genSynpaseKernel()"). Generated functions include "copyGToDevice()", "copyGFromDevice()", "copyStateToDevice()", "copyStateFromDevice()", "copySpikesFromDevice()", "copySpikeNFromDevice()" and "stepTimeGPU()". The last mentioned function is the function that will initialize the execution on the GPU in the generated simulation engine. All other generated functions are "convenience functions" to handle data transfer from and to the GPU.
model | Model description |
path | Path for code generation |
void variable_def | ( | ofstream & | os, |
const string & | type, | ||
const string & | name | ||
) |
This fucntion generates host and device variable definitions, of the given type and name.
This fucntion generates host and device variable definitions, of the given type and name.