Template Struct Storage

Struct Documentation

template<typename T>
struct Storage

Memory storage for a host vector and a device vector.

Public Functions

Storage() = default

Default constructor.

inline Storage(std::size_t n)

Constructor from size.

template<typename Iterator>
inline void Copy(Iterator first, Iterator last)

Copy data from a container.

inline void CopyFromDevice()

Copy data from GPU.

inline crb::HostVector<T> &GetHostVector()

Get reference to the host vector.

inline T *GetDevicePtr()

Get pointer to device memory.

Protected Attributes

crb::HostVector<T> host_
crb::DeviceMemory<T> device_