HDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::crc32 Namespace Reference

Functions

__hostdev__ void initLut (uint32_t lut[256], uint32_t n)
 Initiate single entry in look-up-table for CRC32 computations. More...
 
__hostdev__ void initLut (uint32_t lut[256])
 Initiate entire look-up-table for CRC32 computations. More...
 
std::unique_ptr< uint32_t[]> createLut ()
 Create and initiate entire look-up-table for CRC32 computations. More...
 
__hostdev__ uint32_t checksum (const void *data, size_t size, uint32_t crc=0)
 Compute crc32 checksum of data of size bytes (without a lookup table)) More...
 
__hostdev__ uint32_t checksum (const void *begin, const void *end, uint32_t crc=0)
 Compute crc32 checksum of data between begin and end. More...
 
__hostdev__ uint32_t checksum (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. More...
 
__hostdev__ uint32_t checksum (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. More...
 

Function Documentation

__hostdev__ uint32_t nanovdb::crc32::checksum ( const void data,
size_t  size,
uint32_t  crc = 0 
)
inline

Compute crc32 checksum of data of size bytes (without a lookup table))

Parameters
datapointer to beginning of data
sizebyte size of data
crcinitial value of crc32 checksum
Returns
return crc32 checksum of data

Definition at line 96 of file GridChecksum.h.

__hostdev__ uint32_t nanovdb::crc32::checksum ( const void begin,
const void end,
uint32_t  crc = 0 
)
inline

Compute crc32 checksum of data between begin and end.

Parameters
beginpoints to beginning of data
endpoints to end of , (exclusive)
crcinitial value of crc32 checksum
Returns
return crc32 checksum

Definition at line 111 of file GridChecksum.h.

__hostdev__ uint32_t nanovdb::crc32::checksum ( const void data,
size_t  size,
const uint32_t  lut[256],
uint32_t  crc = 0 
)
inline

Compute crc32 checksum of data with size bytes using a lookup table.

Parameters
datapointer to begenning of data
sizebyte size
lutpointer to loopup table for accelerated crc32 computation
crcinitial value of the checksum
Returns
crc32 checksum of data with size bytes

Definition at line 124 of file GridChecksum.h.

__hostdev__ uint32_t nanovdb::crc32::checksum ( const void begin,
const void end,
const uint32_t  lut[256],
uint32_t  crc = 0 
)
inline

Compute crc32 checksum of data between begin and end using a lookup table.

Parameters
beginpoints to beginning of data
endpoints to end of , (exclusive)
lutpointer to loopup table for accelerated crc32 computation
crcinitial value of crc32 checksum
Returns
return crc32 checksum

Definition at line 137 of file GridChecksum.h.

std::unique_ptr<uint32_t[]> nanovdb::crc32::createLut ( )
inline

Create and initiate entire look-up-table for CRC32 computations.

Returns
returns a unique pointer to the lookup table of size 256.

Definition at line 84 of file GridChecksum.h.

__hostdev__ void nanovdb::crc32::initLut ( uint32_t  lut[256],
uint32_t  n 
)
inline

Initiate single entry in look-up-table for CRC32 computations.

Parameters
lutpointer of size 256 for look-up-table
nentry in table (assumed n < 256)

Definition at line 72 of file GridChecksum.h.

__hostdev__ void nanovdb::crc32::initLut ( uint32_t  lut[256])
inline

Initiate entire look-up-table for CRC32 computations.

Parameters
lutpointer of size 256 for look-up-table

Definition at line 80 of file GridChecksum.h.