![]() |
OpenVDB 13.1.0
|
Computes a pair of uint32_t checksums, of a Grid, by means of 32 bit Cyclic Redundancy Check (CRC32) More...
#include <algorithm>#include <array>#include <vector>#include <cstdint>#include <cstddef>#include <numeric>#include <type_traits>#include <memory>#include <nanovdb/NanoVDB.h>#include <nanovdb/util/ForEach.h>#include <nanovdb/NodeManager.h>Go to the source code of this file.
Classes | |
| struct | Crc32TailOld |
Namespaces | |
| namespace | nanovdb |
| Defines a simple memory pool used to call cub functions that use dynamic temporary storage. | |
| namespace | nanovdb::tools |
| namespace | nanovdb::util |
Macros | |
| #define | NANOVDB_CRC32_LOG2_BLOCK_SIZE 12 |
Functions | |
| Checksum | evalChecksum (const GridData *gridData, CheckMode mode=CheckMode::Default) |
Compute the (2 x CRC32) checksum of the specified gridData. | |
| Checksum | getChecksum (const GridData *gridData) |
| Extract the checksum of a grid. | |
| bool | validateChecksum (const GridData *gridData, CheckMode mode=CheckMode::Default) |
Return true if the checksum of gridData matches the expected value already encoded into the grid's meta data. | |
| void | updateChecksum (GridData *gridData, CheckMode mode) |
| Updates the checksum of a grid. | |
| void | updateChecksum (GridData *gridData) |
| Updates the checksum of a grid by preserving its mode. | |
| __hostdev__ void | initCrc32Lut (uint32_t lut[256], uint32_t n) |
| Initiate single entry in look-up-table for CRC32 computations. | |
| __hostdev__ void | initCrc32Lut (uint32_t lut[256]) |
| Initiate entire look-up-table for CRC32 computations. | |
| std::unique_ptr< uint32_t[]> | createCrc32Lut () |
| Create and initiate entire look-up-table for CRC32 computations. | |
| __hostdev__ uint32_t | crc32 (const void *data, size_t size, uint32_t crc=0) |
Compute crc32 checksum of data of size bytes (without a lookup table)) | |
| __hostdev__ uint32_t | crc32 (const void *begin, const void *end, uint32_t crc=0) |
Compute crc32 checksum of data between begin and end. | |
| __hostdev__ uint32_t | crc32 (const void *data, size_t size, const uint32_t lut[256], uint32_t crc=0) |
Compute crc32 checksum of data with size bytes using a lookup table. | |
| __hostdev__ uint32_t | crc32 (const void *begin, const void *end, const uint32_t lut[256], uint32_t crc=0) |
Compute crc32 checksum of data between begin and end using a lookup table. | |
| uint32_t | blockedCrc32 (const void *data, size_t size, const uint32_t *lut) |
| uint32_t | blockedCrc32 (const void *begin, const void *end, const uint32_t *lut) |
| __hostdev__ uint32_t | crc32Head (const GridData *gridData, const uint32_t *lut) |
| Compute the crc32 checksum of a grid's head, i.e. its GridData and TreeData, using a lookup table. GridData::mMagic and GridData::mChecksum are excluded. | |
| __hostdev__ uint32_t | crc32Head (const GridData *gridData) |
| template<typename ValueT> | |
| uint32_t | crc32TailOld (const NanoGrid< ValueT > *grid, const uint32_t *lut) |
| uint32_t | crc32Tail (const GridData *gridData, const uint32_t *lut) |
| template<typename ValueT> | |
| uint32_t | crc32Tail (const NanoGrid< ValueT > *grid, const uint32_t *lut) |
| template<typename ValueT> | |
| Checksum | evalChecksum (const NanoGrid< ValueT > *grid, CheckMode mode) |
| template<typename ValueT> | |
| Checksum | checksum (const NanoGrid< ValueT > *grid, CheckMode mode) |
| Checksum | checksum (const GridData *gridData, CheckMode mode) |
| template<typename ValueT> | |
| Checksum | checksum (const NanoGrid< ValueT > &grid, CheckMode mode) |
| template<typename ValueT> | |
| bool | validateChecksum (const NanoGrid< ValueT > *grid, CheckMode mode) |
| template<typename ValueT> | |
| bool | validateChecksum (const NanoGrid< ValueT > &grid, CheckMode mode) |
| template<typename ValueT> | |
| void | updateChecksum (NanoGrid< ValueT > *grid, CheckMode mode) |
| template<typename ValueT> | |
| void | updateChecksum (NanoGrid< ValueT > *grid) |
| template<typename ValueT> | |
| void | updateChecksum (NanoGrid< ValueT > &grid, CheckMode mode) |
| void | updateGridCount (GridData *data, uint32_t gridIndex, uint32_t gridCount) |
| Updates the ground index and count, as well as the head checksum if needed. | |
Computes a pair of uint32_t checksums, of a Grid, by means of 32 bit Cyclic Redundancy Check (CRC32)
A CRC32 is the 32 bit remainder, or residue, of binary division of a message, by a polynomial.
When serialized: [Grid,Tree][Root][ROOT TILES...][Node<5>...][Node<4>...][Leaf<3>...][BlindMeta...][BlindData...] checksum[2] before v32.6.0: <----------— [0] ------------><-----------— [1] ---------------> checksum[2] after v32.6.0: <—[0]---><-------------------------------------—[1]---------------------------------------->
| #define NANOVDB_CRC32_LOG2_BLOCK_SIZE 12 |