Skip to content

Commit

Permalink
Workaround gcc/8.2.0 compiler issue with _mm512_abs_pd
Browse files Browse the repository at this point in the history
Addresses issue kokkos#6268

Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
  • Loading branch information
ndellingwood and masterleinad committed Jul 7, 2023
1 parent 36ec6fa commit 14c5c84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions simd/src/Kokkos_SIMD_AVX512.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,12 @@ KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION
simd<double, simd_abi::avx512_fixed_size<8>> abs(
simd<double, simd_abi::avx512_fixed_size<8>> const& a) {
__m512d const rhs = static_cast<__m512d>(a);
#if defined(KOKKOS_COMPILER_GNU) && (KOKKOS_COMPILER_GNU < 830)
return simd<double, simd_abi::avx512_fixed_size<8>>((__m512d)_mm512_and_epi64(
(__m512i)rhs, _mm512_set1_epi64(0x7fffffffffffffffLL)));
#else
return simd<double, simd_abi::avx512_fixed_size<8>>(_mm512_abs_pd(rhs));
#endif
}

KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION
Expand Down

0 comments on commit 14c5c84

Please sign in to comment.