martinus / robin-hood-hashing

Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
https://gitter.im/martinus/robin-hood-hashing
MIT License
1.5k stars 142 forks source link

Issue with sse4.2 support #96

Closed dawag415 closed 3 years ago

dawag415 commented 3 years ago

Getting an error compiling on windows.


common/robin_hood.h(849,19): error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'hash_bytes_1_to_16' that is compiled without support for 'sse4.2'
        auto h1 = ROBIN_HOOD_CRC32_64(seed, detail::unaligned_load<uint64_t>(d8));
                  ^
common/robin_hood.h(240,21): note: expanded from macro 'ROBIN_HOOD_CRC32_64'
                    _mm_crc32_u64(static_cast<uint64_t>(crc), static_cast<uint64_t>(v)))
                    ^
common/robin_hood.h(850,19): error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'hash_bytes_1_to_16' that is compiled without support for 'sse4.2'
        auto h2 = ROBIN_HOOD_CRC32_64(seed, detail::unaligned_load<uint64_t>(d8 + len - 8));
                  ^
common/robin_hood.h(240,21): note: expanded from macro 'ROBIN_HOOD_CRC32_64'
                    _mm_crc32_u64(static_cast<uint64_t>(crc), static_cast<uint64_t>(v)))
                    ^
ommon/robin_hood.h(867,12): error: always_inline function '_mm_crc32_u64' requires target feature 'sse4.2', but would be inlined into function 'hash_bytes_1_to_16' that is compiled without support for 'sse4.2'
    return ROBIN_HOOD_CRC32_64(seed, input) * c1;
           ^
common/robin_hood.h(240,21): note: expanded from macro 'ROBIN_HOOD_CRC32_64'
                    _mm_crc32_u64(static_cast<uint64_t>(crc), static_cast<uint64_t>(v)))
                    ^

And a lot more of the same. Any Ideas on how to fix this issue?

martinus commented 3 years ago

Please use the version from the latest release in the meantime, this should work. The master is currently work in progress

martinus commented 3 years ago

removed CRC