Brick Library 0.1
Performance-portable stencil datalayout & codegen
Loading...
Searching...
No Matches
brick-cuda.h
Go to the documentation of this file.
1
7#ifndef BRICK_BRICK_CUDA_H
8#define BRICK_BRICK_CUDA_H
9
10#include <cuda_runtime.h>
11
12#define gpuMalloc(p, s) cudaMalloc(p, s)
13#define gpuMemcpy(d, p, s, k) cudaMemcpy(d, p, s, k)
14#define gpuMemcpyKind cudaMemcpyKind
15#define gpuMemcpyHostToDevice cudaMemcpyHostToDevice
16#define gpuMemcpyDeviceToHost cudaMemcpyDeviceToHost
17#define gpuFree(p) cudaFree(p)
18#define gpuGetErrorString(e) cudaGetErrorString(e)
19#define gpuSuccess cudaSuccess
20#define gpuDeviceSynchronize() cudaDeviceSynchronize()
21#define gpuMemcpyToSymbol(p, d, s) cudaMemcpyToSymbol(p, d, s)
22#define gpuDeviceSetCacheConfig(c) cudaDeviceSetCacheConfig(c)
23#define gpuFuncCachePreferL1 cudaFuncCachePreferL1
24#define gpuExecKernel(f, b, t, a...) f<<<b,t>>>(a)
25
26#define blockIdx_x cudaBlockIdx.x
27#define blockIdx_y cudaBlockIdx.y
28#define blockIdx_z cudaBlockIdx.z
29
30#define threadIdx_x cudaThreadIdx.x
31#define threadIdx_y cudaThreadIdx.y
32#define threadIdx_z cudaThreadIdx.z
33
34#include "brick-gpu.h"
35
36#endif // BRICK_BRICK_CUDA_H
This file should not be directly included. It defines instructions for using bricklib with a GPU,...