Brick Library 0.1
Performance-portable stencil datalayout & codegen
brick-hip.h
Go to the documentation of this file.
1
7#ifndef BRICK_BRICK_HIP_H
8#define BRICK_BRICK_HIP_H
9
10#include <hip/hip_runtime.h>
11
12#define gpuMalloc(p, s) hipMalloc(p, s)
13#define gpuMemcpy(d, p, s, k) hipMemcpy(d, p, s, k)
14#define gpuFree(p) hipFree(p)
15#define gpuGetErrorString(e) hipGetErrorString(e)
16#define gpuDeviceSynchronize() hipDeviceSynchronize()
17#define gpuMemcpyToSymbol(p, d, s) hipMemcpyToSymbol(p, d, s, hipMemcpyHostToDevice)
18#define gpuDeviceSetCacheConfig(c) hipDeviceSetCacheConfig(c)
19
20#define gpuFuncCachePreferL1 hipFuncCachePreferL1
21#define gpuSuccess hipSuccess
22#define gpuMemcpyKind hipMemcpyKind
23#define gpuMemcpyHostToDevice hipMemcpyHostToDevice
24#define gpuMemcpyDeviceToHost hipMemcpyDeviceToHost
25
26#define gpuExecKernel(f, b, t, a...) hipLaunchKernelGGL(f, b, t, 0, 0, a)
27
28#include "brick-gpu.h"
29
30#endif // BRICK_BRICK_HIP_H
This file should not be directly included. It defines instructions for using bricklib with a GPU,...