Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }
- inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort = false)
- {
- if (code != cudaSuccess)
- {
- fprintf(stderr, "GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
- if (abort) exit(code);
- }
- }
- main:
- initCurand <<< BLOCK_COUNT, THR_COUNT>>>(dev_random);
- gpuErrchk(cudaGetLastError());
- gpuErrchk(cudaDeviceSynchronize());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement