HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::GridChecksum 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 <GridChecksum.h>

Public Member Functions

 GridChecksum ()
 default constructor initiates checksum to EMPTY More...
 
 GridChecksum (uint32_t head, uint32_t tail)
 Constructor that allows the two 32bit checksums to be initiated explicitly. More...
 
 GridChecksum (uint64_t checksum, ChecksumMode mode=ChecksumMode::Full)
 
uint64_t checksum () const
 return the 64 bit checksum of this instance More...
 
uint32_t & checksum (int i)
 return 32 bit (crc32) checksum of this instance More...
 
uint32_t checksum (int i) const
 return 32 bit (crc32) checksum of this instance More...
 
bool isPartial () const
 return true if the 64 bit checksum is partial, i.e. of head only More...
 
bool isFull () const
 return true if the 64 bit checksum is fill, i.e. of both had and nodes More...
 
bool isEmpty () const
 return true if the 64 bit checksum is disables (unset) More...
 
ChecksumMode mode () const
 return the mode of the 64 bit checksum More...
 
ChecksumMode operator() (const GridData &gridData, ChecksumMode mode=ChecksumMode::Full)
 compute checksum of gridData using a 4KB blocked approach More...
 
bool operator== (const GridChecksum &rhs) const
 return true if the checksums are identical More...
 
bool operator!= (const GridChecksum &rhs) const
 return true if the checksums are not identical More...
 

Static Public Attributes

static constexpr uint64_t EMPTY = ~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.

Definition at line 148 of file GridChecksum.h.

Constructor & Destructor Documentation

nanovdb::GridChecksum::GridChecksum ( )
inline

default constructor initiates checksum to EMPTY

Definition at line 162 of file GridChecksum.h.

nanovdb::GridChecksum::GridChecksum ( 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

Definition at line 167 of file GridChecksum.h.

nanovdb::GridChecksum::GridChecksum ( uint64_t  checksum,
ChecksumMode  mode = ChecksumMode::Full 
)
inline
Parameters
checksum
mode

Definition at line 172 of file GridChecksum.h.

Member Function Documentation

uint64_t nanovdb::GridChecksum::checksum ( ) const
inline

return the 64 bit checksum of this instance

Definition at line 178 of file GridChecksum.h.

uint32_t& nanovdb::GridChecksum::checksum ( int  i)
inline

return 32 bit (crc32) checksum of this instance

Parameters
iindex of value 0 or 1 indicated the 32 bit checksum of the head or nodes
Returns
non-const reference of the i'th 32bit checksum

Definition at line 183 of file GridChecksum.h.

uint32_t nanovdb::GridChecksum::checksum ( int  i) const
inline

return 32 bit (crc32) checksum of this instance

Parameters
iindex of value 0 or 1 indicated the 32 bit checksum of the head or nodes
Returns
copy of the i'th 32bit checksum

Definition at line 188 of file GridChecksum.h.

bool nanovdb::GridChecksum::isEmpty ( ) const
inline

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

Definition at line 197 of file GridChecksum.h.

bool nanovdb::GridChecksum::isFull ( ) const
inline

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

Definition at line 194 of file GridChecksum.h.

bool nanovdb::GridChecksum::isPartial ( ) const
inline

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

Definition at line 191 of file GridChecksum.h.

ChecksumMode nanovdb::GridChecksum::mode ( ) const
inline

return the mode of the 64 bit checksum

Definition at line 200 of file GridChecksum.h.

bool nanovdb::GridChecksum::operator!= ( const GridChecksum rhs) const
inline

return true if the checksums are not identical

Parameters
rhsother GridChecksum

Definition at line 224 of file GridChecksum.h.

ChecksumMode nanovdb::GridChecksum::operator() ( const GridData &  gridData,
ChecksumMode  mode = ChecksumMode::Full 
)
inline

compute checksum of gridData using a 4KB blocked approach

Parameters
gridDataReference to GridData
modeMode of the checksum computation

Definition at line 231 of file GridChecksum.h.

bool nanovdb::GridChecksum::operator== ( const GridChecksum rhs) const
inline

return true if the checksums are identical

Parameters
rhsother GridChecksum

Definition at line 220 of file GridChecksum.h.

Member Data Documentation

constexpr uint64_t nanovdb::GridChecksum::EMPTY = ~uint64_t(0)
static

Definition at line 159 of file GridChecksum.h.

uint64_t nanovdb::GridChecksum::mChecksum

Definition at line 154 of file GridChecksum.h.

uint32_t nanovdb::GridChecksum::mCRC[2]

Definition at line 154 of file GridChecksum.h.


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