Class muda::DeviceBuffer
template <typename T>
ClassList > muda > DeviceBuffer
A std::vector
like wrapper of cuda device memory, allows user to:More...
#include <device_buffer.h>
Public Types
Type | Name |
---|---|
typedef T | value_type |
Public Functions
Type | Name |
---|---|
DeviceBuffer (size_t n) |
|
DeviceBuffer () |
|
DeviceBuffer (const DeviceBuffer< T > & other) |
|
DeviceBuffer (DeviceBuffer && other) |
|
DeviceBuffer (CBufferView< T > other) |
|
DeviceBuffer (const std::vector< T > & host) |
|
auto | capacity () const |
void | clear () |
void | copy_from (const std::vector< T > & host) |
void | copy_to (std::vector< T > & host) const |
CDense1D< T > | cviewer () const |
T * | data () |
const T * | data () const |
void | fill (const T & v) |
operator BufferView< T > () |
|
operator CBufferView< T > () const |
|
DeviceBuffer & | operator= (const DeviceBuffer< T > & other) |
DeviceBuffer & | operator= (DeviceBuffer< T > && other) |
DeviceBuffer & | operator= (CBufferView< T > other) |
DeviceBuffer & | operator= (const std::vector< T > & other) |
void | reserve (size_t new_capacity) |
void | resize (size_t new_size) |
void | resize (size_t new_size, const T & value) |
void | shrink_to_fit () |
auto | size () const |
BufferView< T > | view (size_t offset, size_t size=~0) |
BufferView< T > | view () |
CBufferView< T > | view (size_t offset, size_t size=~0) const |
CBufferView< T > | view () const |
Dense1D< T > | viewer () |
~DeviceBuffer () |
Detailed Description
- resize
- reserve
- clear
- fill
- shrink_to_fit
- make view or subview from it
- make a safe viewer from it
See also:
Public Types Documentation
typedef value_type
Public Functions Documentation
function DeviceBuffer [1/6]
function DeviceBuffer [2/6]
function DeviceBuffer [3/6]
function DeviceBuffer [4/6]
function DeviceBuffer [5/6]
function DeviceBuffer [6/6]
function capacity
function clear
function copy_from
function copy_to
function cviewer
function data [1/2]
function data [2/2]
function fill
function operator BufferView< T >
function operator CBufferView< T >
function operator=
function operator=
function operator=
function operator=
function reserve
function resize [1/2]
function resize [2/2]
function shrink_to_fit
function size
function view [1/4]
function view [2/4]
function view [3/4]
function view [4/4]
function viewer
function ~DeviceBuffer
The documentation for this class was generated from the following file src/muda/buffer/device_buffer.h