|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Abstract interface to a byte buffer owned by a specific backend. More...
#include <DeviceStorage.hpp>
Public Member Functions | |
| virtual uint8_t * | raw_ptr ()=0 |
| Raw byte pointer to the underlying storage. | |
| virtual void | copy_host_to_device (uint8_t *host_ptr, size_t n_bytes)=0 |
Copy n_bytes from host_ptr into this device buffer. | |
| virtual void | copy_device_to_host (uint8_t *host_ptr, size_t n_bytes)=0 |
Copy n_bytes from this device buffer into host_ptr. | |
| virtual void | copy_to_device (uint8_t *device_ptr_dst, size_t n_bytes)=0 |
Device-to-device copy of n_bytes into device_ptr_dst. | |
| virtual size_t | bytes () const =0 |
| Buffer size in bytes. | |
| virtual DeviceBackend | backend () const =0 |
| Which backend the buffer lives on. | |
| virtual | ~DeviceStorageBase () |
Abstract interface to a byte buffer owned by a specific backend.
All DNDS device memory ultimately goes through this interface so that the higher-level host_device_vector<T> can be backend-agnostic. Concrete backends provide specialised DeviceStorage implementations; creation funnels through #device_storage_factory.
Definition at line 105 of file DeviceStorage.hpp.
|
virtualdefault |
|
pure virtual |
Which backend the buffer lives on.
Implemented in DNDS::DeviceStorage< DeviceBackend::Host >.
|
pure virtual |
Buffer size in bytes.
=0 is a definition and all virtual functions must be defined to have vtable never omit =0 or use {}
Implemented in DNDS::DeviceStorage< DeviceBackend::Host >.
|
pure virtual |
Copy n_bytes from this device buffer into host_ptr.
Implemented in DNDS::DeviceStorage< DeviceBackend::Host >.
|
pure virtual |
Copy n_bytes from host_ptr into this device buffer.
Implemented in DNDS::DeviceStorage< DeviceBackend::Host >.
|
pure virtual |
Device-to-device copy of n_bytes into device_ptr_dst.
Implemented in DNDS::DeviceStorage< DeviceBackend::Host >.
|
pure virtual |
Raw byte pointer to the underlying storage.
Implemented in DNDS::DeviceStorage< DeviceBackend::Host >.