File indexing completed on 2026-05-27 07:23:57
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #if defined(__CUDACC__)
0012
0013 #include <cuda.h>
0014 #include <cuda_runtime.h>
0015 #include <stdio.h>
0016 #include <stdlib.h>
0017
0018
0019 #define WARP_SIZE 32
0020
0021
0022 #define DETRAY_CUDA_ERROR_CHECK(ans) \
0023 { \
0024 cudaAssert((ans), __FILE__, __LINE__); \
0025 }
0026 inline void cudaAssert(cudaError_t code, const char *file, int line,
0027 bool abort = true) {
0028 if (code != cudaSuccess) {
0029 fprintf(stderr, "CUDAassert: %s %s %d\n", cudaGetErrorString(code), file,
0030 line);
0031 if (abort)
0032 exit(code);
0033 }
0034 }
0035
0036 #endif