OpenLB 1.7
|
Basic wrappers of common CUDA functions. More...
Classes | |
class | Stream |
Basic wrapper for device stream. More... | |
class | unique_ptr |
Managed pointer for device-side memory. More... | |
Functions | |
int | getCount () |
Return number of available devices. | |
void | check () |
Check errors. | |
void | synchronize () |
Synchronize device. | |
int | get () |
Get current device. | |
void | copyToHost (void *src, void *dst, std::size_t count) |
Copy data from device to host. | |
void | copyToDevice (void *src, void *dst, std::size_t count) |
Copy data from host to device. | |
template<typename T > | |
T * | malloc (std::size_t size) |
Allocate data on device. | |
std::size_t | getDevicePageSize () |
Returns device memory page size. | |
template<typename T > | |
std::size_t | getPageAlignedCount (std::size_t count) |
Returns count rounded up to be a multiple of getDevicePageSize | |
void | asyncCopyToHost (Stream &stream, void *src, void *dst, std::size_t count) |
Copy data from device to host (async) | |
void | asyncCopyToDevice (Stream &stream, void *src, void *dst, std::size_t count) |
Copy data from host to device (async) | |
void | check (CUresult result) |
Check CUDA driver errors. | |
Basic wrappers of common CUDA functions.
void olb::gpu::cuda::device::asyncCopyToDevice | ( | Stream & | stream, |
void * | src, | ||
void * | dst, | ||
std::size_t | count ) |
Copy data from host to device (async)
Definition at line 145 of file device.hh.
References olb::gpu::cuda::device::Stream::get().
void olb::gpu::cuda::device::asyncCopyToHost | ( | Stream & | stream, |
void * | src, | ||
void * | dst, | ||
std::size_t | count ) |
Copy data from device to host (async)
Definition at line 141 of file device.hh.
References olb::gpu::cuda::device::Stream::get().
void olb::gpu::cuda::device::check | ( | ) |
void olb::gpu::cuda::device::check | ( | CUresult | result | ) |
void olb::gpu::cuda::device::copyToDevice | ( | void * | src, |
void * | dst, | ||
std::size_t | count ) |
void olb::gpu::cuda::device::copyToHost | ( | void * | src, |
void * | dst, | ||
std::size_t | count ) |
int olb::gpu::cuda::device::get | ( | ) |
int olb::gpu::cuda::device::getCount | ( | ) |
std::size_t olb::gpu::cuda::device::getDevicePageSize | ( | ) |
Returns device memory page size.
Definition at line 96 of file device.hh.
References check(), and get().
std::size_t olb::gpu::cuda::device::getPageAlignedCount | ( | std::size_t | count | ) |
Returns count
rounded up to be a multiple of getDevicePageSize
Definition at line 64 of file device.h.
References getDevicePageSize().
T * olb::gpu::cuda::device::malloc | ( | std::size_t | size | ) |
void olb::gpu::cuda::device::synchronize | ( | ) |
Synchronize device.
Definition at line 64 of file device.hh.
References check(), and getCount().