Refactor x86 SIMD detection + Add _VERSION(s) for x86 family

This commit is contained in:
Charly Chevalier
2015-07-20 10:49:00 +02:00
parent 5ea2f20dc7
commit e2d5a46cac
16 changed files with 213 additions and 647 deletions

View File

@ -6,50 +6,125 @@ Distributed under the Boost Software License, Version 1.0.
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
*/ */
// From the newest to the oldest
#include <boost/predef/hardware/simd/x86/mic.h> // XEON Phi specific
#include <boost/predef/hardware/simd/x86/avx2.h>
#include <boost/predef/hardware/simd/x86/fma3.h>
#include <boost/predef/hardware/simd/x86/xop.h> // AMD specific
#include <boost/predef/hardware/simd/x86/fma4.h> // AMD specific
#include <boost/predef/hardware/simd/x86/avx.h>
#include <boost/predef/hardware/simd/x86/sse4_2.h>
#include <boost/predef/hardware/simd/x86/sse4_1.h>
#include <boost/predef/hardware/simd/x86/sse4a.h> // AMD specific
#include <boost/predef/hardware/simd/x86/ssse3.h>
#include <boost/predef/hardware/simd/x86/sse3.h>
#include <boost/predef/hardware/simd/x86/sse2.h>
#include <boost/predef/hardware/simd/x86/sse.h>
#include <boost/predef/hardware/simd/x86/mmx.h>
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_H #ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_H #define BOOST_PREDEF_HARDWARE_SIMD_X86_H
#include <boost/predef/version_number.h> #include <boost/predef/version_number.h>
#include <boost/predef/hardware/simd/x86/versions.h>
#include <boost/predef/compiler.h>
/*` /*`
[heading `BOOST_HW_SIMD_X86`] [heading `BOOST_HW_SIMD_X86`]
The SIMD extension for x86 (if detected). The SIMD extension for x86 (if detected).
Version number depends on the detected extension. Version number depends on the most recent detected extension.
BOOST_HW_SIMD_X86 is defined by the first detected extension. They are
checked from the newest to the oldest. (AVX2 -> AVX -> ... -> SSE2 -> SSE)
[table [table
[[__predef_symbol__] [__predef_version__]] [[__predef_symbol__] [__predef_version__]]
[[`BOOST_HW_SIMD_X86`] [__predef_detection__]]
[[`BOOST_HW_SIMD_X86`] [V.R.P]] [[`__SSE__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 1`] [__predef_detection__]]
[[`__SSE2__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 2`] [__predef_detection__]]
[[`__SSE3__`] [__predef_detection__]]
[[`__SSSE3__`] [__predef_detection__]]
[[`__SSE4_1__`] [__predef_detection__]]
[[`__SSE4_2__`] [__predef_detection__]]
[[`__AVX__`] [__predef_detection__]]
[[`__FMA__`] [__predef_detection__]]
[[`__AVX2__`] [__predef_detection__]]
[[`__SSE__`] [BOOST_HW_SIMD_X86_SSE_VERSION]]
[[`_M_X64`] [BOOST_HW_SIMD_X86_SSE_VERSION]]
[[`_M_IX86_FP >= 1`] [BOOST_HW_SIMD_X86_SSE_VERSION]]
[[`__SSE2__`] [BOOST_HW_SIMD_X86_SSE2_VERSION]]
[[`_M_X64`] [BOOST_HW_SIMD_X86_SSE2_VERSION]]
[[`_M_IX86_FP >= 2`] [BOOST_HW_SIMD_X86_SSE2_VERSION]]
[[`__SSE3__`] [BOOST_HW_SIMD_X86_SSE3_VERSION]]
[[`__SSSE3__`] [BOOST_HW_SIMD_X86_SSSE3_VERSION]]
[[`__SSE4_1__`] [BOOST_HW_SIMD_X86_SSE4_1_VERSION]]
[[`__SSE4_2__`] [BOOST_HW_SIMD_X86_SSE4_2_VERSION]]
[[`__AVX__`] [BOOST_HW_SIMD_X86_AVX_VERSION]]
[[`__FMA__`] [BOOST_HW_SIMD_X86_FMA3_VERSION]]
[[`__AVX2__`] [BOOST_HW_SIMD_x86_AVX2_VERSION]]
] ]
[include x86/versions.h]
*/ */
#if defined(BOOST_HW_SIMD_X86) #define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE
# define BOOST_HW_SIMD_X86_AVAILABLE
#else #undef BOOST_HW_SIMD_X86
# define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE #if !defined(BOOST_HW_SIMD_X86) && defined(__MIC__)
# define BOOST_HW_SIMD_X86_NAME "x86 SIMD" # define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MIC_VERSION
#endif #endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__AVX2__)
# if defined(BOOST_COMP_MSVC_AVAILABLE) && BOOST_COMP_MSVC > BOOST_VERSION_NUMBER(17, 0, 0) ||\
!defined(BOOST_COMP_MSVC_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX2_VERSION
# endif
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__AVX__)
# if defined(BOOST_COMP_MSVC_AVAILABLE) && BOOST_COMP_MSVC > BOOST_VERSION_NUMBER(16, 0, 40219) ||\
!defined(BOOST_COMP_MSVC_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX_VERSION
# endif
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__FMA__)
# if defined(BOOST_COMP_MSVC_AVAILABLE) && BOOST_COMP_MSVC > BOOST_VERSION_NUMBER(17, 0, 0) ||\
!defined(BOOST_COMP_MSVC_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_FMA_VERSION
# endif
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_2__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_2_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_1__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_1_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSSE3__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSSE3_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE3__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE3_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || _M_IX86_FP >= 2)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE2_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__MMX__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MMX_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86)
# define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#else
# define BOOST_HW_SIMD_X86_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_NAME "x86 SIMD"
#endif #endif

