From 440dfcd253c4ee2ae2742b4c9eaf33047872506c Mon Sep 17 00:00:00 2001 From: Jamaika1 Date: Fri, 15 Nov 2024 11:46:27 +0100 Subject: [PATCH] Define headers --- src/strategies/missing-intel-intrinsics.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/strategies/missing-intel-intrinsics.h b/src/strategies/missing-intel-intrinsics.h index f132f033..532f59cf 100644 --- a/src/strategies/missing-intel-intrinsics.h +++ b/src/strategies/missing-intel-intrinsics.h @@ -3,6 +3,7 @@ #include +#ifndef __OPTIMIZE__ // Old Visual Studio headers lack the bsrli variant #ifndef _mm_bsrli_si128 #define _mm_bsrli_si128(a, imm8) _mm_srli_si128((a), (imm8)) @@ -20,9 +21,11 @@ // Some Visual Studio headers apparently lack these pseudoinstructions #if COMPILE_INTEL_AVX2 +#ifdef __AVX512F__ #ifndef _mm256_bsrli_epi128 #define _mm256_bsrli_epi128(a, imm8) _mm256_srli_si256((a), (imm8)) #endif +#endif #ifndef _mm256_insert_epi32 #define _mm256_insert_epi32(a, i, index) (_mm256_blend_epi32((a), _mm256_set1_epi32(i), (1 << (index)))) #endif @@ -31,5 +34,6 @@ #define _mm256_extract_epi32(a, index) (_mm_extract_epi32(_mm256_extracti128_si256((a), (index) >> 2), (index) & 3)) #endif #endif +#endif // __OPTIMIZE__ #endif