OWL
|
#include <Buffer.h>
Public Types | |
typedef std::shared_ptr< HostPinnedBuffer > | SP |
Public Types inherited from owl::Buffer | |
typedef std::shared_ptr< Buffer > | SP |
Public Types inherited from owl::ContextObject | |
typedef std::shared_ptr< ContextObject > | SP |
Public Types inherited from owl::Object | |
typedef std::shared_ptr< Object > | SP |
Public Member Functions | |
HostPinnedBuffer (Context *const context, OWLDataType type) | |
virtual | ~HostPinnedBuffer () |
std::string | toString () const override |
void | resize (size_t newElementCount) override |
void | upload (const void *hostPtr, size_t offset, int64_t count) override |
void | upload (const int deviceID, const void *hostPtr, size_t offset, int64_t count) override |
void | clear () override |
Public Member Functions inherited from owl::Buffer | |
Buffer (Context *const context, OWLDataType type) | |
virtual | ~Buffer () |
std::string | toString () const override |
Buffer::DeviceData & | getDD (const DeviceContext::SP &device) const |
const void * | getPointer (const DeviceContext::SP &device) const |
size_t | getElementCount () const |
size_t | sizeInBytes () const |
virtual void | clear ()=0 |
virtual void | resize (size_t newElementCount)=0 |
virtual void | upload (const void *hostPtr, size_t offset, int64_t count)=0 |
virtual void | upload (const int deviceID, const void *hostPtr, size_t offset, int64_t count)=0 |
RegisteredObject::DeviceData::SP | createOn (const DeviceContext::SP &device) override |
void | destroy () |
Public Member Functions inherited from owl::RegisteredObject | |
RegisteredObject (Context *const context, ObjectRegistry ®istry) | |
Public Member Functions inherited from owl::ContextObject | |
ContextObject (Context *const context) | |
std::string | toString () const override |
Public Member Functions inherited from owl::Object | |
Object () | |
virtual std::string | toString () const |
virtual DeviceData::SP | createOn (const std::shared_ptr< DeviceContext > &device) |
void | createDeviceData (const std::vector< std::shared_ptr< DeviceContext > > &devices) |
template<typename T > | |
std::shared_ptr< T > | as () |
Public Attributes | |
void * | cudaHostPinnedMem { 0 } |
Public Attributes inherited from owl::Buffer | |
const OWLDataType | type |
size_t | elementCount { 0 } |
Public Attributes inherited from owl::RegisteredObject | |
int | ID |
ObjectRegistry & | registry |
Public Attributes inherited from owl::ContextObject | |
Context *const | context |
Public Attributes inherited from owl::Object | |
const size_t | uniqueID |
std::vector< DeviceData::SP > | deviceData |
Additional Inherited Members | |
Static Public Attributes inherited from owl::Object | |
static std::atomic< uint64_t > | nextAvailableID |
a buffer that uses CUDA host-pinned memory. only makes sense for copyable data types
|
virtual |
destructor that frees any allocated host-pinned memory
|
overridevirtual |
clear the buffer by setting its contents to zero
Implements owl::Buffer.
|
overridevirtual |
resize buffer to new num elements
Implements owl::Buffer.
|
overridevirtual |
pretty-printer, for debugging
Reimplemented from owl::Buffer.
|
overridevirtual |
upload data from host, to only given device ID
Implements owl::Buffer.
|
overridevirtual |
upload data from host, using as many bytes as required by elemnetCount and dataSize
Implements owl::Buffer.
void* owl::HostPinnedBuffer::cudaHostPinnedMem { 0 } |
pointer to the (shared) cuda pinned mem - this gets alloced once and is valid on both host and devices