cuda.h 679 B

1234567891011121314151617181920
  1. /* Minimal declarations for CUDA support. Testing purposes only. */
  2. #include <stddef.h>
  3. #define __constant__ __attribute__((constant))
  4. #define __device__ __attribute__((device))
  5. #define __global__ __attribute__((global))
  6. #define __host__ __attribute__((host))
  7. #define __shared__ __attribute__((shared))
  8. #define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
  9. struct dim3 {
  10. unsigned x, y, z;
  11. __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
  12. };
  13. typedef struct cudaStream *cudaStream_t;
  14. int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
  15. cudaStream_t stream = 0);