This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// Macro for checking CUDA errors | |
#define CUDA_CHECK_ERROR(err) \ | |
if (err != cudaSuccess) { \ | |
printf("CUDA err: %s at line %d\n", cudaGetErrorString(err), __LINE__); \ | |
exit(EXIT_FAILURE); \ | |
} | |
// Kernel definition |