yahoojapan / NGT

Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data
Apache License 2.0
1.24k stars 114 forks source link

One Build Error: _mm512_extract_epi64 is not supprted for some cpu versions. #161

Closed Chemple closed 2 months ago

Chemple commented 3 months ago

Hello, I encountered one build error while trying to compile the project.

`#if defined(AVX512F) while (a + 64 <= last) { __m512i vxor = _mm512_xor_si512(_mm512_loadu_si512(reinterpret_cast<const m512i *>(a)), _mm512_loadu_si512(reinterpret_cast<const m512i *>(b))); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 0)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 1)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 2)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 3)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 4)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 5)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 6)); count += _mm_popcnt_u64(_mm512_extract_epi64(vxor, 7)); a += 64; b += 64; }

endif`

My cpu version is Intel(R) Xeon(R) Gold 5318Y CP, and i had checked the Intel manual and found the _mm512_extract_epi64 is not supprted in my cpu version.

Chemple commented 3 months ago

Thx