30 #include <cuda_runtime.h> 44 #if CUDA_VERSION >= 6050 45 #define CHECK_CU_ERRORS(call) \ 47 CUresult error = call; \ 48 if (error != CUDA_SUCCESS) \ 51 cuGetErrorName(error, &errStr); \ 52 cerr << __FILE__ << ": " << __LINE__; \ 53 cerr << ": cuda driver error " << error << ": "; \ 54 cerr << errStr << endl; \ 59 #define CHECK_CU_ERRORS(call) call 64 #define CHECK_CUDA_ERRORS(call) \ 66 cudaError_t error = call; \ 67 if (error != cudaSuccess) \ 69 cerr << __FILE__ << ": " << __LINE__; \ 70 cerr << ": cuda runtime error " << error << ": "; \ 71 cerr << cudaGetErrorString(error) << endl; \ 83 #define B(x,i) ((x) & (0x80000000 >> (i))) 85 #define setB(x,i) x= ((x) | (0x80000000 >> (i))) 87 #define delB(x,i) x= ((x) & (~(0x80000000 >> (i)))) 94 #define USE(expr) do { (void)(expr); } while (0) 113 cerr <<
"GeNN error: " << error << endl;
void writeHeader(CodeStream &os)
Function to write the comment header denoting file authorship and contact details into the generated ...
Definition: utils.cc:87
type
Definition: generate_swig_interfaces.py:680
size_t theSize(const string &type)
Tool for determining the size of variable types on the current architecture.
Definition: utils.cc:104
Helper class for generating code - automatically inserts brackets, indents etc.
Definition: codeStream.h:14
void gennError(const string &error)
Function called upon the detection of an error. Outputs an error message and then exits...
Definition: utils.h:111
CUresult cudaFuncGetAttributesDriver(cudaFuncAttributes *attr, CUfunction kern)
Function for getting the capabilities of a CUDA device via the driver API.
Definition: utils.cc:41