initial commit

This commit is contained in:
Carl Pearson
2021-05-14 17:18:25 -06:00
commit a4b08da21d
4 changed files with 600 additions and 0 deletions

15
cuda_runtime.hpp Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include <cstdio>
#include <cuda_runtime.h>
inline void checkCuda(cudaError_t result, const char *file, const int line)
{
if (result != cudaSuccess)
{
fprintf(stderr, "%s:%d: CUDA Runtime Error %d: %s\n", file, line, int(result), cudaGetErrorString(result));
exit(-1);
}
}
#define CUDA_RUNTIME(stmt) checkCuda(stmt, __FILE__, __LINE__);