Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:35:35

0001 
0002 //          Copyright Oliver Kowalke 2017.
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //    (See accompanying file LICENSE_1_0.txt or copy at
0005 //          http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_FIBERS_NUMA_TOPOLOGY_H
0008 #define BOOST_FIBERS_NUMA_TOPOLOGY_H
0009 
0010 #include <cstdint>
0011 #include <set>
0012 #include <vector>
0013 
0014 #include <boost/config.hpp>
0015 
0016 #include <boost/fiber/detail/config.hpp>
0017 
0018 #ifdef BOOST_HAS_ABI_HEADERS
0019 # include BOOST_ABI_PREFIX
0020 #endif
0021 
0022 namespace boost {
0023 namespace fibers {
0024 namespace numa {
0025 
0026 struct node {
0027     std::uint32_t                   id;
0028     std::set< std::uint32_t >       logical_cpus;
0029     std::vector< std::uint32_t >    distance;
0030 };
0031 
0032 inline
0033 bool operator<( node const& lhs, node const& rhs) noexcept {
0034     return lhs.id < rhs.id;
0035 }
0036 
0037 BOOST_FIBERS_DECL
0038 std::vector< node > topology();
0039 
0040 }}}
0041 
0042 #ifdef BOOST_HAS_ABI_HEADERS
0043 # include BOOST_ABI_SUFFIX
0044 #endif
0045 
0046 #endif // BOOST_FIBERS_NUMA_TOPOLOGY_H