GeNN  2.2.3
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 #ifndef CPU_ONLY
25 #include <cuda.h>
26 #include <cuda_runtime.h>
27 #endif
28 #include <string>
29 
30 namespace GENN_FLAGS {
31  extern unsigned int calcSynapseDynamics;
32  extern unsigned int calcSynapses;
33  extern unsigned int learnSynapsesPost;
34  extern unsigned int calcNeurons;
35 };
36 
37 namespace GENN_PREFERENCES {
38  extern int optimiseBlockSize;
39  extern int autoChooseDevice;
40  extern bool optimizeCode;
41  extern bool debugCode;
42  extern bool showPtxInfo;
43  extern double asGoodAsZero;
44  extern int defaultDevice;
45  extern unsigned int neuronBlockSize;
46  extern unsigned int synapseBlockSize;
47  extern unsigned int learningBlockSize;
48  extern unsigned int synapseDynamicsBlockSize;
49  extern unsigned int autoRefractory;
50  extern std::string userCxxFlagsWIN;
51  extern std::string userCxxFlagsGNU;
52  extern std::string userNvccFlags;
53 };
54 
55 extern int neuronBlkSz;
56 extern int synapseBlkSz;
57 extern int learnBlkSz;
58 extern int synDynBlkSz;
59 //extern vector<cudaDeviceProp> deviceProp; //!< Global vector containing the properties of all CUDA-enabled devices
60 //extern vector<int> synapseBlkSz; //!< Global vector containing the optimum synapse kernel block size for each device
61 //extern vector<int> learnBlkSz; //!< Global vector containing the optimum learn kernel block size for each device
62 //extern vector<int> neuronBlkSz; //!< Global vector containing the optimum neuron kernel block size for each device
63 //extern vector<int> synDynBlkSz; //!< Global vector containing the optimum synapse dynamics kernel block size for each device
64 #ifndef CPU_ONLY
65 extern cudaDeviceProp *deviceProp;
66 extern int theDevice;
67 extern int deviceCount;
68 #endif
69 extern int hostCount;
70 
71 #endif // GLOBAL_H
72 
73 #define TRUE true
74 #define FALSE false
int autoChooseDevice
Flag to signal whether the GPU device should be chosen automatically.
Definition: global.cc:36
Definition: global.h:37
int defaultDevice
Definition: global.cc:41
unsigned int autoRefractory
Flag for signalling whether spikes are only reported if thresholdCondition changes from false to true...
Definition: global.cc:46
cudaDeviceProp * deviceProp
Definition: global.cc:63
int hostCount
Global variable containing the number of hosts within the local compute cluster.
Definition: global.cc:67
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:48
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:47
int synDynBlkSz
Global variable containing the GPU block size for the synapse dynamics kernel.
Definition: global.cc:56
bool optimizeCode
Request speed-optimized code, at the expense of floating-point accuracy.
Definition: global.cc:37
Definition: global.h:30
bool showPtxInfo
Request that PTX assembler information be displayed for each CUDA kernel during compilation.
Definition: global.cc:39
double asGoodAsZero
Global variable that is used when detecting close to zero values, for example when setting sparse con...
Definition: global.cc:40
unsigned int synapseDynamicsBlockSize
Definition: global.cc:45
unsigned int calcNeurons
Definition: global.cc:31
int deviceCount
Global variable containing the number of CUDA devices on this host.
Definition: global.cc:65
int optimiseBlockSize
Flag for signalling whether or not block size optimisation should be performed.
Definition: global.cc:35
int theDevice
Global variable containing the currently selected CUDA device&#39;s number.
Definition: global.cc:64
bool debugCode
Request debug data to be embedded in the generated code.
Definition: global.cc:38
unsigned int synapseBlockSize
Definition: global.cc:43
int neuronBlkSz
Global variable containing the GPU block size for the neuron kernel.
Definition: global.cc:50
int synapseBlkSz
Global variable containing the GPU block size for the synapse kernel.
Definition: global.cc:54
int learnBlkSz
Global variable containing the GPU block size for the learn kernel.
Definition: global.cc:55
unsigned int calcSynapses
Definition: global.cc:29
unsigned int learningBlockSize
Definition: global.cc:44
unsigned int learnSynapsesPost
Definition: global.cc:30
unsigned int calcSynapseDynamics
Definition: global.cc:28
unsigned int neuronBlockSize
default GPU device; used to determine which GPU to use if chooseDevice is 0 (off) ...
Definition: global.cc:42
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:49