MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / hash_thread_id

Function hash_thread_id

deps/concurrentqueue/concurrentqueue.h:461–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459 template<std::size_t size> struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> { };
460
461 static inline size_t hash_thread_id(thread_id_t id)
462 {
463 static_assert(sizeof(thread_id_t) <= 8, "Expected a platform where thread IDs are at most 64-bit values");
464 return static_cast<size_t>(hash_32_or_64<sizeof(thread_id_converter<thread_id_t>::thread_id_hash_t)>::hash(
465 thread_id_converter<thread_id_t>::prehash(id)));
466 }
467
468 template<typename T>
469 static inline bool circular_less_than(T a, T b)

Callers 2

Calls 1

hashFunction · 0.50

Tested by

no test coverage detected