hardnested: more readable preprocessing

This commit is contained in:
Philippe Teuwen 2020-05-12 13:26:16 +02:00
commit 66fd6d70a0
5 changed files with 81 additions and 130 deletions

View file

@ -52,19 +52,25 @@ THE SOFTWARE.
#include "hardnested_bruteforce.h" // statelist_t
#if ( defined (__i386__) || defined (__x86_64__) ) && \
( !defined(__APPLE__) || \
(defined(__APPLE__) && (__clang_major__ > 8 || __clang_major__ == 8 && __clang_minor__ >= 1)) )
# define COMPILER_HAS_SIMD
# if defined(COMPILER_HAS_SIMD) && ((__GNUC__ >= 5) && (__GNUC__ > 5 || __GNUC_MINOR__ > 2))
# define COMPILER_HAS_SIMD_AVX512
# endif
#endif
typedef enum {
SIMD_AUTO,
#if defined (__i386__) || defined (__x86_64__)
#if !defined(__APPLE__) || (defined(__APPLE__) && (__clang_major__ > 8 || __clang_major__ == 8 && __clang_minor__ >= 1))
#if (__GNUC__ >= 5) && (__GNUC__ > 5 || __GNUC_MINOR__ > 2)
#if defined(COMPILER_HAS_SIMD_AVX512)
SIMD_AVX512,
#endif
#if defined(COMPILER_HAS_SIMD)
SIMD_AVX2,
SIMD_AVX,
SIMD_SSE2,
SIMD_MMX,
#endif
#endif
SIMD_NONE,
} SIMDExecInstr;