OpenLB 1.7
No Matches
Classes | Namespaces | Functions
device.h File Reference
#include <cuda_runtime_api.h>
+ Include dependency graph for device.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  olb::gpu::cuda::device::unique_ptr< T >
 Managed pointer for device-side memory. More...
class  olb::gpu::cuda::device::Stream
 Basic wrapper for device stream. More...


namespace  olb
 Top level namespace for all of OpenLB.
namespace  olb::gpu
 Implementations of GPU specifics.
namespace  olb::gpu::cuda
 Implementations of Nvidia CUDA specifics.
namespace  olb::gpu::cuda::device
 Basic wrappers of common CUDA functions.


int olb::gpu::cuda::device::getCount ()
 Return number of available devices.
void olb::gpu::cuda::device::check ()
 Check errors.
void olb::gpu::cuda::device::synchronize ()
 Synchronize device.
int olb::gpu::cuda::device::get ()
 Get current device.
void olb::gpu::cuda::device::copyToHost (void *src, void *dst, std::size_t count)
 Copy data from device to host.
void olb::gpu::cuda::device::copyToDevice (void *src, void *dst, std::size_t count)
 Copy data from host to device.
template<typename T >
T * olb::gpu::cuda::device::malloc (std::size_t size)
 Allocate data on device.
std::size_t olb::gpu::cuda::device::getDevicePageSize ()
 Returns device memory page size.
template<typename T >
std::size_t olb::gpu::cuda::device::getPageAlignedCount (std::size_t count)
 Returns count rounded up to be a multiple of getDevicePageSize
void olb::gpu::cuda::device::asyncCopyToHost (Stream &stream, void *src, void *dst, std::size_t count)
 Copy data from device to host (async)
void olb::gpu::cuda::device::asyncCopyToDevice (Stream &stream, void *src, void *dst, std::size_t count)
 Copy data from host to device (async)