brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5be772a Raw
26 lines · c
1/* Minimal declarations for HIP support.  Testing purposes only. */2 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 __managed__ __attribute__((managed))9 10struct dim3 {11  unsigned x, y, z;12  __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}13};14 15typedef struct hipStream *hipStream_t;16typedef enum hipError {} hipError_t;17int hipConfigureCall(dim3 gridSize, dim3 blockSize, unsigned long long sharedSize = 0,18                     hipStream_t stream = 0);19extern "C" hipError_t __hipPushCallConfiguration(dim3 gridSize, dim3 blockSize,20                                                 unsigned long long sharedSize = 0,21                                                 hipStream_t stream = 0);22extern "C" hipError_t hipLaunchKernel(const void *func, dim3 gridDim,23                                      dim3 blockDim, void **args,24                                      unsigned long long sharedMem,25                                      hipStream_t stream);26