OpenVDB 13.0.0

Loading...
Searching...
No Matches
NodeManager< BuildT > Class Template Reference

NodeManager allows for sequential access to nodes. More...

`#include <nanovdb/NodeManager.h>`

Inheritance diagram for NodeManager< BuildT >:

## Public Member Functions
| NodeManager (const NodeManager &)=delete
| NodeManager (NodeManager &&)=delete
NodeManager & | operator= (const NodeManager &)=delete
NodeManager & | operator= (NodeManager &&)=delete
| ~NodeManager ()=delete
__hostdev__ bool | isLinear () const
| return true if the nodes have both fixed size and are arranged breadth-first in memory. This allows for direct and memory-efficient linear access to nodes.
__hostdev__ uint64_t | memUsage () const
| Return the memory footprint in bytes of this instance.
__hostdev__ GridT & | grid ()
| Return a reference to the grid.
__hostdev__ const GridT & | grid () const
__hostdev__ TreeT & | tree ()
| Return a reference to the tree.
__hostdev__ const TreeT & | tree () const
__hostdev__ RootT & | root ()
| Return a reference to the root.
__hostdev__ const RootT & | root () const
__hostdev__ uint64_t | nodeCount (int level) const
| Return the number of tree nodes at the specified level.
__hostdev__ uint64_t | leafCount () const
__hostdev__ uint64_t | lowerCount () const
__hostdev__ uint64_t | upperCount () const
template<int LEVEL>
__hostdev__ const NodeT< LEVEL > & | node (uint32_t i) const
| Return the i'th leaf node with respect to breadth-first ordering.
template<int LEVEL>
__hostdev__ NodeT< LEVEL > & | node (uint32_t i)
| Return the i'th node with respect to breadth-first ordering.
__hostdev__ const Node0 & | leaf (uint32_t i) const
| Return the i'th leaf node with respect to breadth-first ordering.
__hostdev__ Node0 & | leaf (uint32_t i)
__hostdev__ const Node1 & | lower (uint32_t i) const
| Return the i'th lower internal node with respect to breadth-first ordering.
__hostdev__ Node1 & | lower (uint32_t i)
__hostdev__ const Node2 & | upper (uint32_t i) const
| Return the i'th upper internal node with respect to breadth-first ordering.
__hostdev__ Node2 & | upper (uint32_t i)

## Static Public Member Functions
static __hostdev__ bool | isLinear (const GridT &grid)
| return true if the nodes have both fixed size and are arranged breadth-first in memory. This allows for direct and memory-efficient linear access to nodes.
static __hostdev__ uint64_t | memUsage (const GridT &grid)
| Return the memory footprint in bytes of the NodeManager derived from the specified grid.

## Static Public Attributes
static constexpr bool | FIXED_SIZE = Node0::FIXED_SIZE && Node1::FIXED_SIZE && Node2::FIXED_SIZE

## Detailed Description

template<typename BuildT>
class nanovdb::NodeManager< BuildT >

NodeManager allows for sequential access to nodes.

This class allows for sequential access to nodes in a NanoVDB tree.

Nodes are always arranged breadth first during sequential access of nodes at a particular level.

## Constructor & Destructor Documentation

## ◆ NodeManager() [1/2]

template<typename BuildT>

NodeManager | ( | const NodeManager< BuildT > & |  | ) |
| delete

## ◆ NodeManager() [2/2]

template<typename BuildT>

NodeManager | ( | NodeManager< BuildT > && |  | ) |
| delete

## ◆ ~NodeManager()

template<typename BuildT>

~NodeManager | ( |  | ) |
| delete

## Member Function Documentation

## ◆ grid() [1/2]

template<typename BuildT>

__hostdev__ GridT & grid | ( |  | ) |
| inline

Return a reference to the grid.

## ◆ grid() [2/2]

template<typename BuildT>

__hostdev__ const GridT & grid | ( |  | ) | const
| inline

## ◆ isLinear() [1/2]

template<typename BuildT>

__hostdev__ bool isLinear | ( |  | ) | const
| inline

