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

This file contains standard utility functions provide within the NVIDIA CUDA software development toolkit (SDK). The remainder of the file contains a function that defines the standard neuron models. More...

#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <memory>
#include <fstream>
#include <cmath>
#include <cuda_runtime.h>
#include "modelSpec.h"
#include "toString.h"
#include "extra_neurons.h"
#include "extra_postsynapses.h"
#include "numlib/simpleBit.h"

Go to the source code of this file.

Classes

class  rulkovdp
 Class defining the dependent parameters of teh Rulkov map neuron. More...
 
class  expDecayDp
 Class defining the dependent parameter for exponential decay. More...
 

Macros

#define _UTILS_H_
 macro for avoiding multiple inclusion during compilation More...
 
#define CHECK_CUDA_ERRORS(call)
 

Functions

void writeHeader (ostream &os)
 
void substitute (string &s, const string trg, const string rep)
 Tool for substituting strings in the neuron code strings or other templates. More...
 
bool find (string &s, const string trg)
 Tool for finding strings in another string. More...
 
unsigned int theSize (string type)
 Tool for determining the size of variable types on the current architecture. More...
 
void prepareStandardModels ()
 Function that defines standard neuron models. More...
 
void preparePostSynModels ()
 
void prepareSynapseModels ()
 

Variables

vector< neuronModelnModels
 Global c++ vector containing all neuron model descriptions. More...
 
vector< postSynModelpostSynModels
 

Detailed Description

This file contains standard utility functions provide within the NVIDIA CUDA software development toolkit (SDK). The remainder of the file contains a function that defines the standard neuron models.

Macro Definition Documentation

#define _UTILS_H_

macro for avoiding multiple inclusion during compilation

#define CHECK_CUDA_ERRORS (   call)
Value:
{ \
cudaError_t error = call; \
if (error != cudaSuccess) \
{ \
fprintf(stderr, "%s: %i: cuda error %i: %s\n", \
__FILE__, __LINE__, (int)error, cudaGetErrorString(error)); \
exit(EXIT_FAILURE); \
} \
}

Function Documentation

bool find ( string &  s,
const string  trg 
)

Tool for finding strings in another string.

void preparePostSynModels ( )
void prepareStandardModels ( )

Function that defines standard neuron models.

The neuron models are defined and added to the C++ vector nModels that is holding all neuron model descriptions. User defined neuron models can be appended to this vector later in (a) separate function(s).

void prepareSynapseModels ( )
void substitute ( string &  s,
const string  trg,
const string  rep 
)

Tool for substituting strings in the neuron code strings or other templates.

unsigned int theSize ( string  type)

Tool for determining the size of variable types on the current architecture.

void writeHeader ( ostream &  os)

Variable Documentation

vector<neuronModel> nModels

Global c++ vector containing all neuron model descriptions.

vector<postSynModel> postSynModels