Go to the source code of this file.
|
| typedef vl_hash(* | vl_hash_function) (const void *data, vl_memsize_t dataSize) |
| | Hash function typedef.
|
| |
|
| VL_API vl_hash | vlHashString (const void *data, vl_memsize_t dataSize) |
| | Hashes the specified string.
|
| |
| VL_API vl_hash | vlHash8 (const void *data, vl_memsize_t) |
| | Generates a hash code for the 8-bit sequence at the specified address.
|
| |
| VL_API 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_API vl_hash | vlHash32 (const void *data, vl_memsize_t) |
| | Generates a hash code for the 32-bit sequence at the specified address.
|
| |
| VL_API 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)) + 0xEF92DACB + ((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_function
| typedef vl_hash(* vl_hash_function) (const void *data, vl_memsize_t dataSize) |
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()
| VL_API 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.
- Parameters
-
- Returns
- hash code
◆ vlHash32()
| VL_API 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.
- Parameters
-
- Returns
- hash code
◆ vlHash64()
| VL_API 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.
- Parameters
-
- Returns
- hash code
◆ vlHash8()
| VL_API 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.
- Parameters
-
- Returns
- hash code
◆ vlHashString()
| VL_API vl_hash vlHashString |
( |
const void * |
data, |
|
|
vl_memsize_t |
dataSize |
|
) |
| |