2 * Copyright Andrey Semashev 2013.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
8 * \file uuid/detail/config.hpp
10 * \brief This header defines configuration macros for Boost.UUID.
13 #ifndef BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_
14 #define BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_
16 #include <boost/config.hpp>
18 #ifdef BOOST_HAS_PRAGMA_ONCE
22 #if !defined(BOOST_UUID_NO_SIMD)
24 #if defined(__GNUC__) && defined(__SSE2__)
26 // GCC and its pretenders go here
27 #ifndef BOOST_UUID_USE_SSE2
28 #define BOOST_UUID_USE_SSE2
31 #if defined(__SSE3__) && !defined(BOOST_UUID_USE_SSE3)
32 #define BOOST_UUID_USE_SSE3
35 #if defined(__SSE4_1__) && !defined(BOOST_UUID_USE_SSE41)
36 #define BOOST_UUID_USE_SSE41
39 #elif defined(_MSC_VER)
41 #if (defined(_M_X64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2)) && !defined(BOOST_UUID_USE_SSE2)
42 #define BOOST_UUID_USE_SSE2
46 #if !defined(BOOST_UUID_USE_SSE41)
47 #define BOOST_UUID_USE_SSE41
49 #if !defined(BOOST_UUID_USE_SSE3)
50 #define BOOST_UUID_USE_SSE3
52 #if !defined(BOOST_UUID_USE_SSE2)
53 #define BOOST_UUID_USE_SSE2
59 // More advanced ISA extensions imply less advanced are also available
60 #if !defined(BOOST_UUID_USE_SSE3) && defined(BOOST_UUID_USE_SSE41)
61 #define BOOST_UUID_USE_SSE3
64 #if !defined(BOOST_UUID_USE_SSE2) && defined(BOOST_UUID_USE_SSE3)
65 #define BOOST_UUID_USE_SSE2
68 #if !defined(BOOST_UUID_NO_SIMD) && !defined(BOOST_UUID_USE_SSE41) && !defined(BOOST_UUID_USE_SSE3) && !defined(BOOST_UUID_USE_SSE2)
69 #define BOOST_UUID_NO_SIMD
72 #endif // !defined(BOOST_UUID_NO_SIMD)
74 #endif // BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_