![]()  | 
  
    GeNN
    2.2.3
    
   GPU enhanced Neuronal Networks (GeNN) 
   | 
 
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 <iostream>#include <string>#include <cuda.h>#include <cuda_runtime.h>Go to the source code of this file.
Macros | |
| #define | _UTILS_H_ | 
| macro for avoiding multiple inclusion during compilation  More... | |
| #define | CHECK_CU_ERRORS(call) call | 
| Macros for catching errors returned by the CUDA driver and runtime APIs.  More... | |
| #define | CHECK_CUDA_ERRORS(call) | 
| #define | B(x, i) ((x) & (0x80000000 >> (i))) | 
| Bit tool macros.  More... | |
| #define | setB(x, i) x= ((x) | (0x80000000 >> (i))) | 
| Set the bit at the specified position i in x to 1.  More... | |
| #define | delB(x, i) x= ((x) & (~(0x80000000 >> (i)))) | 
| Set the bit at the specified position i in x to 0.  More... | |
Functions | |
| CUresult | cudaFuncGetAttributesDriver (cudaFuncAttributes *attr, CUfunction kern) | 
| Function for getting the capabilities of a CUDA device via the driver API.  More... | |
| void | gennError (string error) | 
| Function called upon the detection of an error. Outputs an error message and then exits.  More... | |
| unsigned int | theSize (string type) | 
| Tool for determining the size of variable types on the current architecture.  More... | |
| void | writeHeader (ostream &os) | 
| Function to write the comment header denoting file authorship and contact details into the generated code.  More... | |
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.
| #define _UTILS_H_ | 
macro for avoiding multiple inclusion during compilation
| #define B | ( | x, | |
| i | |||
| ) | ((x) & (0x80000000 >> (i))) | 
Bit tool macros.
Extract the bit at the specified position i from x
| #define CHECK_CU_ERRORS | ( | call | ) | call | 
Macros for catching errors returned by the CUDA driver and runtime APIs.
| #define CHECK_CUDA_ERRORS | ( | call | ) | 
| #define delB | ( | x, | |
| i | |||
| ) | x= ((x) & (~(0x80000000 >> (i)))) | 
Set the bit at the specified position i in x to 0.
| #define setB | ( | x, | |
| i | |||
| ) | x= ((x) | (0x80000000 >> (i))) | 
Set the bit at the specified position i in x to 1.
| CUresult cudaFuncGetAttributesDriver | ( | cudaFuncAttributes * | attr, | 
| CUfunction | kern | ||
| ) | 
Function for getting the capabilities of a CUDA device via the driver API.
| void gennError | ( | string | error | ) | 
Function called upon the detection of an error. Outputs an error message and then exits.
| unsigned int theSize | ( | string | type | ) | 
Tool for determining the size of variable types on the current architecture.
| void writeHeader | ( | ostream & | os | ) | 
Function to write the comment header denoting file authorship and contact details into the generated code.