Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:31

0001 /*
0002  *          Copyright Andrey Semashev 2013, 2022.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          https://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   uuid/detail/config.hpp
0009  *
0010  * \brief  This header defines configuration macros for Boost.UUID.
0011  */
0012 
0013 #ifndef BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_
0014 #define BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_
0015 
0016 #include <boost/config.hpp>
0017 
0018 #ifdef BOOST_HAS_PRAGMA_ONCE
0019 #pragma once
0020 #endif
0021 
0022 #if !defined(BOOST_UUID_NO_SIMD)
0023 
0024 #if defined(__GNUC__) && defined(__SSE2__)
0025 
0026 // GCC and its pretenders go here
0027 #ifndef BOOST_UUID_USE_SSE2
0028 #define BOOST_UUID_USE_SSE2
0029 #endif
0030 
0031 #if defined(__SSE3__) && !defined(BOOST_UUID_USE_SSE3)
0032 #define BOOST_UUID_USE_SSE3
0033 #endif
0034 
0035 #if defined(__SSE4_1__) && !defined(BOOST_UUID_USE_SSE41)
0036 #define BOOST_UUID_USE_SSE41
0037 #endif
0038 
0039 #if defined(__AVX__) && !defined(BOOST_UUID_USE_AVX)
0040 #define BOOST_UUID_USE_AVX
0041 #endif
0042 
0043 #elif defined(_MSC_VER)
0044 
0045 #if (defined(_M_X64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2)) && !defined(BOOST_UUID_USE_SSE2)
0046 #define BOOST_UUID_USE_SSE2
0047 #endif
0048 
0049 #if defined(__AVX__)
0050 #if !defined(BOOST_UUID_USE_AVX)
0051 #define BOOST_UUID_USE_AVX
0052 #endif
0053 #if !defined(BOOST_UUID_USE_SSE41)
0054 #define BOOST_UUID_USE_SSE41
0055 #endif
0056 #if !defined(BOOST_UUID_USE_SSE3)
0057 #define BOOST_UUID_USE_SSE3
0058 #endif
0059 #if !defined(BOOST_UUID_USE_SSE2)
0060 #define BOOST_UUID_USE_SSE2
0061 #endif
0062 #endif
0063 
0064 #endif
0065 
0066 // More advanced ISA extensions imply less advanced are also available
0067 #if !defined(BOOST_UUID_USE_SSE41) && defined(BOOST_UUID_USE_AVX)
0068 #define BOOST_UUID_USE_SSE41
0069 #endif
0070 
0071 #if !defined(BOOST_UUID_USE_SSE3) && defined(BOOST_UUID_USE_SSE41)
0072 #define BOOST_UUID_USE_SSE3
0073 #endif
0074 
0075 #if !defined(BOOST_UUID_USE_SSE2) && defined(BOOST_UUID_USE_SSE3)
0076 #define BOOST_UUID_USE_SSE2
0077 #endif
0078 
0079 #if !defined(BOOST_UUID_NO_SIMD) && \
0080     !defined(BOOST_UUID_USE_AVX) && \
0081     !defined(BOOST_UUID_USE_SSE41) && \
0082     !defined(BOOST_UUID_USE_SSE3) && \
0083     !defined(BOOST_UUID_USE_SSE2)
0084 #define BOOST_UUID_NO_SIMD
0085 #endif
0086 
0087 #endif // !defined(BOOST_UUID_NO_SIMD)
0088 
0089 #endif // BOOST_UUID_DETAIL_CONFIG_HPP_INCLUDED_