HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::ReadAccessor< BuildT,-1,-1,-1 > Class Template Reference

A read-only value accessor with three levels of node caching. This allows for inverse tree traversal during lookup, which is on average significantly faster than calling the equivalent method on the tree (i.e. top-down traversal). More...

#include <NanoVDB.h>

Public Types

using BuildType = BuildT
 
using ValueType = typename RootT::ValueType
 
using CoordType = typename RootT::CoordType
 

Public Member Functions

__hostdev__ ReadAccessor (const RootT &root)
 Constructor from a root node. More...
 
__hostdev__ ReadAccessor (const GridT &grid)
 Constructor from a grid. More...
 
__hostdev__ ReadAccessor (const TreeT &tree)
 Constructor from a tree. More...
 
__hostdev__ void clear ()
 Reset this access to its initial state, i.e. with an empty cache Noop since this template specialization has no cache. More...
 
__hostdev__ const RootTroot () const
 
 ReadAccessor (const ReadAccessor &)=default
 Defaults constructors. More...
 
 ~ReadAccessor ()=default
 
ReadAccessoroperator= (const ReadAccessor &)=default
 
__hostdev__ ValueType getValue (const CoordType &ijk) const
 
__hostdev__ ValueType getValue (int i, int j, int k) const
 
__hostdev__ ValueType operator() (const CoordType &ijk) const
 
__hostdev__ ValueType operator() (int i, int j, int k) const
 
__hostdev__ auto getNodeInfo (const CoordType &ijk) const
 
__hostdev__ bool isActive (const CoordType &ijk) const
 
__hostdev__ bool probeValue (const CoordType &ijk, ValueType &v) const
 
__hostdev__ const LeafTprobeLeaf (const CoordType &ijk) const
 
template<typename RayT >
__hostdev__ uint32_t getDim (const CoordType &ijk, const RayT &ray) const
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto get (const CoordType &ijk, ArgsT &&...args) const
 
template<typename OpT , typename... ArgsT>
__hostdev__ auto set (const CoordType &ijk, ArgsT &&...args) const
 

Static Public Attributes

static const int CacheLevels = 0
 

Friends

template<typename >
class RootNode
 Allow nodes to insert themselves into the cache. More...
 
template<typename , uint32_t >
class InternalNode
 
template<typename , typename , template< uint32_t > class, uint32_t >
class LeafNode
 

Detailed Description

template<typename BuildT>
class nanovdb::ReadAccessor< BuildT,-1,-1,-1 >

A read-only value accessor with three levels of node caching. This allows for inverse tree traversal during lookup, which is on average significantly faster than calling the equivalent method on the tree (i.e. top-down traversal).

Note
By virtue of the fact that a value accessor accelerates random access operations by re-using cached access patterns, this access should be reused for multiple access operations. In other words, never create an instance of this accessor for a single access only. In general avoid single access operations with this accessor, and if that is not possible call the corresponding method on the tree instead.
Warning
Since this ReadAccessor internally caches raw pointers to the nodes of the tree structure, it is not safe to copy between host and device, or even to share among multiple threads on the same host or device. However, it is light-weight so simple instantiate one per thread (on the host and/or device).

Used to accelerated random access into a VDB tree. Provides on average O(1) random access operations by means of inverse tree traversal, which amortizes the non-const time complexity of the root node.

Definition at line 6533 of file NanoVDB.h.

Member Typedef Documentation

template<typename BuildT >
using nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::BuildType = BuildT

Definition at line 6544 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::CoordType = typename RootT::CoordType

Definition at line 6546 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::ValueType = typename RootT::ValueType

Definition at line 6545 of file NanoVDB.h.

Constructor & Destructor Documentation

template<typename BuildT >
__hostdev__ nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::ReadAccessor ( const RootT root)
inline

Constructor from a root node.

Definition at line 6563 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::ReadAccessor ( const GridT grid)
inline

Constructor from a grid.

Definition at line 6569 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::ReadAccessor ( const TreeT tree)
inline

Constructor from a tree.

Definition at line 6575 of file NanoVDB.h.

template<typename BuildT >
nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::ReadAccessor ( const ReadAccessor< BuildT,-1,-1,-1 > &  )
default

Defaults constructors.

template<typename BuildT >
nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::~ReadAccessor ( )
default

Member Function Documentation

template<typename BuildT >
__hostdev__ void nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::clear ( )
inline

Reset this access to its initial state, i.e. with an empty cache Noop since this template specialization has no cache.

Definition at line 6582 of file NanoVDB.h.

template<typename BuildT >
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::get ( const CoordType ijk,
ArgsT &&...  args 
) const
inline

Definition at line 6646 of file NanoVDB.h.

template<typename BuildT >
template<typename RayT >
__hostdev__ uint32_t nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::getDim ( const CoordType ijk,
const RayT &  ray 
) const
inline

Definition at line 6641 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ auto nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::getNodeInfo ( const CoordType ijk) const
inline

Definition at line 6598 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ ValueType nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::getValue ( const CoordType ijk) const
inline

Definition at line 6591 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ ValueType nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::getValue ( int  i,
int  j,
int  k 
) const
inline

Definition at line 6595 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ bool nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::isActive ( const CoordType ijk) const
inline

Definition at line 6599 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ ValueType nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::operator() ( const CoordType ijk) const
inline

Definition at line 6596 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ ValueType nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::operator() ( int  i,
int  j,
int  k 
) const
inline

Definition at line 6597 of file NanoVDB.h.

template<typename BuildT >
ReadAccessor& nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::operator= ( const ReadAccessor< BuildT,-1,-1,-1 > &  )
default
template<typename BuildT >
__hostdev__ const LeafT* nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::probeLeaf ( const CoordType ijk) const
inline

Definition at line 6601 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ bool nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::probeValue ( const CoordType ijk,
ValueType v 
) const
inline

Definition at line 6600 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ const RootT& nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::root ( ) const
inline

Definition at line 6584 of file NanoVDB.h.

template<typename BuildT >
template<typename OpT , typename... ArgsT>
__hostdev__ auto nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::set ( const CoordType ijk,
ArgsT &&...  args 
) const
inline

Definition at line 6652 of file NanoVDB.h.

Friends And Related Function Documentation

template<typename BuildT >
template<typename , uint32_t >
friend class InternalNode
friend

Definition at line 6662 of file NanoVDB.h.

template<typename BuildT >
template<typename , typename , template< uint32_t > class, uint32_t >
friend class LeafNode
friend

Definition at line 6664 of file NanoVDB.h.

template<typename BuildT >
template<typename >
friend class RootNode
friend

Allow nodes to insert themselves into the cache.

Definition at line 6660 of file NanoVDB.h.

Member Data Documentation

template<typename BuildT >
const int nanovdb::ReadAccessor< BuildT,-1,-1,-1 >::CacheLevels = 0
static

Definition at line 6548 of file NanoVDB.h.


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