28 #include <cuda_runtime.h> 40 #if CUDA_VERSION >= 6050 41 #define CHECK_CU_ERRORS(call) \ 43 CUresult error = call; \ 44 if (error != CUDA_SUCCESS) \ 47 cuGetErrorName(error, &errStr); \ 48 cerr << __FILE__ << ": " << __LINE__; \ 49 cerr << ": cuda driver error " << error << ": "; \ 50 cerr << errStr << endl; \ 55 #define CHECK_CU_ERRORS(call) call 60 #define CHECK_CUDA_ERRORS(call) \ 62 cudaError_t error = call; \ 63 if (error != cudaSuccess) \ 65 cerr << __FILE__ << ": " << __LINE__; \ 66 cerr << ": cuda runtime error " << error << ": "; \ 67 cerr << cudaGetErrorString(error) << endl; \ 79 #define B(x,i) ((x) & (0x80000000 >> (i))) 81 #define setB(x,i) x= ((x) | (0x80000000 >> (i))) 83 #define delB(x,i) x= ((x) & (~(0x80000000 >> (i)))) 108 unsigned int theSize(
string type);
void gennError(string error)
Function called upon the detection of an error. Outputs an error message and then exits...
Definition: utils.cc:83
CUresult cudaFuncGetAttributesDriver(cudaFuncAttributes *attr, CUfunction kern)
Function for getting the capabilities of a CUDA device via the driver API.
Definition: utils.cc:36
unsigned int theSize(string type)
Tool for determining the size of variable types on the current architecture.
Definition: utils.cc:112
void writeHeader(ostream &os)
Function to write the comment header denoting file authorship and contact details into the generated ...
Definition: utils.cc:95