1 /* 2 * Distributed under the Boost Software License, Version 1.0. 3 * (See accompanying file LICENSE_1_0.txt or copy at 4 * http://www.boost.org/LICENSE_1_0.txt) 5 * 6 * Copyright (c) 2020 Andrey Semashev 7 */ 8 /*! 9 * \file find_address.hpp 10 * 11 * This file contains declaration of \c find_address algorithm 12 */ 13 14 #ifndef BOOST_ATOMIC_FIND_ADDRESS_HPP_INCLUDED_ 15 #define BOOST_ATOMIC_FIND_ADDRESS_HPP_INCLUDED_ 16 17 #include <cstddef> 18 #include <boost/predef/architecture/x86.h> 19 #include <boost/atomic/detail/config.hpp> 20 #include <boost/atomic/detail/int_sizes.hpp> 21 #include <boost/atomic/detail/header.hpp> 22 23 namespace boost { 24 namespace atomics { 25 namespace detail { 26 27 //! \c find_address signature 28 typedef std::size_t (find_address_t)(const volatile void* addr, const volatile void* const* addrs, std::size_t size); 29 30 extern find_address_t find_address_generic; 31 32 #if BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 || BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 4) 33 extern find_address_t find_address_sse2; 34 #if BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 35 extern find_address_t find_address_sse41; 36 #endif // BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 37 #endif // BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 || BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 4) 38 39 } // namespace detail 40 } // namespace atomics 41 } // namespace boost 42 43 #include <boost/atomic/detail/footer.hpp> 44 45 #endif // BOOST_ATOMIC_FIND_ADDRESS_HPP_INCLUDED_ 46