View File

@ -1,47 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_AVX_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_AVX_H
#include <boost/predef/version_number.h>
#include <boost/predef/compiler.h>
/*`
[heading `BOOST_HW_SIMD_X86_AVX`]
[@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions AVX] x86 extension.
Version number is: 5.0.0. Not available for version of MSVC below 16.00.40219.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__AVX__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_AVX BOOST_VERSION_NUMBER(5, 0, 0)
#if defined(__AVX__)
# if defined(BOOST_COMP_MSVC_AVAILABLE) && BOOST_COMP_MSVC > BOOST_VERSION_NUMBER(16, 0, 40219)\
|| !defined(BOOST_COMP_MSVC_AVAILABLE)
# define BOOST_HW_SIMD_X86_AVX_AVAILABLE
# endif
#endif
#define BOOST_HW_SIMD_X86_AVX_NAME "x86 SIMD AVX"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_AVX_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_AVX_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_AVX, BOOST_HW_SIMD_X86_AVX_NAME)

View File

@ -1,47 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_AVX2_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_AVX2_H
#include <boost/predef/version_number.h>
#include <boost/predef/compiler.h>
/*`
[heading `BOOST_HW_SIMD_X86_AVX2`]
[@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2 AVX2] x86 extension.
Version number is: 5.3.0. Not available for version of MSVC below 17.00.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__AVX2__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_AVX2 BOOST_VERSION_NUMBER(5, 3, 0)
#if defined(__AVX2__)
# if defined(BOOST_COMP_MSVC_AVAILABLE) && BOOST_COMP_MSVC > BOOST_VERSION_NUMBER(17, 0, 0)\
|| !defined(BOOST_COMP_MSVC_AVAILABLE)
# define BOOST_HW_SIMD_X86_AVX2_AVAILABLE
# endif
#endif
#define BOOST_HW_SIMD_X86_AVX2_NAME "x86 SIMD AVX2"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_AVX2_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX2
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_AVX2_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_AVX2, BOOST_HW_SIMD_X86_AVX2_NAME)

View File

@ -1,44 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_FMA3_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_FMA3_H
#include <boost/predef/version_number.h>
#include <boost/predef/compiler.h>
/*`
[heading `BOOST_HW_SIMD_X86_FMA3`]
[@https://en.wikipedia.org/wiki/FMA_instruction_set FMA3] x86 extension.
Version number is: 5.2.0. Not available for version of MSVC below 17.00.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__FMA__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_FMA3 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__FMA__)
# if defined(BOOST_COMP_MSVC_AVAILABLE) && BOOST_COMP_MSVC < BOOST_VERSION_NUMBER(17, 0, 0)\
|| !defined(BOOST_COMP_MSVC_AVAILABLE)
# undef BOOST_HW_SIMD_X86_FMA3
# define BOOST_HW_SIMD_X86_FMA3 BOOST_VERSION_NUMBER(5, 2, 0)
# define BOOST_HW_SIMD_X86_FMA3_AVAILABLE
# endif
#endif
#define BOOST_HW_SIMD_X86_FMA3_NAME "x86 SIMD FMA3"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_FMA3, BOOST_HW_SIMD_X86_FMA3_NAME)

View File

@ -1,40 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_FMA4_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_FMA4_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_FMA4`]
[@https://en.wikipedia.org/wiki/FMA_instruction_set FMA4] x86 extension (AMD specific).
Version number is: 5.1.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__FMA4__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_FMA4 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__FMA4__)
# undef BOOST_HW_SIMD_X86_FMA4
# define BOOST_HW_SIMD_X86_FMA4 BOOST_VERSION_NUMBER(5, 1, 0)
# define BOOST_HW_SIMD_X86_FMA4_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_FMA4_NAME "x86 (AMD) SIMD FMA4"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_FMA4, BOOST_HW_SIMD_X86_FMA4_NAME)

View File

@ -1,45 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_MIC_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_MIC_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_MIC`]
[@https://en.wikipedia.org/wiki/Xeon_Phi MIC] (Xeon Phi) x86 extension.
Version number is: 6.0.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__MIC__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_MIC BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__MIC__)
# undef BOOST_HW_SIMD_X86_MIC
# define BOOST_HW_SIMD_X86_MIC BOOST_VERSION_NUMBER(6, 0, 0)
# define BOOST_HW_SIMD_X86_MIC_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_MIC_NAME "MIC (Xeon Phi)"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_MIC_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MIC
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_MIC_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_MIC, BOOST_HW_SIMD_X86_MIC_NAME)

View File

@ -1,43 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_MMX_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_MMX_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_MMX`]
[@https://en.wikipedia.org/wiki/MMX_(instruction_set) MMX] x86 extension.
Version number is: 0.99.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__MMX__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_MMX BOOST_VERSION_NUMBER(0, 99, 0)
#if defined(__MMX__)
# define BOOST_HW_SIMD_X86_MMX_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_MMX_NAME "MMX"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_MMX_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MMX
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_MMX_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_MMX, BOOST_HW_SIMD_X86_MMX_NAME)

View File

@ -1,47 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE`]
[@https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions SSE] x86 extension.
Version number is: 1.0.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 1`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1
# undef BOOST_HW_SIMD_X86_SSE
# define BOOST_HW_SIMD_X86_SSE BOOST_VERSION_NUMBER(1, 0, 0)
# define BOOST_HW_SIMD_X86_SSE_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE_NAME "x86 SIMD SSE(1)"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE, BOOST_HW_SIMD_X86_SSE_NAME)

View File

@ -1,47 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE2_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE2_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE2`]
[@https://en.wikipedia.org/wiki/SSE2 SSE2] x86 extension.
Version number is: 2.0.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE2__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 2`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE2 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE2__) || defined(_M_X64) || _M_IX86_FP >= 2
# undef BOOST_HW_SIMD_X86_SSE2
# define BOOST_HW_SIMD_X86_SSE2 BOOST_VERSION_NUMBER(2, 0, 0)
# define BOOST_HW_SIMD_X86_SSE2_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE2_NAME "x86 SIMD SSE2"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE2_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE2
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE2_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE2, BOOST_HW_SIMD_X86_SSE2_NAME)

View File

@ -1,45 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE3_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE3_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE3`]
[@https://en.wikipedia.org/wiki/SSE3 SSE3] x86 extension.
Version number is: 3.0.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE3__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE3 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE3__)
# undef BOOST_HW_SIMD_X86_SSE3
# define BOOST_HW_SIMD_X86_SSE3 BOOST_VERSION_NUMBER(3, 0, 0)
# define BOOST_HW_SIMD_X86_SSE3_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE3_NAME "x86 SIMD SSE3"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE3_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE3
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE3_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE3, BOOST_HW_SIMD_X86_SSE3_NAME)

View File

@ -1,45 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4_1_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4_1_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE4_1`]
[@https://en.wikipedia.org/wiki/SSE4#SSE4.1 SSE4_1] x86 extension.
Version number is: 4.1.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE4_1__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE4_1 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE4_1__)
# undef BOOST_HW_SIMD_X86_SSE4_1
# define BOOST_HW_SIMD_X86_SSE4_1 BOOST_VERSION_NUMBER(4, 1, 0)
# define BOOST_HW_SIMD_X86_SSE4_1_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE4_1_NAME "x86 SIMD SSE4.1"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE4_1_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_1
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE4_1_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE4_1, BOOST_HW_SIMD_X86_SSE4_1_NAME)

View File

@ -1,45 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4_2_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4_2_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE4_2`]
[@https://en.wikipedia.org/wiki/SSE4##SSE4.2 SSE4_2] x86 extension.
Version number is: 4.1.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE4_2__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE4_2 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE4_2__)
# undef BOOST_HW_SIMD_X86_SSE4_2
# define BOOST_HW_SIMD_X86_SSE4_2 BOOST_VERSION_NUMBER(4, 2, 0)
# define BOOST_HW_SIMD_X86_SSE4_2_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE4_2_NAME "x86 SIMD SSE4.2"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSE4_2_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_2
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSE4_2_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE4_2, BOOST_HW_SIMD_X86_SSE4_2_NAME)

View File

@ -1,40 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4A_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSE4A_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSE4A`]
[@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific).
Version number is: 4.0.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE4A__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSE4A BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSE4A__)
# undef BOOST_HW_SIMD_X86_SSE4A
# define BOOST_HW_SIMD_X86_SSE4A BOOST_VERSION_NUMBER(4, 0, 0)
# define BOOST_HW_SIMD_X86_SSE4A_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSE4A_NAME "x86 (AMD) SIMD SSE4a"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSE4A, BOOST_HW_SIMD_X86_SSE4A_NAME)

View File

@ -1,45 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_SSSE3_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_SSSE3_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_SSSE3`]
[@https://en.wikipedia.org/wiki/SSSE3 SSSE3] x86 extension.
Version number is: 3.1.0.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSSE3__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_SSSE3 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SSSE3__)
# undef BOOST_HW_SIMD_X86_SSSE3
# define BOOST_HW_SIMD_X86_SSSE3 BOOST_VERSION_NUMBER(3, 1, 0)
# define BOOST_HW_SIMD_X86_SSSE3_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_SSSE3_NAME "x86 SIMD SSSE3"
#if !defined(BOOST_HW_SIMD_X86) && defined(BOOST_HW_SIMD_X86_SSSE3_AVAILABLE)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSSE3
# define BOOST_HW_SIMD_X86_NAME BOOST_HW_SIMD_X86_SSSE3_NAME
#endif
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_SSSE3, BOOST_HW_SIMD_X86_SSSE3_NAME)

View File

@ -0,0 +1,111 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_*_VERSION`]
[note Those defines represent x86 SIMD extensions versions. You can
compare them with the predef BOOST_HW_SIMD_X86.]
*/
// ---------------------------------
/*`
[heading `BOOST_HW_SIMD_X86_MMX`]
[@https://en.wikipedia.org/wiki/MMX_(instruction_set) MMX] x86 extension.
Version number is: 0.99.0.
*/
#define BOOST_HW_SIMD_X86_MMX_VERSION BOOST_VERSION_NUMBER(0, 99, 0)
/*`
[heading `BOOST_HW_SIMD_X86_SSE_VERSION`]
[@https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions SSE] x86 extension.
Version number is: 1.0.0.
*/
#define BOOST_HW_SIMD_X86_SSE_VERSION BOOST_VERSION_NUMBER(1, 0, 0)
/*`
[heading `BOOST_HW_SIMD_X86_SSE2`]
[@https://en.wikipedia.org/wiki/SSE2 SSE2] x86 extension.
Version number is: 2.0.0.
*/
#define BOOST_HW_SIMD_X86_SSE2_VERSION BOOST_VERSION_NUMBER(2, 0, 0)
/*`
[heading `BOOST_HW_SIMD_X86_SSE3`]
[@https://en.wikipedia.org/wiki/SSE3 SSE3] x86 extension.
Version number is: 3.0.0.
*/
#define BOOST_HW_SIMD_X86_SSE3_VERSION BOOST_VERSION_NUMBER(3, 0, 0)
/*`
[heading `BOOST_HW_SIMD_X86_SSSE3`]
[@https://en.wikipedia.org/wiki/SSSE3 SSSE3] x86 extension.
Version number is: 3.1.0.
*/
#define BOOST_HW_SIMD_X86_SSSE3_VERSION BOOST_VERSION_NUMBER(3, 1, 0)
/*`
[heading `BOOST_HW_SIMD_X86_SSE4_1`]
[@https://en.wikipedia.org/wiki/SSE4#SSE4.1 SSE4_1] x86 extension.
Version number is: 4.1.0.
*/
#define BOOST_HW_SIMD_X86_SSE4_1_VERSION BOOST_VERSION_NUMBER(4, 1, 0)
/*`
[heading `BOOST_HW_SIMD_X86_SSE4_2`]
[@https://en.wikipedia.org/wiki/SSE4##SSE4.2 SSE4_2] x86 extension.
Version number is: 4.1.0.
*/
#define BOOST_HW_SIMD_X86_SSE4_2_VERSION BOOST_VERSION_NUMBER(4, 2, 0)
/*`
[heading `BOOST_HW_SIMD_X86_AVX`]
[@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions AVX] x86 extension.
Version number is: 5.0.0. Not available for version of MSVC below 16.00.40219.
*/
#define BOOST_HW_SIMD_X86_AVX_VERSION BOOST_VERSION_NUMBER(5, 0, 0)
/*`
[heading `BOOST_HW_SIMD_X86_FMA3`]
[@https://en.wikipedia.org/wiki/FMA_instruction_set FMA3] x86 extension.
Version number is: 5.2.0. Not available for version of MSVC below 17.00.
*/
#define BOOST_HW_SIMD_X86_FMA3_VERSION BOOST_VERSION_NUMBER(5, 2, 0)
/*`
[heading `BOOST_HW_SIMD_X86_AVX2`]
[@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2 AVX2] x86 extension.
Version number is: 5.3.0. Not available for version of MSVC below 17.00.
*/
#define BOOST_HW_SIMD_x86_AVX2_VERSION BOOST_VERSION_NUMBER(5, 3, 0)
/*`
[heading `BOOST_HW_SIMD_X86_MIC`]
[@https://en.wikipedia.org/wiki/Xeon_Phi MIC] (Xeon Phi) x86 extension.
Version number is: 6.0.0.
*/
#define BOOST_HW_SIMD_x86_MIC_VERSION BOOST_VERSION_NUMBER(99, 999, 999)
#endif

View File

@ -1,40 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_XOP_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_XOP_H
#include <boost/predef/version_number.h>
/*`
[heading `BOOST_HW_SIMD_X86_XOP`]
[@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
Version number is: 5.1.1.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__XOP__`] [__predef_detection__]]
]
*/
#define BOOST_HW_SIMD_X86_XOP BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__XOP__)
# undef BOOST_HW_SIMD_X86_XOP
# define BOOST_HW_SIMD_X86_XOP BOOST_VERSION_NUMBER(5, 1, 1)
# define BOOST_HW_SIMD_X86_XOP_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_XOP_NAME "x86 (AMD) SIMD XOP"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86_XOP, BOOST_HW_SIMD_X86_XOP_NAME)