Brick Library 0.1
Performance-portable stencil datalayout & codegen
Loading...
Searching...
No Matches
Macros | Functions
brick-gpu.h File Reference

This file should not be directly included. It defines instructions for using bricklib with a GPU, but either brick-hip.h or brick-cuda.h should be included for correct runtime support. More...

#include <cassert>
#include <brick.h>
#include "dev_shl.h"
Include dependency graph for brick-gpu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define gpuCheck(x)   x
 

Functions

template<typename T >
void _gpuCheck (T e, const char *func, const char *call, const int line)
 
template<unsigned dims>
BrickInfo< dims > movBrickInfo (BrickInfo< dims > &bInfo, gpuMemcpyKind kind)
 Moving BrickInfo to or from GPU.
 
template<unsigned dims>
BrickInfo< dims > * movBrickInfoDeep (BrickInfo< dims > &bInfo, gpuMemcpyKind kind)
 Moving the full BrickInfo to or from GPU, including the adjacency list and other elements.
 
BrickStorage movBrickStorage (BrickStorage &bStorage, gpuMemcpyKind kind)
 Moving BrickStorage to or from GPU (allocate new)
 

Detailed Description

This file should not be directly included. It defines instructions for using bricklib with a GPU, but either brick-hip.h or brick-cuda.h should be included for correct runtime support.

Macro Definition Documentation

◆ gpuCheck

#define gpuCheck (   x)    x

Function Documentation

◆ _gpuCheck()

template<typename T >
void _gpuCheck ( e,
const char *  func,
const char *  call,
const int  line 
)

◆ movBrickInfo()

template<unsigned dims>
BrickInfo< dims > movBrickInfo ( BrickInfo< dims > &  bInfo,
gpuMemcpyKind  kind 
)

Moving BrickInfo to or from GPU.

Template Parameters
dimsimplicit when used with bInfo argument
Parameters
bInfoBrickInfo to copy to destination
kindCurrently must be <hip|cuda>MempyHostToDevice or <hip|cuda>MemcpyDeviceToHost
Returns
a new BrickInfo struct allocated on the destination

◆ movBrickInfoDeep()

template<unsigned dims>
BrickInfo< dims > * movBrickInfoDeep ( BrickInfo< dims > &  bInfo,
gpuMemcpyKind  kind 
)

Moving the full BrickInfo to or from GPU, including the adjacency list and other elements.

Template Parameters
dimsimplicit when used with bInfo argument
Parameters
bInfoBrickInfo to copy to destination
kindCurrently must be <hip|cuda>MempyHostToDevice or <hip|cuda>MemcpyDeviceToHost
Returns
a new pointer to a BrickInfo allocated on the destination
Here is the call graph for this function:

◆ movBrickStorage()

BrickStorage movBrickStorage ( BrickStorage bStorage,
gpuMemcpyKind  kind 
)
inline

Moving BrickStorage to or from GPU (allocate new)

Parameters
bStorageBrickStorage to copy from
kindCurrently must be either <hip|cuda>MemcpyHostToDevice or <hip|cuda>MemcpyDeviceToHost
Returns
a new BrickStorage struct allocated on the destination