xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCUDA/Inputs/cuda.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /* Minimal declarations for CUDA support.  Testing purposes only. */
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc #include <stddef.h>
4*0a6a1f1dSLionel Sambuc 
5*0a6a1f1dSLionel Sambuc #define __constant__ __attribute__((constant))
6*0a6a1f1dSLionel Sambuc #define __device__ __attribute__((device))
7*0a6a1f1dSLionel Sambuc #define __global__ __attribute__((global))
8*0a6a1f1dSLionel Sambuc #define __host__ __attribute__((host))
9*0a6a1f1dSLionel Sambuc #define __shared__ __attribute__((shared))
10*0a6a1f1dSLionel Sambuc #define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
11*0a6a1f1dSLionel Sambuc 
12*0a6a1f1dSLionel Sambuc struct dim3 {
13*0a6a1f1dSLionel Sambuc   unsigned x, y, z;
xdim314*0a6a1f1dSLionel Sambuc   __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
15*0a6a1f1dSLionel Sambuc };
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc typedef struct cudaStream *cudaStream_t;
18*0a6a1f1dSLionel Sambuc 
19*0a6a1f1dSLionel Sambuc int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
20*0a6a1f1dSLionel Sambuc                       cudaStream_t stream = 0);
21