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 <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl 2019-07-17 21:27:00 +09:00 committed by Tomaž Vajngerl
parent 3f6e35d1da
commit cd5a160f15
2 changed files with 18 additions and 16 deletions

View File

@ -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: */

View File

@ -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
{