FastSIMD_Config.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <cstdint>
  3. #include <cstddef>
  4. #include "FastSIMD_Export.h"
  5. #if defined(__arm__) || defined(__aarch64__)
  6. #define FASTSIMD_x86 false
  7. #define FASTSIMD_ARM true
  8. #else
  9. #define FASTSIMD_x86 true
  10. #define FASTSIMD_ARM false
  11. #endif
  12. #define FASTSIMD_64BIT (INTPTR_MAX == INT64_MAX)
  13. #define FASTSIMD_COMPILE_SCALAR (!(FASTSIMD_x86 && FASTSIMD_64BIT)) // Don't compile for x86 64bit since CPU is guaranteed SSE2 support
  14. #define FASTSIMD_COMPILE_SSE (FASTSIMD_x86 & false) // Not supported
  15. #define FASTSIMD_COMPILE_SSE2 (FASTSIMD_x86 & true )
  16. #define FASTSIMD_COMPILE_SSE3 (FASTSIMD_x86 & true )
  17. #define FASTSIMD_COMPILE_SSSE3 (FASTSIMD_x86 & true )
  18. #define FASTSIMD_COMPILE_SSE41 (FASTSIMD_x86 & true )
  19. #define FASTSIMD_COMPILE_SSE42 (FASTSIMD_x86 & true )
  20. #define FASTSIMD_COMPILE_AVX (FASTSIMD_x86 & false) // Not supported
  21. #define FASTSIMD_COMPILE_AVX2 (FASTSIMD_x86 & true )
  22. #define FASTSIMD_COMPILE_AVX512 (FASTSIMD_x86 & true )
  23. #define FASTSIMD_COMPILE_NEON (FASTSIMD_ARM & true )
  24. #define FASTSIMD_USE_FMA true
  25. #define FASTSIMD_CONFIG_GENERATE_CONSTANTS false