xpu
|
Public Member Functions | |
view ()=default | |
XPU_D | view (T *data, size_t size) |
XPU_D | view (buffer< T > &buffer, size_t size) |
XPU_D T * | data () const |
XPU_D size_t | size () const |
XPU_D bool | empty () const |
XPU_D T & | operator[] (size_t idx) |
XPU_D const T & | operator[] (size_t idx) const |
XPU_D T & | at (size_t idx) |
XPU_D const T & | at (size_t idx) const |
Create a view of a buffer. The view is a pointer to the buffer's data and a size. This class should be used to access a buffer in device code only. To access buffer-data on the host, use 'h_view' instead.
Create a view from a pointer and a size.
Create a view from a buffer and a size.
Return a pointer to the view's data.