Loading...
Searching...
No Matches
GridChecksum.h File Reference

Computes a pair of 32bit checksums, og a Grid, by means of Cyclic Redundancy Check (CRC). More...

`#include <algorithm>`
`#include <array>`
`#include <vector>`
`#include <cstdint>`
`#include <cstddef>`
`#include <numeric>`
`#include <type_traits>`
`#include "../NanoVDB.h"`
`#include "GridHandle.h"`
`#include "ForEach.h"`
`#include "NodeManager.h"`

Go to the source code of this file.

## Classes

class | CRC32
| Class that computes the Cyclic Redundancy Check (CRC). More...
class | GridChecksum
| Class that encapsulates two CRC32 checksums, one for the Grid, Tree and Root node meta data and one for the remaining grid nodes. More...

## Namespaces

namespace | nanovdb

## Enumerations

enum class | ChecksumMode : uint32_t { Disable = 0 , Partial = 1 , Full = 2 , Default = 1 , End = 3 }
| List of different modes for computing for a checksum. More...

## Functions

template<typename ValueT>
uint64_t | checksum (const NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Default)
| Return the (2 x CRC32) checksum of the specified grid.
template<typename ValueT>
bool | validateChecksum (const NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Default)
| Return true if the checksum of the grid matches the expected value already encoded into the grid's meta data.
template<typename ValueT>
void | updateChecksum (NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Default)
| Updates the checksum of a grid.
std::uint_fast32_t | crc32 (const void *data, size_t size)
| Return the CRC32 checksum of the raw data of size.
template<typename IterT>
std::uint_fast32_t | crc32 (IterT begin, IterT end)
| Return the CRC32 checksum of the content pointed to be the iterator.

## Detailed Description

Computes a pair of 32bit checksums, og a Grid, by means of Cyclic Redundancy Check (CRC).

Author
  Ken Museth

A CRC32 is the 32 bit remainder, or residue, of binary division of a message, by a polynomial.