xref: /aosp_15_r20/external/clang/test/CodeGenCUDA/Inputs/cuda.h (revision 67e74705e28f6214e480b399dd47ea732279e315)
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 #define __constant__ __attribute__((constant))
6*67e74705SXin Li #define __device__ __attribute__((device))
7*67e74705SXin Li #define __global__ __attribute__((global))
8*67e74705SXin Li #define __host__ __attribute__((host))
9*67e74705SXin Li #define __shared__ __attribute__((shared))
10*67e74705SXin Li #define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
11*67e74705SXin Li 
12*67e74705SXin Li struct dim3 {
13*67e74705SXin Li   unsigned x, y, z;
xdim314*67e74705SXin Li   __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
15*67e74705SXin Li };
16*67e74705SXin Li 
17*67e74705SXin Li typedef struct cudaStream *cudaStream_t;
18*67e74705SXin Li 
19*67e74705SXin Li int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
20*67e74705SXin Li                       cudaStream_t stream = 0);
21*67e74705SXin Li 
22*67e74705SXin Li extern "C" __device__ int printf(const char*, ...);
23