Veritable Lasagna
An Allocator & Data Structure Library for C.
|
Functions | |
vl_hash | vlHashString (const void *data, vl_memsize_t dataSize) |
Hashes the specified string. | |
vl_hash | vlHash8 (const void *data, vl_memsize_t s) |
Generates a hash code for the 8-bit sequence at the specified address. | |
vl_hash | vlHash16 (const void *data, vl_memsize_t s) |
Generates a hash code for the 16-bit sequence at the specified address. This is a direct bitcast of an 8-bit sequence to a 64-bit sequence. The returned value will equal the value of the original sequence. | |
vl_hash | vlHash32 (const void *data, vl_memsize_t s) |
Generates a hash code for the 32-bit sequence at the specified address. | |
vl_hash | vlHash64 (const void *data, vl_memsize_t s) |
Generates a hash code for the 64-bit sequence at the specified address. | |
vl_hash vlHash16 | ( | const void * | data, |
vl_memsize_t | s ) |
Generates a hash code for the 16-bit sequence at the specified address. This is a direct bitcast of an 8-bit sequence to a 64-bit sequence. The returned value will equal the value of the original sequence.
data | pointer |
vl_hash vlHash32 | ( | const void * | data, |
vl_memsize_t | s ) |
Generates a hash code for the 32-bit sequence at the specified address.
This is a direct bitcast of an 32-bit sequence to a 64-bit sequence. The returned value will equal the value of the original sequence.
data | pointer |
vl_hash vlHash64 | ( | const void * | data, |
vl_memsize_t | s ) |
Generates a hash code for the 64-bit sequence at the specified address.
The returned value will equal the value of the original sequence.
data | pointer |
vl_hash vlHash8 | ( | const void * | data, |
vl_memsize_t | s ) |
Generates a hash code for the 8-bit sequence at the specified address.
This is a direct bitcast of an 8-bit sequence to a 64-bit sequence. The returned value will equal the value of the original sequence.
data | pointer |
vl_hash vlHashString | ( | const void * | data, |
vl_memsize_t | dataSize ) |
Hashes the specified string.
Uses the FNV-1A-64 string hashing algorithm. See here: https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
data | read-only pointer to the data that will be hashed |
dataSize | length of the data, in bytes. Usually this can be ignored unless the data is variable in length. |