HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::NodeManagerHandle< BufferT > Class Template Reference

NodeManagerHandle manages the memory of a NodeManager. More...

#include <NodeManager.h>

Public Member Functions

 NodeManagerHandle (GridType gridType, BufferT &&buffer)
 Move constructor from a buffer. More...
 
 NodeManagerHandle ()=default
 Empty ctor. More...
 
 NodeManagerHandle (const NodeManagerHandle &)=delete
 Disallow copy-construction. More...
 
NodeManagerHandleoperator= (const NodeManagerHandle &)=delete
 Disallow copy assignment operation. More...
 
NodeManagerHandleoperator= (NodeManagerHandle &&other) noexcept
 Move copy assignment operation. More...
 
 NodeManagerHandle (NodeManagerHandle &&other) noexcept
 Move copy-constructor. More...
 
 ~NodeManagerHandle ()
 Default destructor. More...
 
void reset ()
 clear the buffer More...
 
BufferT & buffer ()
 Return a reference to the buffer. More...
 
const BufferT & buffer () const
 Return a const reference to the buffer. More...
 
uint8_t * data ()
 Returns a non-const pointer to the data. More...
 
const uint8_t * data () const
 Returns a const pointer to the data. More...
 
uint64_t size () const
 Returns the size in bytes of the raw memory buffer managed by this NodeManagerHandle's allocator. More...
 
template<typename BuildT >
const NodeManager< BuildT > * mgr () const
 Returns a const pointer to the NodeManager encoded in this NodeManagerHandle. More...
 
template<typename BuildT >
NodeManager< BuildT > * mgr ()
 Returns a pointer to the NodeManager encoded in this NodeManagerHandle. More...
 
template<typename BuildT , typename U = BufferT>
enable_if< BufferTraits< U >
::hasDeviceDual, const
NodeManager< BuildT >
* >::type 
deviceMgr () const
 Return a const pointer to the NodeManager encoded in this NodeManagerHandle on the device, e.g. GPU. More...
 
template<typename BuildT , typename U = BufferT>
enable_if< BufferTraits< U >
::hasDeviceDual, NodeManager
< BuildT > * >::type 
deviceMgr ()
 Return a const pointer to the NodeManager encoded in this NodeManagerHandle on the device, e.g. GPU. More...
 
template<typename U = BufferT>
enable_if< BufferTraits< U >
::hasDeviceDual, void >::type 
deviceUpload (void *deviceGrid, void *stream=nullptr, bool sync=true)
 Upload the NodeManager to the device, e.g. from CPU to GPU. More...
 
template<typename U = BufferT>
enable_if< BufferTraits< U >
::hasDeviceDual, void >::type 
deviceDownload (void *stream=nullptr, bool sync=true)
 Download the NodeManager to from the device, e.g. from GPU to CPU. More...
 

Detailed Description

template<typename BufferT = HostBuffer>
class nanovdb::NodeManagerHandle< BufferT >

NodeManagerHandle manages the memory of a NodeManager.

This class serves to manage a raw memory buffer of a NanoVDB NodeManager or LeafManager.

Definition at line 31 of file NodeManager.h.

Constructor & Destructor Documentation

template<typename BufferT = HostBuffer>
nanovdb::NodeManagerHandle< BufferT >::NodeManagerHandle ( GridType  gridType,
BufferT &&  buffer 
)
inline

Move constructor from a buffer.

Definition at line 75 of file NodeManager.h.

template<typename BufferT = HostBuffer>
nanovdb::NodeManagerHandle< BufferT >::NodeManagerHandle ( )
default

Empty ctor.

template<typename BufferT = HostBuffer>
nanovdb::NodeManagerHandle< BufferT >::NodeManagerHandle ( const NodeManagerHandle< BufferT > &  )
delete

Disallow copy-construction.

template<typename BufferT = HostBuffer>
nanovdb::NodeManagerHandle< BufferT >::NodeManagerHandle ( NodeManagerHandle< BufferT > &&  other)
inlinenoexcept

Move copy-constructor.

Definition at line 90 of file NodeManager.h.

template<typename BufferT = HostBuffer>
nanovdb::NodeManagerHandle< BufferT >::~NodeManagerHandle ( )
inline

Default destructor.

Definition at line 96 of file NodeManager.h.

Member Function Documentation

template<typename BufferT = HostBuffer>
BufferT& nanovdb::NodeManagerHandle< BufferT >::buffer ( )
inline

Return a reference to the buffer.

Definition at line 101 of file NodeManager.h.

