GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
generateKernels.h File Reference

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

#include "modelSpec.h"
#include <string>
#include <fstream>

Go to the source code of this file.

Functions

void genNeuronKernel (const NNmodel &model, const string &path)
 Function for generating the CUDA kernel that simulates all neurons in the model. More...
 
void genSynapseKernel (const NNmodel &model, const string &path, int localHostID)
 Function for generating a CUDA kernel for simulating all synapses. More...
 

Detailed Description

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

Function Documentation

◆ genNeuronKernel()

void genNeuronKernel ( const NNmodel model,
const string &  path 
)

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.Path for code generation

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.

Parameters
modelModel description
pathPath for code generation

◆ genSynapseKernel()

void genSynapseKernel ( const NNmodel model,
const string &  path,
int  localHostID 
)

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.ID of local host

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.

< "id" if first synapse group, else "lid". lid =(thread index- last thread of the last synapse group)

Parameters
modelModel description
pathPath for code generation
localHostIDID of local host