GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
global.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------
2  Author: Thomas Nowotny
3 
4  Institute: Center for Computational Neuroscience and Robotics
5  University of Sussex
6  Falmer, Brighton BN1 9QJ, UK
7 
8  email to: T.Nowotny@sussex.ac.uk
9 
10  initial version: 2010-02-07
11 
12 --------------------------------------------------------------------------*/
13 
14 //--------------------------------------------------------------------------
19 //--------------------------------------------------------------------------
20 
21 #ifndef GLOBAL_H
22 #define GLOBAL_H
23 
24 // C++ includes
25 #include <string>
26 
27 // CUDA includes
28 #ifndef CPU_ONLY
29 #include <cuda.h>
30 #include <cuda_runtime.h>
31 #endif
32 
33 // GeNN includes
34 #include "variableMode.h"
35 
36 namespace GENN_FLAGS {
37  extern const unsigned int calcSynapseDynamics;
38  extern const unsigned int calcSynapses;
39  extern const unsigned int learnSynapsesPost;
40  extern const unsigned int calcNeurons;
41 }
42 
43 namespace GENN_PREFERENCES {
44  extern bool optimiseBlockSize;
45  extern bool autoChooseDevice;
46  extern bool optimizeCode;
47  extern bool debugCode;
48  extern bool showPtxInfo;
49  extern bool buildSharedLibrary;
50  extern bool autoInitSparseVars;
51  extern bool mergePostsynapticModels;
52  extern VarMode defaultVarMode;
54  extern double asGoodAsZero;
55  extern int defaultDevice;
56  extern unsigned int preSynapseResetBlockSize;
57  extern unsigned int neuronBlockSize;
58  extern unsigned int synapseBlockSize;
59  extern unsigned int learningBlockSize;
60  extern unsigned int synapseDynamicsBlockSize;
61  extern unsigned int initBlockSize;
62  extern unsigned int initSparseBlockSize;
63  extern unsigned int autoRefractory;
64  extern std::string userCxxFlagsWIN;
65  extern std::string userCxxFlagsGNU;
66  extern std::string userNvccFlags;
67 }
68 
69 extern unsigned int neuronBlkSz;
70 extern unsigned int preSynapseResetBlkSize;
71 extern unsigned int synapseBlkSz;
72 extern unsigned int learnBlkSz;
73 extern unsigned int synDynBlkSz;
74 extern unsigned int initBlkSz;
75 extern unsigned int initSparseBlkSz;
76 
77 //extern vector<cudaDeviceProp> deviceProp; //!< Global vector containing the properties of all CUDA-enabled devices
78 //extern vector<int> synapseBlkSz; //!< Global vector containing the optimum synapse kernel block size for each device
79 //extern vector<int> learnBlkSz; //!< Global vector containing the optimum learn kernel block size for each device
80 //extern vector<int> neuronBlkSz; //!< Global vector containing the optimum neuron kernel block size for each device
81 //extern vector<int> synDynBlkSz; //!< Global vector containing the optimum synapse dynamics kernel block size for each device
82 #ifndef CPU_ONLY
83 extern cudaDeviceProp *deviceProp;
84 extern int theDevice;
85 extern int deviceCount;
86 #endif
87 extern int hostCount;
88 
89 #endif // GLOBAL_H
bool autoInitSparseVars
Previously, variables associated with sparse synapse populations were not automatically initialised...
Definition: global.cc:41
unsigned int neuronBlkSz
Global variable containing the GPU block size for the neuron kernel.
Definition: global.cc:62
unsigned int synapseBlkSz
Global variable containing the GPU block size for the synapse kernel.
Definition: global.cc:63
bool autoChooseDevice
Flag to signal whether the GPU device should be chosen automatically.
Definition: global.cc:36
unsigned int initSparseBlkSz
Global variable containing the GPU block size for the sparse initialization kernel.
Definition: global.cc:67
const unsigned int calcSynapses
Definition: global.cc:29
Definition: global.h:43
int defaultDevice
Definition: global.cc:46
const unsigned int calcSynapseDynamics
Definition: global.cc:28
const unsigned int calcNeurons
Definition: global.cc:31
unsigned int autoRefractory
Flag for signalling whether spikes are only reported if thresholdCondition changes from false to true...
Definition: global.cc:54
unsigned int initSparseBlockSize
Definition: global.cc:53
cudaDeviceProp * deviceProp
Definition: global.cc:75
int hostCount
Global variable containing the number of hosts within the local compute cluster.
Definition: global.cc:79
std::string userCxxFlagsGNU
Allows users to set specific C++ compiler options they may want to use for all host side code (used f...
Definition: global.cc:56
std::string userCxxFlagsWIN
Allows users to set specific C++ compiler options they may want to use for all host side code (used f...
Definition: global.cc:55
bool optimizeCode
Request speed-optimized code, at the expense of floating-point accuracy.
Definition: global.cc:37
VarMode
Definition: variableMode.h:25
Definition: global.h:36
bool showPtxInfo
Request that PTX assembler information be displayed for each CUDA kernel during compilation.
Definition: global.cc:39
bool optimiseBlockSize
Flag for signalling whether or not block size optimisation should be performed.
Definition: global.cc:35
double asGoodAsZero
What is the default behaviour for sparse synaptic connectivity? Historically, everything was allocate...
Definition: global.cc:45
unsigned int initBlockSize
Definition: global.cc:52
unsigned int preSynapseResetBlockSize
default GPU device; used to determine which GPU to use if chooseDevice is 0 (off) ...
Definition: global.cc:47
unsigned int synapseDynamicsBlockSize
Definition: global.cc:51
unsigned int initBlkSz
Global variable containing the GPU block size for the initialization kernel.
Definition: global.cc:66
int deviceCount
Global variable containing the number of CUDA devices on this host.
Definition: global.cc:77
VarMode defaultVarMode
What is the default behaviour for model state variables? Historically, everything was allocated on bo...
Definition: global.cc:43
unsigned int synDynBlkSz
Global variable containing the GPU block size for the synapse dynamics kernel.
Definition: global.cc:65
const unsigned int learnSynapsesPost
Definition: global.cc:30
int theDevice
Global variable containing the currently selected CUDA device&#39;s number.
Definition: global.cc:76
bool debugCode
Request debug data to be embedded in the generated code.
Definition: global.cc:38
unsigned int synapseBlockSize
Definition: global.cc:49
VarMode defaultSparseConnectivityMode
Definition: global.cc:44
unsigned int preSynapseResetBlkSize
Global variable containing the GPU block size for the reset kernel run before the synapse kernel...
Definition: global.cc:58
bool buildSharedLibrary
Should generated code and Makefile build into a shared library e.g. for use in SpineML simulator...
Definition: global.cc:40
unsigned int learningBlockSize
Definition: global.cc:50
unsigned int neuronBlockSize
Definition: global.cc:48
unsigned int learnBlkSz
Global variable containing the GPU block size for the learn kernel.
Definition: global.cc:64
std::string userNvccFlags
Allows users to set specific nvcc compiler options they may want to use for all GPU code (identical f...
Definition: global.cc:57
bool mergePostsynapticModels
Should compatible postsynaptic models and dendritic delay buffers be merged? This can significantly r...
Definition: global.cc:42