Changeset 34120f10 in mainline for common/include/adt/hash.h
- Timestamp:
- 2023-10-27T19:38:31Z (14 months ago)
- Branches:
- master, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63ed840
- Parents:
- c89ae25 (diff), 694ca3d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
common/include/adt/hash.h
rc89ae25 r34120f10 35 35 #define _LIBC_ADT_HASH_H_ 36 36 37 #include <stddef.h> 37 38 #include <stdint.h> 38 #include <types/common.h>39 39 40 40 /** Produces a uniform hash affecting all output bits from the skewed input. */ … … 78 78 static inline size_t hash_mix(size_t hash) 79 79 { 80 #ifdef __32_BITS__ 81 return hash_mix32(hash); 82 #elif defined(__64_BITS__) 83 return hash_mix64(hash); 84 #else 85 #error Unknown size_t size - cannot select proper hash mix function. 86 #endif 80 if (sizeof(long) == 4) 81 return hash_mix32(hash); 82 else 83 return hash_mix64(hash); 87 84 } 88 85
Note:
See TracChangeset
for help on using the changeset viewer.