blob: 26a8df0440f151297f5d2ddce6be8673c86d76d7 [file] [log] [blame]
Peter Collingbourneced76712010-12-01 03:15:31 +00001/* Minimal declarations for CUDA support. Testing purposes only. */
2
Peter Collingbournebf36e252011-02-09 21:12:02 +00003#include <stddef.h>
4
Peter Collingbourneced76712010-12-01 03:15:31 +00005#define __constant__ __attribute__((constant))
6#define __device__ __attribute__((device))
7#define __global__ __attribute__((global))
8#define __host__ __attribute__((host))
9#define __shared__ __attribute__((shared))
Peter Collingbournebf36e252011-02-09 21:12:02 +000010
11struct dim3 {
12 unsigned x, y, z;
Peter Collingbourne78dd67e2011-10-02 23:49:40 +000013 __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
Peter Collingbournebf36e252011-02-09 21:12:02 +000014};
15
16typedef struct cudaStream *cudaStream_t;
17
18int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
19 cudaStream_t stream = 0);