From 633373c7d2b9e7f7933f8741c6425a152df27ab3 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Mon, 30 Apr 2018 15:50:51 +0200 Subject: [PATCH] fixed typo in preprocessor names --- include/detail/ct/preprocessor_impl.hpp | 36 +++++++++++++------------ include/detail/definitions.hpp | 2 -- include/detail/dispatch.hpp | 1 + 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/include/detail/ct/preprocessor_impl.hpp b/include/detail/ct/preprocessor_impl.hpp index f591c4f..aa2b989 100644 --- a/include/detail/ct/preprocessor_impl.hpp +++ b/include/detail/ct/preprocessor_impl.hpp @@ -1,30 +1,32 @@ #ifndef COMPASS_CT_PREPROCESSOR_IMPL_H_ #define COMPASS_CT_PREPROCESSOR_IMPL_H_ -#ifndef WIN32 - #if defined __SSE2__ && defined __SSE2_MATH__ - #define COMPASS_HAS_SSE2 - #endif -#else - #if _M_IX86_FP >= 2 - #define COMPASS_HAS_SSE2 - #endif -#endif + #ifndef WIN32 - #if defined __SSE3__ && defined __SSSE3__ - #define COMPASS_HAS_SSE3 - #endif - #if defined __SSE4_2__ && defined __SSE4_1__ - #define COMPASS_HAS_SSE4 - #endif +#if defined(__SSE2__) || defined(__SSE2_MATH__) // && __SSE2__ != 0 && __SSE2_MATH__ != 0 + #define COMPASS_CT_HAS_SSE2 1 + #endif + +#if defined(__SSE3__) && defined(__SSSE3__) + #define COMPASS_CT_HAS_SSE3 1 + #endif + +#if defined(__SSE4_2__) && defined(__SSE4_1__) + #define COMPASS_CT_HAS_SSE4 1 + #endif + #else //TODO: try to warn users on Windows that we are enabling SSE3 + SSE4 upon assumption here - #define COMPASS_HAS_SSE3 - #define COMPASS_HAS_SSE4 + #if _M_IX86_FP >= 2 + #define COMPASS_CT_HAS_SSE2 1 + #define COMPASS_CT_HAS_SSE3 1 + #define COMPASS_CT_HAS_SSE4 1 + #endif #endif + #include "detail/tags.hpp" namespace compass { diff --git a/include/detail/definitions.hpp b/include/detail/definitions.hpp index 56ba956..a0719f3 100644 --- a/include/detail/definitions.hpp +++ b/include/detail/definitions.hpp @@ -24,6 +24,4 @@ namespace compass { }; -//#include "ct/preprocessor_impl.hpp" - #endif /* DEFINITIONS_H */ diff --git a/include/detail/dispatch.hpp b/include/detail/dispatch.hpp index 51a7491..5a7bc81 100644 --- a/include/detail/dispatch.hpp +++ b/include/detail/dispatch.hpp @@ -8,6 +8,7 @@ #include "detail/definitions.hpp" #ifdef COMPASS_CT_ARCH_X86 +#include "ct/preprocessor_impl.hpp" #include "rt/x86_impl.hpp" #include "rt/x86_sizes.hpp" #endif -- GitLab