mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
try new idea for removing address sanitizer warning (issue #21)
This commit is contained in:
Vendored
+2
-5
@@ -337,16 +337,13 @@ PHMAP_BASE_INTERNAL_FORCEINLINE int CountTrailingZerosNonZero32(uint32_t n) {
|
||||
#endif
|
||||
|
||||
#ifdef PHMAP_HAVE_INTRINSIC_INT128
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
__extension__ typedef unsigned __int128 phmap_uint128;
|
||||
inline uint64_t umul128(uint64_t a, uint64_t b, uint64_t* high)
|
||||
{
|
||||
auto result = static_cast<unsigned __int128>(a) *
|
||||
static_cast<unsigned __int128>(b);
|
||||
auto result = static_cast<phmap_uint128>(a) * static_cast<phmap_uint128>(b);
|
||||
*high = static_cast<uint64_t>(result >> 64);
|
||||
return static_cast<uint64_t>(result);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
#define PHMAP_HAS_UMUL128 1
|
||||
#elif (defined(_MSC_VER))
|
||||
#if defined(_M_X64)
|
||||
|
||||
Reference in New Issue
Block a user