Go to the source code of this file.
|
vl_hash | vlHashString (const void *data, vl_memsize_t dataSize) |
| Hashes the specified string.
|
|
vl_hash | vlHash8 (const void *data, vl_memsize_t) |
| Generates a hash code for the 8-bit sequence at the specified address.
|
|
vl_hash | vlHash16 (const void *data, vl_memsize_t) |
| 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) |
| Generates a hash code for the 32-bit sequence at the specified address.
|
|
vl_hash | vlHash64 (const void *data, vl_memsize_t) |
| Generates a hash code for the 64-bit sequence at the specified address.
|
|
◆ VL_HASH_BYTES
◆ VL_HASH_DOUBLE
#define VL_HASH_DOUBLE vlHashDouble |
◆ VL_HASH_FLOAT
#define VL_HASH_FLOAT vlHashFloat |
◆ VL_HASH_INT16
◆ VL_HASH_INT32
◆ VL_HASH_INT64
◆ VL_HASH_INT8
◆ VL_HASH_STRING
◆ VL_HASH_UINT16
◆ VL_HASH_UINT32
◆ VL_HASH_UINT64
◆ VL_HASH_UINT8
◆ vlHashChar
◆ vlHashCombine
#define vlHashCombine |
( |
| a, |
|
|
| b ) (vl_hash)(((a) ^ (b)) + 0b11101111100100101101101011001011 + ((a) << 6) + ((a) >> 2)) |
Combine two instances of vl_hash.
Based on the algorithm in the Boost C++ libraries by the same name. The magic number in this macro is intended to act as random bits, where each is equally likely to be a 1 or 0 with no relationships.
- Parameters
-
a | vl_hash value |
b | vl_hash value |
- Returns
- merged hash
◆ vlHashInt
◆ vlHashLong
◆ vlHashShort
◆ vlHashUChar
◆ vlHashUInt
◆ vlHashULong
◆ vlHashUShort
◆ vl_hash
Hash function return type.
◆ vl_hash_function
Hash function typedef.
This function definition
- Parameters
-
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. |
◆ vlHash16()
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.
- Parameters
-
- Returns
- hash code
◆ vlHash32()
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.
- Parameters
-
- Returns
- hash code
◆ vlHash64()
Generates a hash code for the 64-bit sequence at the specified address.
The returned value will equal the value of the original sequence.
- Parameters
-
- Returns
- hash code
◆ vlHash8()
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.
- Parameters
-
- Returns
- hash code
◆ vlHashString()