PCL
Non-Cryptographic Hash Functions

## Functions

uint32 pcl::Hash32 (const void *data, size_type size, uint32 seed=0) noexcept

uint64 pcl::Hash64 (const void *data, size_type size, uint64 seed=0) noexcept

## ◆ Hash32()

 uint32 pcl::Hash32 ( const void * data, size_type size, uint32 seed = 0 )
inlinenoexcept

Computes a 32-bit non-cryptographic hash function.

Parameters
 data Address of the first byte of the input data block. size Length in bytes of the input data block. seed Optional seed value for initialization of the hash function. If seed is zero or is not specified, the seed will be set equal to the length of the data block.

Returns a 32-bit hash value computed from the input data block.

Test vector: "The quick brown fox jumps over the lazy dog"
Hash32 checksum = 752cd1b8
Test vector: "" (empty string)
Hash32 checksum = 2cc5d05

This function implements the xxHash algorithm by Yann Collet. Our code is an adaptation of the original code by the author:

https://github.com/Cyan4973/xxHash

The original code has been released under the BSD 2-Clause License:

Definition at line 4734 of file Math.h.

## ◆ Hash64()

 uint64 pcl::Hash64 ( const void * data, size_type size, uint64 seed = 0 )
inlinenoexcept

Computes a 64-bit non-cryptographic hash function.

Parameters
 data Address of the first byte of the input data block. size Length in bytes of the input data block. seed Optional seed value for initialization of the hash function. If seed is zero or is not specified, the seed will be set equal to the length of the data block.

Returns a 64-bit hash value computed from the input data block.

Test vector: "The quick brown fox jumps over the lazy dog"
Hash64 checksum = 9a11f5e9468d7425
Test vector: "" (empty string)
Hash64 checksum = ef46db3751d8e999

This function implements the xxHash algorithm by Yann Collet. Our code is an adaptation of the original code by the author:

https://github.com/Cyan4973/xxHash