OpenVDB 13.1.0
Loading...
Searching...
No Matches
Checksum Class Reference

Class that encapsulates two CRC32 checksums, one for the Grid, Tree and Root node meta data and one for the remaining grid nodes. More...

#include <nanovdb/NanoVDB.h>

Public Member Functions

 Checksum ()
 default constructor initiates checksum to EMPTY
 Checksum (uint32_t head, uint32_t tail)
 Constructor that allows the two 32bit checksums to be initiated explicitly.
 Checksum (uint64_t checksum, CheckMode mode=CheckMode::Full)
uint64_t checksum () const
 return the 64 bit checksum of this instance
uint32_t & checksum (int i)
uint32_t checksum (int i) const
uint64_t full () const
uint64_t & full ()
uint32_t head () const
uint32_t & head ()
uint32_t tail () const
uint32_t & tail ()
bool isPartial () const
 return true if the 64 bit checksum is partial, i.e. of head only
bool isHalf () const
bool isFull () const
 return true if the 64 bit checksum is fill, i.e. of both had and nodes
bool isEmpty () const
 return true if the 64 bit checksum is disables (unset)
void disable ()
CheckMode mode () const
 return the mode of the 64 bit checksum
bool operator== (const Checksum &rhs) const
 return true if the checksums are identical
bool operator!= (const Checksum &rhs) const
 return true if the checksums are not identical

Static Public Attributes

static constexpr uint32_t EMPTY32 = ~uint32_t{0}
static constexpr uint64_t EMPTY64 = ~uint64_t(0)

Detailed Description

Class that encapsulates two CRC32 checksums, one for the Grid, Tree and Root node meta data and one for the remaining grid nodes.

Constructor & Destructor Documentation

◆ Checksum() [1/3]

Checksum ( )
inline

default constructor initiates checksum to EMPTY

◆ Checksum() [2/3]

Checksum ( uint32_t head,
uint32_t tail )
inline

Constructor that allows the two 32bit checksums to be initiated explicitly.

Parameters
headInitial 32bit CRC checksum of grid, tree and root data
tailInitial 32bit CRC checksum of all the nodes and blind data

◆ Checksum() [3/3]

Checksum ( uint64_t checksum,
CheckMode mode = CheckMode::Full )
inline
Parameters
checksum
mode

Member Function Documentation

◆ checksum() [1/3]

uint64_t checksum ( ) const
inline

return the 64 bit checksum of this instance

◆ checksum() [2/3]

uint32_t & checksum ( int i)
inline

◆ checksum() [3/3]

uint32_t checksum ( int i) const
inline

◆ disable()

void disable ( )
inline

◆ full() [1/2]

uint64_t & full ( )
inline

◆ full() [2/2]

uint64_t full ( ) const
inline

◆ head() [1/2]

uint32_t & head ( )
inline

◆ head() [2/2]

uint32_t head ( ) const
inline

◆ isEmpty()

bool isEmpty ( ) const
inline

return true if the 64 bit checksum is disables (unset)

◆ isFull()

bool isFull ( ) const
inline

return true if the 64 bit checksum is fill, i.e. of both had and nodes

◆ isHalf()

bool isHalf ( ) const
inline

◆ isPartial()

bool isPartial ( ) const
inline

return true if the 64 bit checksum is partial, i.e. of head only

◆ mode()

CheckMode mode ( ) const
inline

return the mode of the 64 bit checksum

◆ operator!=()

bool operator!= ( const Checksum & rhs) const
inline

return true if the checksums are not identical

Parameters
rhsother Checksum

◆ operator==()

bool operator== ( const Checksum & rhs) const
inline

return true if the checksums are identical

Parameters
rhsother Checksum

◆ tail() [1/2]

uint32_t & tail ( )
inline

◆ tail() [2/2]

uint32_t tail ( ) const
inline

Member Data Documentation

◆ EMPTY32

uint32_t EMPTY32 = ~uint32_t{0}
staticconstexpr

◆ EMPTY64

uint64_t EMPTY64 = ~uint64_t(0)
staticconstexpr

◆ mCRC32

uint32_t mCRC32[2]

◆ mCRC64

uint64_t mCRC64