]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/fiber/numa/topology.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / fiber / numa / topology.hpp
CommitLineData
b32b8144
FG
1
2// Copyright Oliver Kowalke 2017.
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)
6
7#ifndef BOOST_FIBERS_NUMA_TOPOLOGY_H
8#define BOOST_FIBERS_NUMA_TOPOLOGY_H
9
10#include <cstdint>
11#include <set>
12#include <vector>
13
14#include <boost/config.hpp>
15
16#include <boost/fiber/detail/config.hpp>
17
18#ifdef BOOST_HAS_ABI_HEADERS
19# include BOOST_ABI_PREFIX
20#endif
21
22namespace boost {
23namespace fibers {
24namespace numa {
25
26struct node {
27 std::uint32_t id;
28 std::set< std::uint32_t > logical_cpus;
29 std::vector< std::uint32_t > distance;
30};
31
32inline
33bool operator<( node const& lhs, node const& rhs) noexcept {
34 return lhs.id < rhs.id;
35}
36
37BOOST_FIBERS_DECL
38std::vector< node > topology();
39
40}}}
41
42#ifdef BOOST_HAS_ABI_HEADERS
43# include BOOST_ABI_SUFFIX
44#endif
45
46#endif // BOOST_FIBERS_NUMA_TOPOLOGY_H