GeNN  1.1
GPU enhanced Neuronal Networks (GeNN)
 All Classes Files Functions Variables Typedefs Macros Pages
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 #ifndef _GLOBAL_H_
15 #define _GLOBAL_H_
16 
17 //--------------------------------------------------------------------------
24 //--------------------------------------------------------------------------
25 
26 #include <iostream>
27 #include <cstring>
28 #include <string>
29 #include <sstream>
30 #include <vector>
31 #include <cmath>
32 #include <cuda_runtime.h>
33 #include "toString.h"
34 
35 using namespace std; // replaced these two lines : problem with visual studio
36 
37 
38 
39 // THESE WILL BE REPLACED BY VARIABLES BELOW SOON!!!!!!!
43 cudaDeviceProp *deviceProp;
44 int theDev;
45 
46 
47 
48 
49 int hostCount;
52 //vector<cudaDeviceProp> deviceProp; //!< Global vector containing the properties of all CUDA-enabled devices
53 //vector<int> synapseBlkSz; //!< Global vector containing the optimum synapse kernel block size for each device
54 //vector<int> learnBlkSz; //!< Global vector containing the optimum learn kernel block size for each device
55 //vector<int> neuronBlkSz; //!< Global vector containing the optimum neuron kernel block size for each device
56 int UIntSz = sizeof(unsigned int) * 8;
57 int logUIntSz = (int) (logf((float) UIntSz) / logf(2.0f) + 1e-5f);
58 
59 #endif // _GLOBAL_H_
Contains a template function for string conversion from const char* to C++ string.
cudaDeviceProp * deviceProp
Definition: global.h:43
int hostCount
Global variable containing the number of hosts within the local compute cluster.
Definition: global.h:49
int theDev
Definition: global.h:44
int deviceCount
Global variable containing the number of CUDA devices found on this host.
Definition: global.h:50
int UIntSz
size of the unsigned int variable type on the local architecture
Definition: global.h:56
int neuronBlkSz
Definition: global.h:40
int synapseBlkSz
Definition: global.h:41
int optimiseBlockSize
Flag for signalling whether or not block size optimisation should be performed.
Definition: global.h:51
int learnBlkSz
Definition: global.h:42
int logUIntSz
logarithm of the size of the unsigned int variable type on the local architecture ...
Definition: global.h:57