Loading...
Searching...
No Matches
NodeManagerHandle< BufferT > Class Template Reference

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

`#include <nanovdb/util/NodeManager.h>`

## Public Member Functions

| NodeManagerHandle (BufferT &&buffer)
| Move constructor from a buffer.
| NodeManagerHandle ()=default
| Empty ctor.
| NodeManagerHandle (const NodeManagerHandle &)=delete
| Disallow copy-construction.
NodeManagerHandle & | operator= (const NodeManagerHandle &)=delete
| Disallow copy assignment operation.
NodeManagerHandle & | operator= (NodeManagerHandle &&other) noexcept
| Move copy assignment operation.
| NodeManagerHandle (NodeManagerHandle &&other) noexcept
| Move copy-constructor.
| ~NodeManagerHandle ()
| Default destructor.
void | reset ()
| clear the buffer
BufferT & | buffer ()
| Return a reference to the buffer.
const BufferT & | buffer () const
| Return a const reference to the buffer.
uint8_t * | data ()
| Returns a non-const pointer to the data.
const uint8_t * | data () const
| Returns a const pointer to the data.
uint64_t | size () const
| Returns the size in bytes of the raw memory buffer managed by this NodeManagerHandle's allocator.
template<typename BuildT>
const NodeManager< BuildT > * | mgr () const
| Returns a const pointer to the NodeManager encoded in this NodeManagerHandle.
template<typename BuildT>
NodeManager< BuildT > * | mgr ()
| Returns a pointer to the NodeManager encoded in this NodeManagerHandle.
template<typename BuildT, typename U = BufferT>
std::enable_if< BufferTraits< U >::hasDeviceDual, constNodeManager< BuildT > * >::type | deviceMgr () const
| Return a const pointer to the NodeManager encoded in this NodeManagerHandle on the device, e.g. GPU.
template<typename BuildT, typename U = BufferT>
std::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.
template<typename U = BufferT>
std::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.
template<typename U = BufferT>
std::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.

## Detailed Description

template<typename BufferT>
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.

## Constructor & Destructor Documentation

## NodeManagerHandle() [1/4]

template<typename BufferT>

NodeManagerHandle | ( | BufferT && | buffer | ) |

inline

Move constructor from a buffer.

## NodeManagerHandle() [2/4]

template<typename BufferT>

NodeManagerHandle | ( |  | ) |

default

Empty ctor.

## NodeManagerHandle() [3/4]

template<typename BufferT>

NodeManagerHandle | ( | const NodeManagerHandle< BufferT > & |  | ) |

delete

Disallow copy-construction.

## NodeManagerHandle() [4/4]

template<typename BufferT>

NodeManagerHandle | ( | NodeManagerHandle< BufferT > && | other | ) |

inline noexcept

Move copy-constructor.

## ~NodeManagerHandle()

template<typename BufferT>

~NodeManagerHandle | ( |  | ) |

inline

Default destructor.

## Member Function Documentation

## buffer() [1/2]

template<typename BufferT>

BufferT & buffer | ( |  | ) |

inline

Return a reference to the buffer.

## buffer() [2/2]

template<typename BufferT>

const BufferT & buffer | ( |  | ) | const

inline

Return a const reference to the buffer.

## data() [1/2]

template<typename BufferT>

uint8_t * 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

## data() [2/2]

template<typename BufferT>

const uint8_t * 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

## deviceDownload()

template<typename BufferT>
template<typename U = BufferT>

std::enable_if< BufferTraits< U >::hasDeviceDual, void >::type 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

## deviceMgr() [1/2]

template<typename BufferT>
template<typename BuildT, typename U = BufferT>

std::enable_if< BufferTraits< U >::hasDeviceDual, NodeManager< BuildT > * >::type 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!

## deviceMgr() [2/2]

template<typename BufferT>
template<typename BuildT, typename U = BufferT>

std::enable_if< BufferTraits< U >::hasDeviceDual, constNodeManager< BuildT > * >::type 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!

## deviceUpload()

template<typename BufferT>
template<typename U = BufferT>

std::enable_if< BufferTraits< U >::hasDeviceDual, void >::type 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

## mgr() [1/2]

template<typename BufferT>
template<typename BuildT>

NodeManager< BuildT > * 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!

## mgr() [2/2]

template<typename BufferT>
template<typename BuildT>

const NodeManager< BuildT > * 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!

## operator=() [1/2]

template<typename BufferT>

NodeManagerHandle & operator= | ( | const NodeManagerHandle< BufferT > & |  | ) |

delete

Disallow copy assignment operation.

## operator=() [2/2]

template<typename BufferT>

NodeManagerHandle & operator= | ( | NodeManagerHandle< BufferT > && | other | ) |

inline noexcept

Move copy assignment operation.

## reset()

template<typename BufferT>

void reset | ( |  | ) |

inline

clear the buffer

## size()

template<typename BufferT>

uint64_t size | ( |  | ) | const

inline

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