Skip to content

Commit 844c60c

Browse files
committed
Use native avx512 intrinsic to do int-to-float conversion if avilable
1 parent e8e5077 commit 844c60c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/xsimd/math/xsimd_fp_manipulation.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ namespace xsimd
7777
}
7878

7979
// fexps are 8/11-bit numbers. so we can down-cast to int16_t/int32_t then do the job
80-
#if XSIMD_X86_INSTR_SET >= XSIMD_X86_AVX_VERSION
80+
#if XSIMD_X86_INSTR_SET >= XSIMD_X86_AVX_VERSION && XSIMD_X86_INSTR_SET < XSIMD_X86_AVX512_VERSION
8181
inline batch<double, 4> fexp_to_float(const batch<int64_t, 4>& x)
8282
{
8383
return _mm256_cvtepi32_pd(detail::xsimd_cvtepi64_epi32(x));
8484
}
8585
#endif
8686

87-
#if XSIMD_X86_INSTR_SET >= XSIMD_X86_SSE2_VERSION
87+
#if XSIMD_X86_INSTR_SET >= XSIMD_X86_SSE2_VERSION && XSIMD_X86_INSTR_SET < XSIMD_X86_AVX512_VERSION
8888
inline batch<double, 2> fexp_to_float(const batch<int64_t, 2>& x)
8989
{
9090
return _mm_cvtepi32_pd(_mm_shuffle_epi32(x, _MM_SHUFFLE(0, 0, 2, 0)));

0 commit comments

Comments
 (0)