OpenVDB: LeafFnBase< CoordT, MaskT, LOG2DIM > Struct Template Reference

OpenVDB 12.1.1

Loading...
Searching...
No Matches
LeafFnBase< CoordT, MaskT, LOG2DIM > Struct Template Reference

Base-class for quantized float leaf nodes. More...

`#include <nanovdb/NanoVDB.h>`

Inheritance diagram for LeafFnBase< CoordT, MaskT, LOG2DIM >:

## Public Types
using | ValueType = float
using | FloatType = float

## Public Member Functions
__hostdev__ void | init (float min, float max, uint8_t bitWidth)
__hostdev__ void | setOn (uint32_t offset)
__hostdev__ float | getMin () const
| return the quantized minimum of the active values in this node
__hostdev__ float | getMax () const
| return the quantized maximum of the active values in this node
__hostdev__ float | getAvg () const
| return the quantized average of the active values in this node
__hostdev__ float | getDev () const
| return the quantized standard deviation of the active values in this node
__hostdev__ void | setMin (float min)
__hostdev__ void | setMax (float max)
__hostdev__ void | setAvg (float avg)
__hostdev__ void | setDev (float dev)
template<typename T>
__hostdev__ void | setOrigin (const T &ijk)

## Static Public Member Functions
static __hostdev__ uint64_t | memUsage ()
static __hostdev__ bool | hasStats ()
static __hostdev__ constexpr uint32_t | padding ()
| Return padding of this class in bytes, due to aliasing and 32B alignment.

## Public Attributes
CoordT | mBBoxMin
uint8_t | mBBoxDif [3]
uint8_t | mFlags
MaskT< LOG2DIM > | mValueMask
float | mMinimum
float | mQuantum
uint16_t | mMin
uint16_t | mMax
uint16_t | mAvg
uint16_t | mDev

## Detailed Description

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>
struct nanovdb::LeafFnBase< CoordT, MaskT, LOG2DIM >

Base-class for quantized float leaf nodes.

## Member Typedef Documentation

## ◆ FloatType

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

using FloatType = float

## ◆ ValueType

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

using ValueType = float

## Member Function Documentation

## ◆ getAvg()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ float getAvg | ( |  | ) | const
| inline

return the quantized average of the active values in this node

## ◆ getDev()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ float getDev | ( |  | ) | const
| inline

return the quantized standard deviation of the active values in this node

Note
  0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1

## ◆ getMax()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ float getMax | ( |  | ) | const
| inline

return the quantized maximum of the active values in this node

## ◆ getMin()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ float getMin | ( |  | ) | const
| inline

return the quantized minimum of the active values in this node

## ◆ hasStats()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ bool hasStats | ( |  | ) |
| inlinestatic

## ◆ init()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ void init | ( | float | min,
|  | float | max,
|  | uint8_t | bitWidth )
| inline

## ◆ memUsage()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ uint64_t memUsage | ( |  | ) |
| inlinestatic

## ◆ padding()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ constexpr uint32_t padding | ( |  | ) |
| inlinestaticconstexpr

Return padding of this class in bytes, due to aliasing and 32B alignment.

Note
  The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

## ◆ setAvg()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ void setAvg | ( | float | avg | ) |
| inline

Note
  min <= avg <= max or 0 <= (avg-min)/(min-max) <= 1

## ◆ setDev()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ void setDev | ( | float | dev | ) |
| inline

Note
  0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1

## ◆ setMax()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ void setMax | ( | float | max | ) |
| inline

Note
  min <= X <= max or 0 <= (X-min)/(min-max) <= 1

## ◆ setMin()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ void setMin | ( | float | min | ) |
| inline

Note
  min <= X <= max or 0 <= (X-min)/(min-max) <= 1

## ◆ setOn()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

__hostdev__ void setOn | ( | uint32_t | offset | ) |
| inline

## ◆ setOrigin()

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>
template<typename T>

__hostdev__ void setOrigin | ( | const T & | ijk | ) |
| inline

## Member Data Documentation

## ◆ mAvg

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

uint16_t mAvg

## ◆ mBBoxDif

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

uint8_t mBBoxDif[3]

## ◆ mBBoxMin

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

CoordT mBBoxMin

## ◆ mDev

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

uint16_t mDev

## ◆ mFlags

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

uint8_t mFlags

## ◆ mMax

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

uint16_t mMax

## ◆ mMin

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

uint16_t mMin

## ◆ mMinimum

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

float mMinimum

## ◆ mQuantum

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

float mQuantum

## ◆ mValueMask

template<typename CoordT, template< uint32_t > class MaskT, uint32_t LOG2DIM>

MaskT<LOG2DIM> mValueMask