MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / hash_thread_id

Function hash_thread_id

concurrentqueue.h:475–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473 template<std::size_t size> struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> { };
474
475 static inline size_t hash_thread_id(thread_id_t id)
476 {
477 static_assert(sizeof(thread_id_t) <= 8, "Expected a platform where thread IDs are at most 64-bit values");
478#if defined(__GNUC__) && !defined(__clang__)
479#pragma GCC diagnostic push
480#pragma GCC diagnostic ignored "-Wuseless-cast"
481#endif
482 return static_cast<size_t>(hash_32_or_64<sizeof(thread_id_converter<thread_id_t>::thread_id_hash_t)>::hash(
483 thread_id_converter<thread_id_t>::prehash(id)));
484#if defined(__GNUC__) && !defined(__clang__)
485#pragma GCC diagnostic pop
486#endif
487 }
488
489 template<typename T>
490 static inline bool circular_less_than(T a, T b)

Callers 2

Calls 1

hashClass · 0.85

Tested by

no test coverage detected