17 lines
406 B
Text
17 lines
406 B
Text
|
#define ERRCHECK(err) (HandleError( err , __FILE__, __LINE__))
|
||
|
|
||
|
static void HandleError( cudaError_t err, const char *file, int line ) {
|
||
|
if(err != cudaSuccess) {
|
||
|
fprintf(stderr, "Cuda Error: %s in %s at line %d\n",
|
||
|
cudaGetErrorString( err ),
|
||
|
file,
|
||
|
line );
|
||
|
exit( EXIT_FAILURE );
|
||
|
}
|
||
|
}
|
||
|
|
||
|
int main( int argc, char *argv[] ) {
|
||
|
|
||
|
return 0;
|
||
|
}
|