![]() |
Home | Libraries | People | FAQ | More |
BOOST_ARCH_ALPHA
DEC Alpha architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
4.0.0 |
|
5.0.0 |
|
6.0.0 |
BOOST_ARCH_ARM
ARM architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
V.0.0 |
|
V.0.0 |
|
V.0.0 |
|
V.0.0 |
|
8.0.0 |
|
8.0.0 |
|
8.0.0 |
|
8.0.0 |
|
7.0.0 |
|
7.0.0 |
|
7.0.0 |
|
7.0.0 |
|
6.0.0 |
|
6.0.0 |
|
6.0.0 |
|
6.0.0 |
|
5.0.0 |
|
5.0.0 |
|
4.0.0 |
|
4.0.0 |
BOOST_ARCH_BLACKFIN
Blackfin Processors from Analog Devices.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_ARCH_CONVEX
Convex Computer architecture.
Symbol |
Version |
---|---|
|
detection |
|
1.0.0 |
|
2.0.0 |
|
3.2.0 |
|
3.4.0 |
|
3.8.0 |
BOOST_ARCH_IA64
Intel Itanium 64 architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_ARCH_M68K
Motorola 68k architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
6.0.0 |
|
6.0.0 |
|
6.0.0 |
|
4.0.0 |
|
4.0.0 |
|
4.0.0 |
|
3.0.0 |
|
3.0.0 |
|
3.0.0 |
|
2.0.0 |
|
2.0.0 |
|
2.0.0 |
|
1.0.0 |
|
1.0.0 |
|
1.0.0 |
|
0.0.1 |
|
0.0.1 |
|
0.0.1 |
BOOST_ARCH_MIPS
MIPS architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
V.0.0 |
|
1.0.0 |
|
1.0.0 |
|
2.0.0 |
|
2.0.0 |
|
2.0.0 |
|
3.0.0 |
|
3.0.0 |
|
4.0.0 |
|
4.0.0 |
BOOST_ARCH_PARISC
HP/PA RISC architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
1.0.0 |
|
1.1.0 |
|
1.1.0 |
|
1.1.0 |
|
2.0.0 |
|
2.0.0 |
|
2.0.0 |
|
2.0.0 |
BOOST_ARCH_PPC
PowerPC architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
6.1.0 |
|
6.1.0 |
|
6.3.0 |
|
6.3.0 |
|
6.4.0 |
|
6.4.0 |
BOOST_ARCH_PTX
PTX architecture.
Symbol |
Version |
---|---|
|
detection |
|
V.R.0 |
BOOST_ARCH_PYRAMID
Pyramid 9810 architecture.
Symbol |
Version |
---|---|
|
detection |
BOOST_ARCH_RS6000
RS/6000 architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_ARCH_SPARC
SPARC architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
9.0.0 |
|
8.0.0 |
BOOST_ARCH_SH
SuperH architecture: If available versions [1-5] are specifically detected.
Symbol |
Version |
---|---|
|
detection |
|
5.0.0 |
|
4.0.0 |
|
3.0.0 |
|
3.0.0 |
|
2.0.0 |
|
1.0.0 |
BOOST_ARCH_SYS370
System/370 architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_ARCH_SYS390
System/390 architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_ARCH_X86
Intel x86 architecture.
This is a category to indicate that either BOOST_ARCH_X86_32
or BOOST_ARCH_X86_64
is detected.
BOOST_ARCH_Z
z/Architecture architecture.
Symbol |
Version |
---|---|
|
detection |
BOOST_ARCH_X86_32
Intel x86 architecture: If available versions [3-6] are specifically detected.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
V.0.0 |
|
V.0.0 |
|
6.0.0 |
|
5.0.0 |
|
4.0.0 |
|
3.0.0 |
BOOST_ARCH_X86_64
Intel IA-64 architecture.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_COMP_BORLAND
Borland C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_COMP_CLANG
Clang compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_COMO
Comeau C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_DEC
Compaq C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_COMP_DIAB
Diab C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_DMC
Digital Mars compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_SYSC
Dignus Systems/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_EDG
EDG C++ Frontend compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.0 |
BOOST_COMP_PATH
EKOpath compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_GNUC
Gnu GCC C/C++ compiler. Version number available as major, minor, and patch (if available).
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
|
V.R.0 |
BOOST_COMP_GCCXML
GCC XML compiler.
Symbol |
Version |
---|---|
|
detection |
BOOST_COMP_GHS
Green Hills C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_COMP_HPACC
HP aC++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_IAR
IAR C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_IBM
IBM XL C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
|
V.R.P |
|
V.R.P |
BOOST_COMP_INTEL
Intel C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
V.R |
|
V.R.P |
![]() |
Note |
---|---|
Because of an Intel mistake in the release version numbering when |
BOOST_COMP_KCC
Kai C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_LLVM
LLVM compiler.
Symbol |
Version |
---|---|
|
detection |
BOOST_COMP_HIGHC
MetaWare High C/C++ compiler.
Symbol |
Version |
---|---|
|
detection |
BOOST_COMP_MWERKS
Metrowerks CodeWarrior compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P >= 4.2.0 |
|
9.R.0 |
|
8.R.0 |
BOOST_COMP_MRI
Microtec C/C++ compiler.
Symbol |
Version |
---|---|
|
detection |
BOOST_COMP_MPW
MPW C++ compiler. Version number available as major, and minor.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
V.R.0 |
BOOST_COMP_NVCC
NVCC compiler. Version number available as major, minor, and patch beginning with version 7.5.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_PALM
Palm C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_PGI
Portland Group C/C++ compiler.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_COMP_SGI
SGI MIPSpro compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_COMP_SUNPRO
Oracle Solaris Studio compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
|
VV.RR.P |
|
VV.RR.P |
BOOST_COMP_TENDRA
TenDRA C/C++ compiler.
Symbol |
Version |
---|---|
|
detection |
BOOST_COMP_MSVC
Microsoft Visual C/C++ compiler. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
|
V.R.0 |
![]() |
Note |
---|---|
Release of Visual Studio after 2015 will no longer be identified by Boost Predef as the marketing version number. Instead we use the compiler version number directly, i.e. the _MSC_VER number. |
BOOST_COMP_WATCOM
Watcom C++ compiler. Version number available as major, and minor.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_LANG_CUDA
CUDA C/C++ language. If available, the version is detected as VV.RR.P.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
VV.RR.P |
BOOST_LANG_OBJC
Objective-C language.
Symbol |
Version |
---|---|
|
detection |
BOOST_LANG_STDC
Standard C language. If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_LANG_STDCPP
Standard C++ language. If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. Because of the way the C++ standardization process works the defined version year will not be the commonly known year of the standard. Specifically the defined versions are:
Table 29.1. Detected Version Number vs. C++ Standard Year
Detected Version Number |
Standard Year |
C++ Standard |
---|---|---|
27.11.1 |
1998 |
ISO/IEC 14882:1998 |
41.12.1 |
2011 |
ISO/IEC 14882:2011 |
Symbol |
Version |
---|---|
|
detection |
|
YYYY.MM.1 |
BOOST_LANG_STDCPPCLI
Standard C++/CLI language. If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
Symbol |
Version |
---|---|
|
detection |
|
YYYY.MM.1 |
BOOST_LANG_STDECPP
Standard Embedded C++ language.
Symbol |
Version |
---|---|
|
detection |
BOOST_LIB_C_CLOUDABI
cloudlibc - CloudABI's standard C library. Version number available as major, and minor.
Symbol |
Version |
---|---|
|
detection |
|
V.R.0 |
BOOST_LIB_C_GNU
GNU glibc Standard C library. Version number available as major, and minor.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.0 |
|
V.R.0 |
BOOST_LIB_C_UC
uClibc Standard C library.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_LIB_C_VMS
VMS libc Standard C library. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_LIB_C_ZOS
z/OS libc Standard C library. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_LIB_STD_CXX
libc++ C++ Standard Library.
Symbol |
Version |
---|---|
|
detection |
|
V.0.P |
BOOST_LIB_STD_DINKUMWARE
Dinkumware Standard C++ Library. If available version number as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.0 |
BOOST_LIB_STD_COMO
Comeau Computing Standard C++ Library. Version number available as major.
Symbol |
Version |
---|---|
|
detection |
|
V.0.0 |
BOOST_LIB_STD_MSIPL
Modena Software Lib++ Standard C++ Library.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_LIB_STD_MSL
Metrowerks Standard C++ Library. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_LIB_STD_RW
Roguewave Standard C++ library. If available version number as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
BOOST_LIB_STD_SGI
SGI Standard C++ library. If available version number as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_LIB_STD_GNU
GNU libstdc++ Standard C++ library. Version number available as year (from 1970), month, and day.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
BOOST_LIB_STD_STLPORT
STLport Standard C++ library. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
V.R.P |
|
V.R.P |
BOOST_LIB_STD_IBM
IBM VACPP Standard C++ library.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_AIX
IBM AIX operating system. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
4.3.0 |
|
4.1.0 |
|
3.2.0 |
|
3.0.0 |
BOOST_OS_AMIGAOS
AmigaOS operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_OS_ANDROID
NOTE: BOOST_OS_ANDROID
is
deprecated, and will be removed in a following release. Please use BOOST_PLAT_ANDROID
instead.
Android operating system.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_BEOS
BeOS operating system.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_BSD
BSD operating system.
BSD has various branch operating systems possible and each detected individually. This detects the following variations and sets a specific version number macro to match:
BOOST_OS_BSD_DRAGONFLY
DragonFly BSD
BOOST_OS_BSD_FREE
FreeBSD
BOOST_OS_BSD_BSDI
BSDi BSD/OS
BOOST_OS_BSD_NET
NetBSD
BOOST_OS_BSD_OPEN
OpenBSD
![]() |
Note |
---|---|
The general |
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
4.2.0 |
|
4.3.0 |
|
4.4.0 |
|
V.R.0 |
BOOST_OS_CYGWIN
Cygwin evironment.
Symbol |
Version |
---|---|
|
detection |
|
V.R.0 |
BOOST_OS_HAIKU
Haiku operating system.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_HPUX
HP-UX operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
BOOST_OS_IOS
iOS operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000 |
BOOST_OS_IRIX
IRIX operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_OS_LINUX
Linux operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_OS_MACOS
Mac OS operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
10.0.0 |
otherwise |
9.0.0 |
BOOST_OS_OS400
IBM OS/400 operating system.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_QNX
QNX operating system. Version number available as major, and minor if possible. And version 4 is specifically detected.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.0 |
|
4.0.0 |
BOOST_OS_SOLARIS
Solaris operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_OS_UNIX
Unix Environment operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_OS_SVR4
SVR4 Environment operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_OS_VMS
VMS operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
BOOST_OS_WINDOWS
Microsoft Windows operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_OS_BSD_BSDI
BSDi BSD/OS operating system.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_BSD_DRAGONFLY
DragonFly BSD operating system.
Symbol |
Version |
---|---|
|
detection |
BOOST_OS_BSD_FREE
FreeBSD operating system.
Symbol |
Version |
---|---|
|
detection |
|
V.R.P |
BOOST_OS_BSD_NET
NetBSD operating system.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.P |
|
0.8.0 |
|
0.9.0 |
|
1.0.0 |
|
V.R.P |
BOOST_OS_BSD_OPEN
OpenBSD operating system.
Symbol |
Version |
---|---|
|
detection |
|
2.0.0 |
|
2.1.0 |
|
2.2.0 |
|
2.3.0 |
|
2.4.0 |
|
2.5.0 |
|
2.6.0 |
|
2.7.0 |
|
2.8.0 |
|
2.9.0 |
|
3.0.0 |
|
3.1.0 |
|
3.2.0 |
|
3.3.0 |
|
3.4.0 |
|
3.5.0 |
|
3.6.0 |
|
3.7.0 |
|
3.8.0 |
|
3.9.0 |
|
4.0.0 |
|
4.1.0 |
|
4.2.0 |
|
4.3.0 |
|
4.4.0 |
|
4.5.0 |
|
4.6.0 |
|
4.7.0 |
|
4.8.0 |
|
4.9.0 |
|
5.0.0 |
|
5.1.0 |
|
5.2.0 |
|
5.3.0 |
|
5.4.0 |
|
5.5.0 |
|
5.6.0 |
|
5.7.0 |
|
5.8.0 |
|
5.9.0 |
|
6.0.0 |
|
6.1.0 |
|
6.2.0 |
|
6.3.0 |
|
6.4.0 |
|
6.5.0 |
|
6.6.0 |
|
6.7.0 |
|
6.8.0 |
|
6.9.0 |
BOOST_PLAT_ANDROID
Android platform.
Symbol |
Version |
---|---|
|
detection |
BOOST_PLAT_CLOUDABI
CloudABI platform.
Symbol |
Version |
---|---|
|
detection |
BOOST_PLAT_IOS_DEVICE
BOOST_PLAT_IOS_SIMULATOR
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_PLAT_MINGW
MinGW platform, either variety. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
V.R.0 |
|
V.R.0 |
BOOST_PLAT_MINGW32
MinGW platform. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.0 |
BOOST_PLAT_MINGW64
MinGW-w64 platform. Version number available as major, minor, and patch.
Symbol |
Version |
---|---|
|
detection |
|
V.R.0 |
BOOST_PLAT_WINDOWS_DESKTOP
UWP for Windows Desktop development. Also available if the Platform SDK is too old to support UWP.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_PLAT_WINDOWS_PHONE
UWP for Windows Phone development.
Symbol |
Version |
---|---|
|
detection |
BOOST_PLAT_WINDOWS_RUNTIME
Deprecated.
UWP
for Windows Phone or Store development. This does not align to the existing
development model for UWP and is deprecated. Use one of the other BOOST_PLAT_WINDOWS_*
definitions
instead.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_PLAT_WINDOWS_SERVER
UWP for Windows Server development.
Symbol |
Version |
---|---|
|
detection |
BOOST_PLAT_WINDOWS_STORE
UWP for Windows Store development.
Symbol |
Version |
---|---|
|
detection |
|
detection |
BOOST_PLAT_WINDOWS_SYSTEM
UWP for Windows System development.
Symbol |
Version |
---|---|
|
detection |
BOOST_PLAT_WINDOWS_UWP
Universal Windows Platform is available if the current development environment is capable of targeting UWP development.
Symbol |
Version |
---|---|
|
|
|
|
SIMD predefs depend on compiler options. For example, you will have to
add the option -msse3
to clang or gcc to enable SSE3. SIMD predefs are also inclusive. This means
that if SSE3 is enabled, then every other extensions with a lower version
number will implicitly be enabled and detected. However, some extensions
are CPU specific, they may not be detected nor enabled when an upper version
is enabled.
![]() |
Note |
---|---|
SSE(1) and SSE2 are automatically enabled by default when using x86-64 architecture. |
To check if any SIMD extension has been enabled, you can use:
#include <boost/predef/hardware/simd.h> #include <iostream> int main() { #if defined(BOOST_HW_SIMD_AVAILABLE) std::cout << "SIMD detected!" << std::endl; #endif return 0; }
When writing SIMD specific code, you may want to check if a particular
extension has been detected. To do so you have to use the right architecture
predef and compare it. Those predef are of the form BOOST_HW_SIMD_"ARCH"
(where "ARCH"
is either ARM
, PPC
, or X86
).
For example, if you compile code for x86 architecture, you will have to
use BOOST_HW_SIMD_X86
.
Its value will be the version number of the most recent SIMD extension
detected for the architecture.
To check if an extension has been enabled:
#include <boost/predef/hardware/simd.h> #include <iostream> int main() { #if BOOST_HW_SIMD_X86 >= BOOST_HW_SIMD_X86_SSE3_VERSION std::cout << "This is SSE3!" << std::endl; #endif return 0; }
![]() |
Note |
---|---|
The _VERSION defines that map version number to actual real identifiers. This way it is easier to write comparisons without messing up with version numbers. |
To "stricly" check the most recent detected extension:
#include <boost/predef/hardware/simd.h> #include <iostream> int main() { #if BOOST_HW_SIMD_X86 == BOOST_HW_SIMD_X86_SSE3_VERSION std::cout << "This is SSE3 and this is the most recent enabled extension!" << std::endl; #endif return 0; }
Because of the version systems of predefs and of the inclusive property of SIMD extensions macros, you can easily check for ranges of supported extensions:
#include <boost/predef/hardware/simd.h> #include <iostream> int main() { #if BOOST_HW_SIMD_X86 >= BOOST_HW_SIMD_X86_SSE2_VERSION &&\ BOOST_HW_SIMD_X86 <= BOOST_HW_SIMD_X86_SSSE3_VERSION std::cout << "This is SSE2, SSE3 and SSSE3!" << std::endl; #endif return 0; }
![]() |
Note |
---|---|
Unlike gcc and clang, Visual Studio does not allow you to specify precisely the SSE variants you want to use, the only detections that will take place are SSE, SSE2, AVX and AVX2. For more informations, see here. |
BOOST_HW_SIMD
The SIMD extension detected for a specific architectures. Version number depends on the detected extension.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
BOOST_HW_SIMD_X86
The SIMD extension for x86 (if detected). Version number depends on the most recent detected extension.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
|
detection |
Symbol |
Version |
---|---|
|
BOOST_HW_SIMD_X86_SSE_VERSION |
|
BOOST_HW_SIMD_X86_SSE_VERSION |
|
BOOST_HW_SIMD_X86_SSE_VERSION |
|
BOOST_HW_SIMD_X86_SSE2_VERSION |
|
BOOST_HW_SIMD_X86_SSE2_VERSION |
|
BOOST_HW_SIMD_X86_SSE2_VERSION |
|
BOOST_HW_SIMD_X86_SSE3_VERSION |
|
BOOST_HW_SIMD_X86_SSSE3_VERSION |
|
BOOST_HW_SIMD_X86_SSE4_1_VERSION |
|
BOOST_HW_SIMD_X86_SSE4_2_VERSION |
|
BOOST_HW_SIMD_X86_AVX_VERSION |
|
BOOST_HW_SIMD_X86_FMA3_VERSION |
|
BOOST_HW_SIMD_X86_AVX2_VERSION |
BOOST_HW_SIMD_X86_AMD
The SIMD extension for x86 (AMD) (if detected). Version number depends on the most recent detected extension.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
Symbol |
Version |
---|---|
|
BOOST_HW_SIMD_X86_SSE4A_VERSION |
|
BOOST_HW_SIMD_X86_FMA4_VERSION |
|
BOOST_HW_SIMD_X86_XOP_VERSION |
|
BOOST_HW_SIMD_X86 |
![]() |
Note |
---|---|
This predef includes every other x86 SIMD extensions and also has other
more specific extensions (FMA4, XOP, SSE4a). You should use this predef
instead of |
BOOST_HW_SIMD_ARM
The SIMD extension for ARM (if detected). Version number depends on the most recent detected extension.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
Symbol |
Version |
---|---|
|
BOOST_HW_SIMD_ARM_NEON_VERSION |
|
BOOST_HW_SIMD_ARM_NEON_VERSION |
|
BOOST_HW_SIMD_ARM_NEON_VERSION |
|
BOOST_HW_SIMD_ARM_NEON_VERSION |
BOOST_HW_SIMD_PPC
The SIMD extension for PowerPC (if detected). Version number depends on the most recent detected extension.
Symbol |
Version |
---|---|
|
detection |
|
detection |
|
detection |
|
detection |
Symbol |
Version |
---|---|
|
BOOST_HW_SIMD_PPC_QPX_VERSION |
|
BOOST_HW_SIMD_PPC_VMX_VERSION |
|
BOOST_HW_SIMD_PPC_VMX_VERSION |
|
BOOST_HW_SIMD_PPC_VSX_VERSION |
Those defines represent x86 SIMD extensions versions.
![]() |
Note |
---|---|
You MUST compare them with the predef
|
BOOST_HW_SIMD_X86_MMX_VERSION
The MMX x86 extension version number.
Version number is: 0.99.0.
BOOST_HW_SIMD_X86_SSE_VERSION
The SSE x86 extension version number.
Version number is: 1.0.0.
BOOST_HW_SIMD_X86_SSE2_VERSION
The SSE2 x86 extension version number.
Version number is: 2.0.0.
BOOST_HW_SIMD_X86_SSE3_VERSION
The SSE3 x86 extension version number.
Version number is: 3.0.0.
BOOST_HW_SIMD_X86_SSSE3_VERSION
The SSSE3 x86 extension version number.
Version number is: 3.1.0.
BOOST_HW_SIMD_X86_SSE4_1_VERSION
The SSE4_1 x86 extension version number.
Version number is: 4.1.0.
BOOST_HW_SIMD_X86_SSE4_2_VERSION
The SSE4_2 x86 extension version number.
Version number is: 4.2.0.
BOOST_HW_SIMD_X86_AVX_VERSION
The AVX x86 extension version number.
Version number is: 5.0.0.
BOOST_HW_SIMD_X86_FMA3_VERSION
The FMA3 x86 extension version number.
Version number is: 5.2.0.
BOOST_HW_SIMD_X86_AVX2_VERSION
The AVX2 x86 extension version number.
Version number is: 5.3.0.
BOOST_HW_SIMD_X86_MIC_VERSION
The MIC (Xeon Phi) x86 extension version number.
Version number is: 9.0.0.
Those defines represent x86 (AMD specific) SIMD extensions versions.
![]() |
Note |
---|---|
You MUST compare them with the predef
|
BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION
SSE4A x86 extension (AMD specific).
Version number is: 4.0.0.
BOOST_HW_SIMD_X86_AMD_FMA4_VERSION
FMA4 x86 extension (AMD specific).
Version number is: 5.1.0.
BOOST_HW_SIMD_X86_AMD_XOP_VERSION
XOP x86 extension (AMD specific).
Version number is: 5.1.1.
Those defines represent ARM SIMD extensions versions.
![]() |
Note |
---|---|
You MUST compare them with the predef
|
BOOST_HW_SIMD_ARM_NEON_VERSION
The NEON ARM extension version number.
Version number is: 1.0.0.
Those defines represent Power PC SIMD extensions versions.
![]() |
Note |
---|---|
You MUST compare them with the predef
|
BOOST_HW_SIMD_PPC_VMX_VERSION
The VMX powerpc extension version number.
Version number is: 1.0.0.
BOOST_HW_SIMD_PPC_VSX_VERSION
The VSX powerpc extension version number.
Version number is: 1.1.0.
BOOST_HW_SIMD_PPC_QPX_VERSION
The QPX powerpc extension version number.
Version number is: 2.0.0.
BOOST_ENDIAN_*
Detection of endian memory ordering. There are four defined macros in this header that define the various generally possible endian memory orderings:
BOOST_ENDIAN_BIG_BYTE
,
byte-swapped big-endian.
BOOST_ENDIAN_BIG_WORD
,
word-swapped big-endian.
BOOST_ENDIAN_LITTLE_BYTE
,
byte-swapped little-endian.
BOOST_ENDIAN_LITTLE_WORD
,
word-swapped little-endian.
The detection is conservative in that it only identifies endianness that it knows for certain. In particular bi-endianness is not indicated as is it not practically possible to determine the endianness from anything but an operating system provided header. And the currently known headers do not define that programatic bi-endianness is available.
This implementation is a compilation of various publicly available information and acquired knowledge:
BOOST_PREDEF_WORKAROUND
BOOST_PREDEF_WORKAROUND(symbol,comp,major,minor,patch)
Usage:
#if BOOST_PREDEF_WORKAROUND(BOOST_COMP_CLANG,<,3,0,0) // Workaround for old clang compilers.. #endif
Defines a comparison against two version numbers that depends on the definion
of BOOST_STRICT_CONFIG
. When
BOOST_STRICT_CONFIG
is defined
this will expand to a value convertible to false
.
Which has the effect of disabling all code conditionally guarded by BOOST_PREDEF_WORKAROUND
. When BOOST_STRICT_CONFIG
is undefine this expand
to test the given symbol
version value with the comp
comparison against BOOST_VERSION_NUMBER(major,minor,patch)
.
BOOST_PREDEF_TESTED_AT
BOOST_PREDEF_TESTED_AT(symbol,major,minor,patch)
Usage:
#if BOOST_PREDEF_TESTED_AT(BOOST_COMP_CLANG,3,5,0) // Needed for clang, and last checked for 3.5.0. #endif
Defines a comparison against two version numbers that depends on the definion
of BOOST_STRICT_CONFIG
and
BOOST_DETECT_OUTDATED_WORKAROUNDS
.
When BOOST_STRICT_CONFIG
is defined this will expand to a value convertible to false
.
Which has the effect of disabling all code conditionally guarded by BOOST_PREDEF_TESTED_AT
. When BOOST_STRICT_CONFIG
is undefined this expand
to either:
true
when BOOST_DETECT_OUTDATED_WORKAROUNDS
is not defined.
true
when the expansion of BOOST_PREDEF_WORKAROUND(symbol, <=, major, minor, patch)
is true
and BOOST_DETECT_OUTDATED_WORKAROUNDS
is
defined.
BOOST_PREDEF_WORKAROUND(symbol, >, major, minor, patch)
is true and BOOST_DETECT_OUTDATED_WORKAROUNDS
is defined.
BOOST_VERSION_NUMBER
BOOST_VERSION_NUMBER(major,minor,patch)
Defines standard version numbers, with these properties:
major
number can
be in the [0,99] range.
minor
number can
be in the [0,99] range.
patch
number can
be in the [0,99999] range.
BOOST_VERSION_NUMBER_MAJOR(N), BOOST_VERSION_NUMBER_MINOR(N), BOOST_VERSION_NUMBER_PATCH(N)
The macros extract the major, minor, and patch portion from a well formed version number resulting in a preprocessor expression in the range of [0,99] or [0,99999] for the major and minor, or patch numbers respectively.
BOOST_PREDEF_MAKE_..
macros
These set of macros decompose common vendor version number macros which are composed version, revision, and patch digits. The naming convention indicates:
BOOST_PREDEF_MAKE_0X
"
for hexadecimal digits, and "BOOST_PREDEF_MAKE_10
"
for decimal digits.
V
"
indicates the version digits, "R
"
indicates the revision digits, "P
"
indicates the patch digits, and "0
"
indicates an ignored digit.
Macros are:
BOOST_PREDEF_MAKE_0X_VRP(V)
BOOST_PREDEF_MAKE_0X_VVRP(V)
BOOST_PREDEF_MAKE_0X_VRPP(V)
BOOST_PREDEF_MAKE_0X_VVRR(V)
BOOST_PREDEF_MAKE_0X_VRRPPPP(V)
BOOST_PREDEF_MAKE_0X_VVRRP(V)
BOOST_PREDEF_MAKE_0X_VRRPP000(V)
BOOST_PREDEF_MAKE_0X_VVRRPP(V)
BOOST_PREDEF_MAKE_10_VPPP(V)
BOOST_PREDEF_MAKE_10_VR0(V)
BOOST_PREDEF_MAKE_10_VRP(V)
BOOST_PREDEF_MAKE_10_VRP000(V)
BOOST_PREDEF_MAKE_10_VRPPPP(V)
BOOST_PREDEF_MAKE_10_VRPP(V)
BOOST_PREDEF_MAKE_10_VRR(V)
BOOST_PREDEF_MAKE_10_VRRPP(V)
BOOST_PREDEF_MAKE_10_VRR000(V)
BOOST_PREDEF_MAKE_10_VV00(V)
BOOST_PREDEF_MAKE_10_VVRR(V)
BOOST_PREDEF_MAKE_10_VVRRP(V)
BOOST_PREDEF_MAKE_10_VVRRPP(V)
BOOST_PREDEF_MAKE_10_VVRRPPP(V)
BOOST_PREDEF_MAKE_10_VVRR0PP00(V)
BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)
BOOST_PREDEF_MAKE_10_VVRR00PP00(V)
BOOST_PREDEF_MAKE_*..
date macros
Date decomposition macros return a date in the relative to the 1970 Epoch date. If the month is not available, January 1st is used as the month and day. If the day is not available, but the month is, the 1st of the month is used as the day.
BOOST_PREDEF_MAKE_DATE(Y,M,D)
BOOST_PREDEF_MAKE_YYYYMMDD(V)
BOOST_PREDEF_MAKE_YYYY(V)
BOOST_PREDEF_MAKE_YYYYMM(V)