20 add_hash(
size_t start,
const uint8_t *bytes,
size_t num_bytes) {
21 size_t num_words = num_bytes >> 2;
22 size_t remaining_bytes = num_bytes - (num_words << 2);
23 size_t hash = (size_t)hashword((
const uint32_t *)bytes, num_words, (uint32_t)start);
25 switch (remaining_bytes) {
29 remaining = (bytes[num_bytes - 3] << 16) | (bytes[num_bytes - 2] << 8) | (bytes[num_bytes - 1]);
30 hash = (size_t)hashword(&remaining, 1, (uint32_t)hash);
37 remaining = (bytes[num_bytes - 2] << 8) | (bytes[num_bytes - 1]);
38 hash = (size_t)hashword(&remaining, 1, (uint32_t)hash);
45 remaining = (bytes[num_bytes - 1]);
46 hash = (size_t)hashword(&remaining, 1, (uint32_t)hash);
static size_t add_hash(size_t start, const uint32_t *words, size_t num_words)
Adds a linear sequence of uint32 words to the hash.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.