diff --git a/vim/.vim/templates/cuda b/vim/.vim/templates/cuda new file mode 100644 index 0000000..dd7fddf --- /dev/null +++ b/vim/.vim/templates/cuda @@ -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; +}