GeNN  1.1
GPU enhanced Neuronal Networks (GeNN)
 All Classes Files Functions Variables Typedefs Macros Pages
generateKernels.cc File Reference

Contains functions that generate code for CUDA kernels. Part of the code generation section. More...

#include <string>
#include "global.h"
#include "CodeHelper.cc"

Functions

void genNeuronKernel (NNmodel &model, string &path, ostream &mos)
 
void genSynapseKernel (NNmodel &model, string &path, ostream &mos)
 Function for generating a CUDA kernel for simulating all synapses. More...
 

Variables

unsigned int nt
 Function for generating the CUDA kernel that simulates all neurons in the model. More...
 
short * isGrpVarNeeded
 
CodeHelper hlp
 

Detailed Description

Contains functions that generate code for CUDA kernels. Part of the code generation section.

Function Documentation

void genNeuronKernel ( NNmodel model,
string &  path,
ostream &  mos 
)

Binary flag for the sparse synapses to use atomic operations when the number of connections is bigger than the block size, and shared variables otherwise

Parameters
modelModel description
pathpath for code output
mosoutput stream for messages
void genSynapseKernel ( NNmodel model,
string &  path,
ostream &  mos 
)

Function for generating a CUDA kernel for simulating all synapses.

This functions generates code for global variables on the GPU side that are synapse-related and the actual CUDA kernel for simulating one time step of the synapses.

TODO: shouldn't that be something equivalent to Epost???

Parameters
modelModel description
pathPath for code output
mosoutput stream for messages

Variable Documentation

short* isGrpVarNeeded
unsigned int nt

Function for generating the CUDA kernel that simulates all neurons in the model.

The code generated upon execution of this function is for defining GPU side global variables that will hold model state in the GPU global memory and for the actual kernel function for simulating the neurons for one time step.