template<typename BufferT = HostBuffer>
const BufferT& nanovdb::NodeManagerHandle< BufferT >::buffer ( ) const
inline

Return a const reference to the buffer.

Definition at line 104 of file NodeManager.h.

template<typename BufferT = HostBuffer>
uint8_t* nanovdb::NodeManagerHandle< BufferT >::data ( )
inline

Returns a non-const pointer to the data.

Warning
Note that the return pointer can be NULL if the NodeManagerHandle was not initialized

Definition at line 109 of file NodeManager.h.

template<typename BufferT = HostBuffer>
const uint8_t* nanovdb::NodeManagerHandle< BufferT >::data ( ) const
inline

Returns a const pointer to the data.

Warning
Note that the return pointer can be NULL if the NodeManagerHandle was not initialized

Definition at line 114 of file NodeManager.h.

template<typename BufferT = HostBuffer>
template<typename U = BufferT>
enable_if<BufferTraits<U>::hasDeviceDual, void>::type nanovdb::NodeManagerHandle< BufferT >::deviceDownload ( void stream = nullptr,
bool  sync = true 
)
inline

Download the NodeManager to from the device, e.g. from GPU to CPU.

Note
This method is only available if the buffer supports devices

Definition at line 165 of file NodeManager.h.

template<typename BufferT = HostBuffer>
template<typename BuildT , typename U = BufferT>
enable_if<BufferTraits<U>::hasDeviceDual, const NodeManager<BuildT>*>::type nanovdb::NodeManagerHandle< BufferT >::deviceMgr ( ) const
inline

Return a const pointer to the NodeManager encoded in this NodeManagerHandle on the device, e.g. GPU.

Warning
Note that the return pointer can be NULL if the template parameter does not match the specified grid!

Definition at line 136 of file NodeManager.h.

template<typename BufferT = HostBuffer>
template<typename BuildT , typename U = BufferT>
enable_if<BufferTraits<U>::hasDeviceDual, NodeManager<BuildT>*>::type nanovdb::NodeManagerHandle< BufferT >::deviceMgr ( )
inline

Return a const pointer to the NodeManager encoded in this NodeManagerHandle on the device, e.g. GPU.

Warning
Note that the return pointer can be NULL if the template parameter does not match the specified grid!

Definition at line 143 of file NodeManager.h.

template<typename BufferT = HostBuffer>
template<typename U = BufferT>
enable_if<BufferTraits<U>::hasDeviceDual, void>::type nanovdb::NodeManagerHandle< BufferT >::deviceUpload ( void deviceGrid,
void stream = nullptr,
bool  sync = true 
)
inline

Upload the NodeManager to the device, e.g. from CPU to GPU.

Note
This method is only available if the buffer supports devices

Definition at line 150 of file NodeManager.h.

template<typename BufferT = HostBuffer>
template<typename BuildT >
const NodeManager<BuildT>* nanovdb::NodeManagerHandle< BufferT >::mgr ( ) const
inline

Returns a const pointer to the NodeManager encoded in this NodeManagerHandle.

Warning
Note that the return pointer can be NULL if the template parameter does not match the specified grid!

Definition at line 123 of file NodeManager.h.

template<typename BufferT = HostBuffer>
template<typename BuildT >
NodeManager<BuildT>* nanovdb::NodeManagerHandle< BufferT >::mgr ( )
inline

Returns a pointer to the NodeManager encoded in this NodeManagerHandle.

Warning
Note that the return pointer can be NULL if the template parameter does not match the specified grid!

Definition at line 129 of file NodeManager.h.

template<typename BufferT = HostBuffer>
NodeManagerHandle& nanovdb::NodeManagerHandle< BufferT >::operator= ( const NodeManagerHandle< BufferT > &  )
delete

Disallow copy assignment operation.

template<typename BufferT = HostBuffer>
NodeManagerHandle& nanovdb::NodeManagerHandle< BufferT >::operator= ( NodeManagerHandle< BufferT > &&  other)
inlinenoexcept

Move copy assignment operation.

Definition at line 83 of file NodeManager.h.

template<typename BufferT = HostBuffer>
void nanovdb::NodeManagerHandle< BufferT >::reset ( )
inline

clear the buffer

Definition at line 98 of file NodeManager.h.

template<typename BufferT = HostBuffer>
uint64_t nanovdb::NodeManagerHandle< BufferT >::size ( void  ) const
inline

Returns the size in bytes of the raw memory buffer managed by this NodeManagerHandle's allocator.

Definition at line 117 of file NodeManager.h.


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