Brick Library 0.1
Performance-portable stencil datalayout & codegen
|
This file is largely used to give the DPCPP interface a similar footprint to CUDA and HIP so that it can easily be used with brick-gpu.h. More...
Go to the source code of this file.
Classes | |
struct | DPCBrick< Dim< BDims... >, Dim< Folds... > > |
Brick data structure. More... | |
Macros | |
#define | gpuMalloc(p, s) dpc_malloc(p, s) |
#define | gpuMemcpy(d, p, s, k) dpc_memcpy(d, p, s, k) |
#define | gpuFree(p) dpc_free(p) |
#define | gpuMemcpyKind dpcMemcpyKind |
#define | gpuMemcpyHostToDevice dpcMemcpyHostToDevice |
#define | gpuMemcpyDeviceToHost dpcMemcpyDeviceToHost |
#define | gpuSuccess dpc_success |
#define | gpuGetErrorString(e) dpc_get_error_string(e) |
Enumerations | |
enum | dpcError_t { dpc_success , memcpy_failed , malloc_failed } |
enum | dpcMemcpyKind { dpcMemcpyHostToDevice , dpcMemcpyDeviceToHost } |
Functions | |
template<typename T > | |
dpcError_t | dpc_malloc (T **buffer, size_t size) |
Interface to allocate memory on a DPCPP GPU with a similar footprint to CUDA. | |
template<typename T > | |
dpcError_t | dpc_memcpy (T *dst, T *ptr, size_t size, dpcMemcpyKind type) |
Copy data from host to DPCPP GPU. If data must be returned to the host after kernel execution, a buffer/accessor pattern is preffered. | |
template<typename T > | |
dpcError_t | dpc_free (T *ptr) |
Free allocated memory on a DPCPP GPU. | |
This file is largely used to give the DPCPP interface a similar footprint to CUDA and HIP so that it can easily be used with brick-gpu.h.
#define gpuFree | ( | p | ) | dpc_free(p) |
#define gpuGetErrorString | ( | e | ) | dpc_get_error_string(e) |
#define gpuMalloc | ( | p, | |
s | |||
) | dpc_malloc(p, s) |
#define gpuMemcpy | ( | d, | |
p, | |||
s, | |||
k | |||
) | dpc_memcpy(d, p, s, k) |
#define gpuMemcpyDeviceToHost dpcMemcpyDeviceToHost |
#define gpuMemcpyHostToDevice dpcMemcpyHostToDevice |
#define gpuMemcpyKind dpcMemcpyKind |
#define gpuSuccess dpc_success |
enum dpcError_t |
enum dpcMemcpyKind |
|
inline |
Free allocated memory on a DPCPP GPU.
T | The type of the data being freed, usually implicit. |
ptr | Pointer to the previously allocated memory. |
|
inline |
Interface to allocate memory on a DPCPP GPU with a similar footprint to CUDA.
T | Type of data to be store in the buffer, usually implicit. |
buffer | Where to store the pointer to the allocated memory. |
size | Size of allocated memory in bytes. |
|
inline |
Copy data from host to DPCPP GPU. If data must be returned to the host after kernel execution, a buffer/accessor pattern is preffered.
T | The type of data being copied, usually implicit. |
dst | Pointer to the destination on the GPU. |
ptr | Pointer to the data source on the host. |
size | The size of the data copy in bytes. |
type | Currently may only be dpcMemcpyHostToDevice (alias of gpuMemcpyHostToDevice) |