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