return true if the nodes have both fixed size and are arranged breadth-first in memory. This allows for direct and memory-efficient linear access to nodes.

## ◆ isLinear() [2/2]

template<typename BuildT>

__hostdev__ bool isLinear | ( | const GridT & | grid | ) |
| inline static

return true if the nodes have both fixed size and are arranged breadth-first in memory. This allows for direct and memory-efficient linear access to nodes.

## ◆ leaf() [1/2]

template<typename BuildT>

__hostdev__ Node0 & leaf | ( | uint32_t | i | ) |
| inline

## ◆ leaf() [2/2]

template<typename BuildT>

__hostdev__ const Node0 & leaf | ( | uint32_t | i | ) | const
| inline

Return the i'th leaf node with respect to breadth-first ordering.

## ◆ leafCount()

template<typename BuildT>

__hostdev__ uint64_t leafCount | ( |  | ) | const
| inline

## ◆ lower() [1/2]

template<typename BuildT>

__hostdev__ Node1 & lower | ( | uint32_t | i | ) |
| inline

## ◆ lower() [2/2]

template<typename BuildT>

__hostdev__ const Node1 & lower | ( | uint32_t | i | ) | const
| inline

Return the i'th lower internal node with respect to breadth-first ordering.

## ◆ lowerCount()

template<typename BuildT>

__hostdev__ uint64_t lowerCount | ( |  | ) | const
| inline

## ◆ memUsage() [1/2]

template<typename BuildT>

__hostdev__ uint64_t memUsage | ( |  | ) | const
| inline

Return the memory footprint in bytes of this instance.

## ◆ memUsage() [2/2]

template<typename BuildT>

__hostdev__ uint64_t memUsage | ( | const GridT & | grid | ) |
| inline static

Return the memory footprint in bytes of the NodeManager derived from the specified grid.

## ◆ node() [1/2]

template<typename BuildT>
template<int LEVEL>

__hostdev__ NodeT< LEVEL > & node | ( | uint32_t | i | ) |
| inline

Return the i'th node with respect to breadth-first ordering.

## ◆ node() [2/2]

template<typename BuildT>
template<int LEVEL>

__hostdev__ const NodeT< LEVEL > & node | ( | uint32_t | i | ) | const
| inline

Return the i'th leaf node with respect to breadth-first ordering.

## ◆ nodeCount()

template<typename BuildT>

__hostdev__ uint64_t nodeCount | ( | int | level | ) | const
| inline

Return the number of tree nodes at the specified level.

0 is leaf, 1 is lower internal, and 2 is upper internal level

## ◆ operator=() [1/2]

template<typename BuildT>

NodeManager & operator= | ( | const NodeManager< BuildT > & |  | ) |
| delete

## ◆ operator=() [2/2]

template<typename BuildT>

NodeManager & operator= | ( | NodeManager< BuildT > && |  | ) |
| delete

## ◆ root() [1/2]

template<typename BuildT>

__hostdev__ RootT & root | ( |  | ) |
| inline

Return a reference to the root.

## ◆ root() [2/2]

template<typename BuildT>

__hostdev__ const RootT & root | ( |  | ) | const
| inline

## ◆ tree() [1/2]

template<typename BuildT>

__hostdev__ TreeT & tree | ( |  | ) |
| inline

Return a reference to the tree.

## ◆ tree() [2/2]

template<typename BuildT>

__hostdev__ const TreeT & tree | ( |  | ) | const
| inline

## ◆ upper() [1/2]

template<typename BuildT>

__hostdev__ Node2 & upper | ( | uint32_t | i | ) |
| inline

## ◆ upper() [2/2]

template<typename BuildT>

__hostdev__ const Node2 & upper | ( | uint32_t | i | ) | const
| inline

Return the i'th upper internal node with respect to breadth-first ordering.

## ◆ upperCount()

template<typename BuildT>

__hostdev__ uint64_t upperCount | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ FIXED_SIZE

template<typename BuildT>

bool FIXED_SIZE = Node0::FIXED_SIZE && Node1::FIXED_SIZE && Node2::FIXED_SIZE
| static constexpr