Added cuda template
This commit is contained in:
parent
9ea135f352
commit
b1986d1409
1 changed files with 16 additions and 0 deletions
16
vim/.vim/templates/cuda
Normal file
16
vim/.vim/templates/cuda
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#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;
|
||||||
|
}
|
Loading…
Reference in a new issue