OpenVDB: Checksum Class Reference

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

__hostdev__ Checksum | ( |  | ) |
| inline

default constructor initiates checksum to EMPTY

## ◆ Checksum() [2/3]

__hostdev__ Checksum | ( | uint32_t | head,
|  | uint32_t | tail )
| inline

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

Parameters

  head | Initial 32bit CRC checksum of grid, tree and root data
  tail | Initial 32bit CRC checksum of all the nodes and blind data

## ◆ Checksum() [3/3]

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

Parameters

  checksum |
  mode |

## Member Function Documentation

## ◆ checksum() [1/3]

__hostdev__ uint64_t checksum | ( |  | ) | const
| inline

return the 64 bit checksum of this instance

## ◆ checksum() [2/3]

__hostdev__ uint32_t & checksum | ( | int | i | ) |
| inline

## ◆ checksum() [3/3]

__hostdev__ uint32_t checksum | ( | int | i | ) | const
| inline

## ◆ disable()

__hostdev__ void disable | ( |  | ) |
| inline

## ◆ full() [1/2]

__hostdev__ uint64_t & full | ( |  | ) |
| inline

## ◆ full() [2/2]

__hostdev__ uint64_t full | ( |  | ) | const
| inline

## ◆ head() [1/2]

__hostdev__ uint32_t & head | ( |  | ) |
| inline

## ◆ head() [2/2]

__hostdev__ uint32_t head | ( |  | ) | const
| inline

## ◆ isEmpty()

__hostdev__ bool isEmpty | ( |  | ) | const
| inline

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

## ◆ isFull()

__hostdev__ bool isFull | ( |  | ) | const
| inline

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

## ◆ isHalf()

__hostdev__ bool isHalf | ( |  | ) | const
| inline

## ◆ isPartial()

__hostdev__ bool isPartial | ( |  | ) | const
| inline

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

## ◆ mode()

__hostdev__ CheckMode mode | ( |  | ) | const
| inline

return the mode of the 64 bit checksum

## ◆ operator!=()

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

return true if the checksums are not identical

Parameters

  rhs | other Checksum

## ◆ operator==()

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

return true if the checksums are identical

Parameters

  rhs | other Checksum

## ◆ tail() [1/2]

__hostdev__ uint32_t & tail | ( |  | ) |
| inline

## ◆ tail() [2/2]

__hostdev__ 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