Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:05

0001 /*
0002 Copyright Charly Chevalier 2015
0003 Copyright Joel Falcou 2015
0004 Distributed under the Boost Software License, Version 1.0.
0005 (See accompanying file LICENSE_1_0.txt or copy at
0006 http://www.boost.org/LICENSE_1_0.txt)
0007 */
0008 
0009 #ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_H
0010 #define BOOST_PREDEF_HARDWARE_SIMD_X86_H
0011 
0012 #include <boost/predef/version_number.h>
0013 #include <boost/predef/hardware/simd/x86/versions.h>
0014 
0015 /* tag::reference[]
0016 = `BOOST_HW_SIMD_X86`
0017 
0018 The SIMD extension for x86 (*if detected*).
0019 Version number depends on the most recent detected extension.
0020 
0021 [options="header"]
0022 |===
0023 | {predef_symbol} | {predef_version}
0024 
0025 | `+__SSE__+` | {predef_detection}
0026 | `+_M_X64+` | {predef_detection}
0027 | `_M_IX86_FP >= 1` | {predef_detection}
0028 
0029 | `+__SSE2__+` | {predef_detection}
0030 | `+_M_X64+` | {predef_detection}
0031 | `_M_IX86_FP >= 2` | {predef_detection}
0032 
0033 | `+__SSE3__+` | {predef_detection}
0034 
0035 | `+__SSSE3__+` | {predef_detection}
0036 
0037 | `+__SSE4_1__+` | {predef_detection}
0038 
0039 | `+__SSE4_2__+` | {predef_detection}
0040 
0041 | `+__AVX__+` | {predef_detection}
0042 
0043 | `+__FMA__+` | {predef_detection}
0044 
0045 | `+__AVX2__+` | {predef_detection}
0046 |===
0047 
0048 [options="header"]
0049 |===
0050 | {predef_symbol} | {predef_version}
0051 
0052 | `+__SSE__+` | BOOST_HW_SIMD_X86_SSE_VERSION
0053 | `+_M_X64+` | BOOST_HW_SIMD_X86_SSE_VERSION
0054 | `_M_IX86_FP >= 1` | BOOST_HW_SIMD_X86_SSE_VERSION
0055 
0056 | `+__SSE2__+` | BOOST_HW_SIMD_X86_SSE2_VERSION
0057 | `+_M_X64+` | BOOST_HW_SIMD_X86_SSE2_VERSION
0058 | `_M_IX86_FP >= 2` | BOOST_HW_SIMD_X86_SSE2_VERSION
0059 
0060 | `+__SSE3__+` | BOOST_HW_SIMD_X86_SSE3_VERSION
0061 
0062 | `+__SSSE3__+` | BOOST_HW_SIMD_X86_SSSE3_VERSION
0063 
0064 | `+__SSE4_1__+` | BOOST_HW_SIMD_X86_SSE4_1_VERSION
0065 
0066 | `+__SSE4_2__+` | BOOST_HW_SIMD_X86_SSE4_2_VERSION
0067 
0068 | `+__AVX__+` | BOOST_HW_SIMD_X86_AVX_VERSION
0069 
0070 | `+__FMA__+` | BOOST_HW_SIMD_X86_FMA3_VERSION
0071 
0072 | `+__AVX2__+` | BOOST_HW_SIMD_X86_AVX2_VERSION
0073 |===
0074 
0075 */ // end::reference[]
0076 
0077 #define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE
0078 
0079 #undef BOOST_HW_SIMD_X86
0080 #if !defined(BOOST_HW_SIMD_X86) && defined(__MIC__)
0081 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MIC_VERSION
0082 #endif
0083 #if !defined(BOOST_HW_SIMD_X86) && defined(__AVX2__)
0084 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX2_VERSION
0085 #endif
0086 #if !defined(BOOST_HW_SIMD_X86) && defined(__AVX__)
0087 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX_VERSION
0088 #endif
0089 #if !defined(BOOST_HW_SIMD_X86) && defined(__FMA__)
0090 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_FMA_VERSION
0091 #endif
0092 #if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_2__)
0093 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_2_VERSION
0094 #endif
0095 #if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_1__)
0096 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_1_VERSION
0097 #endif
0098 #if !defined(BOOST_HW_SIMD_X86) && defined(__SSSE3__)
0099 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSSE3_VERSION
0100 #endif
0101 #if !defined(BOOST_HW_SIMD_X86) && defined(__SSE3__)
0102 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE3_VERSION
0103 #endif
0104 #if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
0105 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE2_VERSION
0106 #endif
0107 #if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1))
0108 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE_VERSION
0109 #endif
0110 #if !defined(BOOST_HW_SIMD_X86) && defined(__MMX__)
0111 #   define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MMX_VERSION
0112 #endif
0113 
0114 #if !defined(BOOST_HW_SIMD_X86)
0115 #   define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE
0116 #else
0117 #   define BOOST_HW_SIMD_X86_AVAILABLE
0118 #endif
0119 
0120 #define BOOST_HW_SIMD_X86_NAME "x86 SIMD"
0121 
0122 #endif
0123 
0124 #include <boost/predef/detail/test.h>
0125 BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86, BOOST_HW_SIMD_X86_NAME)