aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/boost/atomic/src/find_address.hpp
blob: c841c68e22a44d580b7084fc6157dfd595d0bd64 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * 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)
 *
 * Copyright (c) 2020 Andrey Semashev
 */
/*!
 * \file   find_address.hpp
 *
 * This file contains declaration of \c find_address algorithm
 */

#ifndef BOOST_ATOMIC_FIND_ADDRESS_HPP_INCLUDED_
#define BOOST_ATOMIC_FIND_ADDRESS_HPP_INCLUDED_

#include <cstddef>
#include <boost/predef/architecture/x86.h>
#include <boost/atomic/detail/config.hpp>
#include <boost/atomic/detail/int_sizes.hpp>
#include <boost/atomic/detail/header.hpp>

namespace boost {
namespace atomics {
namespace detail {

//! \c find_address signature
typedef std::size_t (find_address_t)(const volatile void* addr, const volatile void* const* addrs, std::size_t size);

extern find_address_t find_address_generic;

#if BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 || BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 4)
extern find_address_t find_address_sse2;
#if BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8
extern find_address_t find_address_sse41;
#endif // BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8
#endif // BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 || BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 4)

} // namespace detail
} // namespace atomics
} // namespace boost

#include <boost/atomic/detail/footer.hpp>

#endif // BOOST_ATOMIC_FIND_ADDRESS_HPP_INCLUDED_