1*67e74705SXin Li /* Minimal declarations for CUDA support. Testing purposes only. */ 2*67e74705SXin Li 3*67e74705SXin Li #include <stddef.h> 4*67e74705SXin Li 5*67e74705SXin Li // Make this file work with nvcc, for testing compatibility. 6*67e74705SXin Li 7*67e74705SXin Li #ifndef __NVCC__ 8*67e74705SXin Li #define __constant__ __attribute__((constant)) 9*67e74705SXin Li #define __device__ __attribute__((device)) 10*67e74705SXin Li #define __global__ __attribute__((global)) 11*67e74705SXin Li #define __host__ __attribute__((host)) 12*67e74705SXin Li #define __shared__ __attribute__((shared)) 13*67e74705SXin Li #define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__))) 14*67e74705SXin Li 15*67e74705SXin Li struct dim3 { 16*67e74705SXin Li unsigned x, y, z; xdim317*67e74705SXin Li __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {} 18*67e74705SXin Li }; 19*67e74705SXin Li 20*67e74705SXin Li typedef struct cudaStream *cudaStream_t; 21*67e74705SXin Li 22*67e74705SXin Li int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0, 23*67e74705SXin Li cudaStream_t stream = 0); 24*67e74705SXin Li #endif // !__NVCC__ 25