1 /* Minimal declarations for CUDA support. Testing purposes only. */
5 #if __HIP__ || __CUDA__
6 #define __constant__ __attribute__((constant))
7 #define __device__ __attribute__((device))
8 #define __global__ __attribute__((global))
9 #define __host__ __attribute__((host))
10 #define __shared__ __attribute__((shared))
12 #define __managed__ __attribute__((managed))
14 #define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
22 #define __launch_bounds__(...)
27 __host__ __device__
dim3(unsigned x
, unsigned y
= 1, unsigned z
= 1) : x(x
), y(y
), z(z
) {}
30 #if __HIP__ || HIP_PLATFORM
31 typedef struct hipStream
*hipStream_t
;
32 typedef enum hipError
{} hipError_t
;
33 int hipConfigureCall(dim3 gridSize
, dim3 blockSize
, size_t sharedSize
= 0,
34 hipStream_t stream
= 0);
35 extern "C" hipError_t
__hipPushCallConfiguration(dim3 gridSize
, dim3 blockSize
,
36 size_t sharedSize
= 0,
37 hipStream_t stream
= 0);
38 #ifndef __HIP_API_PER_THREAD_DEFAULT_STREAM__
39 extern "C" hipError_t
hipLaunchKernel(const void *func
, dim3 gridDim
,
40 dim3 blockDim
, void **args
,
44 extern "C" hipError_t
hipLaunchKernel_spt(const void *func
, dim3 gridDim
,
45 dim3 blockDim
, void **args
,
48 #endif // __HIP_API_PER_THREAD_DEFAULT_STREAM__
50 typedef struct cudaStream
*cudaStream_t
;
51 typedef enum cudaError
{} cudaError_t
;
52 extern "C" int cudaConfigureCall(dim3 gridSize
, dim3 blockSize
,
53 size_t sharedSize
= 0,
54 cudaStream_t stream
= 0);
55 extern "C" int __cudaPushCallConfiguration(dim3 gridSize
, dim3 blockSize
,
56 size_t sharedSize
= 0,
57 cudaStream_t stream
= 0);
58 extern "C" cudaError_t
cudaLaunchKernel(const void *func
, dim3 gridDim
,
59 dim3 blockDim
, void **args
,
60 size_t sharedMem
, cudaStream_t stream
);
61 extern "C" cudaError_t
cudaLaunchKernel_ptsz(const void *func
, dim3 gridDim
,
62 dim3 blockDim
, void **args
,
63 size_t sharedMem
, cudaStream_t stream
);
67 extern "C" __device__
int printf(const char*, ...);