OWL
OptiX7 Wrapper Library
owl::DeviceMemory Struct Reference

#include <DeviceMemory.h>

Public Member Functions

 ~DeviceMemory ()
 
bool alloced () const
 
bool empty () const
 
bool notEmpty () const
 
size_t size () const
 
void alloc (size_t size)
 
void allocManaged (size_t size)
 
void * get ()
 
void upload (const void *h_pointer, const char *debugMessage=nullptr)
 
void uploadAsync (const void *h_pointer, cudaStream_t stream)
 
void download (void *h_pointer)
 
void free ()
 
template<typename T >
void upload (const std::vector< T > &vec)
 

Public Attributes

size_t sizeInBytes { 0 }
 
CUdeviceptr d_pointer { 0 }
 

Constructor & Destructor Documentation

◆ ~DeviceMemory()

owl::DeviceMemory::~DeviceMemory ( )
inline

Member Function Documentation

◆ alloc()

void owl::DeviceMemory::alloc ( size_t  size)
inline

◆ alloced()

bool owl::DeviceMemory::alloced ( ) const
inline

◆ allocManaged()

void owl::DeviceMemory::allocManaged ( size_t  size)
inline

◆ download()

void owl::DeviceMemory::download ( void *  h_pointer)
inline

◆ empty()

bool owl::DeviceMemory::empty ( ) const
inline

◆ free()

void owl::DeviceMemory::free ( )
inline

◆ get()

void * owl::DeviceMemory::get ( )
inline

◆ notEmpty()

bool owl::DeviceMemory::notEmpty ( ) const
inline

◆ size()

size_t owl::DeviceMemory::size ( ) const
inline

◆ upload() [1/2]

template<typename T >
void owl::DeviceMemory::upload ( const std::vector< T > &  vec)
inline

◆ upload() [2/2]

void owl::DeviceMemory::upload ( const void *  h_pointer,
const char *  debugMessage = nullptr 
)
inline

◆ uploadAsync()

void owl::DeviceMemory::uploadAsync ( const void *  h_pointer,
cudaStream_t  stream 
)
inline

Member Data Documentation

◆ d_pointer

CUdeviceptr owl::DeviceMemory::d_pointer { 0 }

◆ sizeInBytes

size_t owl::DeviceMemory::sizeInBytes { 0 }

The documentation for this struct was generated from the following file: