Template Class DeviceVectorMirror

Class Documentation

template<typename T>
class DeviceVectorMirror

Memory pinner for an std::vector.

Pin memory (lock the memory page) allocated by an std::vector to RAM and allocate its associated memory on GPU.

Public Functions

inline DeviceVectorMirror(std::vector<T> &src)

Constructor.

inline void CopyToDevice()

Copy data to GPU.

inline void CopyFromDevice()

Copy data from GPU.

inline T *GetDevicePtr()

Get pointer to device memory.

Protected Attributes

std::vector<T> &host_
crb::DeviceMemory<T> device_