GeNN  1.1
GPU enhanced Neuronal Networks (GeNN)
 All Classes Files Functions Variables Typedefs Macros Pages
generateALL.cc File Reference
#include "global.h"
#include "currentModel.cc"
#include "generateKernels.cc"
#include "generateRunner.cc"
#include "generateCPU.cc"
#include <sys/stat.h>

Functions

void generate_model_runner (NNmodel &model, string path)
 This function will call the necessary sub-functions to generate the code for simulating a model. More...
 
int chooseDevice (ostream &mos, NNmodel *&model, string path)
 Helper function that prepares data structures and detects the hardware properties to enable the code generation code that follows. More...
 
int main (int argc, char *argv[])
 

Function Documentation

int chooseDevice ( ostream &  mos,
NNmodel *&  model,
string  path 
)

Helper function that prepares data structures and detects the hardware properties to enable the code generation code that follows.

The main tasks in this function are the detection and characterization of the GPU device present (if any), choosing which GPU device to use, finding and appropriate block size, taking note of the major and minor version of the CUDA enabled device chosen for use, and populating the list of standard neuron models. The chosen device number is returned.

Main entry point for the generateALL executable that generates the code for GPU and CPU.

The main function is the entry point for the code generation engine. It prepares the system and then invokes generate_model_runner to inititate the different parts of actual code generation.

Parameters
mosoutput stream for messages
modelthe nn model we are generating code for
pathpath the generated code will be deposited
void generate_model_runner ( NNmodel model,
string  path 
)

This function will call the necessary sub-functions to generate the code for simulating a model.

Parameters
modelModel description
pathPath where the generated code will be deposited
int main ( int  argc,
char *  argv[] 
)
Parameters
argcnumber of arguments; expected to be 2
argvArguments; expected to contain the target directory for code generation.