include/tools/simdsupport.hxx | 26 ++++++++++++++++++-------- sc/source/core/inc/arraysumfunctor.hxx | 8 -------- 2 files changed, 18 insertions(+), 16 deletions(-)
New commits: commit cd5a160f151ee789fb44bd8c07a10e3e291253fe Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Jul 17 21:27:00 2019 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Jul 18 02:28:54 2019 +0200 include supported SIMD intrinsics headers automatically If we include simdsupport.hxx, this now includes the supported intrinsics headers automatically, so this removes the need to do it ourselves. Change-Id: Icc406316a7e27b7b5fd5905f51664f4fe47e5468 Reviewed-on: https://gerrit.libreoffice.org/75783 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/tools/simdsupport.hxx b/include/tools/simdsupport.hxx index 74afc9300b1a..4ef7a698089e 100644 --- a/include/tools/simdsupport.hxx +++ b/include/tools/simdsupport.hxx @@ -24,7 +24,7 @@ // SSE2 is required for X64 #if (defined(_M_X64) || defined(_M_IX86_FP) && _M_IX86_FP >= 2) #define LO_SSE2_AVAILABLE -#endif +#endif // end SSE2 // compiled with /arch:AVX #if defined(__AVX__) @@ -33,30 +33,40 @@ #endif #define LO_SSSE3_AVAILABLE #define LO_AVX_AVAILABLE -#endif +#endif // defined(__AVX__) // compiled with /arch:AVX2 #if defined(__AVX2__) #define LO_AVX2_AVAILABLE -#endif +#endif // defined(__AVX2__) -#else // Clang and GCC +#else // compiler Clang and GCC #if defined(__SSE2__) || defined(__x86_64__) // SSE2 is required for X64 #define LO_SSE2_AVAILABLE -#endif +#endif // defined(__SSE2__) #if defined(__SSSE3__) #define LO_SSSE3_AVAILABLE -#endif +#endif // defined(__SSSE3__) + #if defined(__AVX__) #define LO_AVX_AVAILABLE +#endif // defined(__AVX__) -#endif #if defined(__AVX2__) #define LO_AVX2_AVAILABLE -#endif +#endif // defined(__AVX2__) + +#endif // end compiler Clang and GCC +// If we detect any SIMD intrinsics, include the headers automatically +#if defined(LO_SSE2_AVAILABLE) +#include <emmintrin.h> +#elif defined(LO_SSSE3_AVAILABLE) +#include <tmmintrin.h> +#elif defined(LO_AVX_AVAILABLE) || defined(LO_AVX2_AVAILABLE) +#include <immintrin.h> #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/inc/arraysumfunctor.hxx b/sc/source/core/inc/arraysumfunctor.hxx index b4da4d9d4064..7ef8a7face05 100644 --- a/sc/source/core/inc/arraysumfunctor.hxx +++ b/sc/source/core/inc/arraysumfunctor.hxx @@ -18,14 +18,6 @@ #include <tools/simd.hxx> #include <tools/cpuid.hxx> -#if defined(LO_SSE2_AVAILABLE) -#ifdef _WIN32 -#include <intrin.h> -#else -#include <x86intrin.h> -#endif -#endif - namespace sc { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits