libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::numa_cpu_traits Struct Reference

#include <numa_traits.hpp>

Public Types

enum  : std::size_t { total_cores =12 }
 
enum  : bool { is_numa =true }
 
using element_type = std::array< std::array< unsigned short, 6 >, 2 >
 

Static Public Attributes

static constexpr element_type node_mapping {{{0, 1, 2, 3, 4, 5}, {6, 7, 8, 9, 10, 11}}}
 This provides a mapping of all sequentially-listed NUMA-nodes to the cores they contain and the mapping of those cores to to that returned by numactl and /proc/cpuinfo. More...
 

Detailed Description

Definition at line 34 of file numa_traits.hpp.

Member Typedef Documentation

◆ element_type

using jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::numa_cpu_traits::element_type = std::array<std::array<unsigned short, 6>, 2>

Definition at line 41 of file numa_traits.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : std::size_t
Enumerator
total_cores 

Definition at line 35 of file numa_traits.hpp.

◆ anonymous enum

anonymous enum : bool
Enumerator
is_numa 

Definition at line 38 of file numa_traits.hpp.

Member Data Documentation

◆ node_mapping

constexpr element_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::numa_cpu_traits::node_mapping {{{0, 1, 2, 3, 4, 5}, {6, 7, 8, 9, 10, 11}}}
inlinestaticconstexpr

This provides a mapping of all sequentially-listed NUMA-nodes to the cores they contain and the mapping of those cores to to that returned by numactl and /proc/cpuinfo.

So one can use this mapping to pin, set priority, etc physical OS-threads and assign tasks to them as appropriate to make more efficient use of the NUMA topology of the target system. Note that kernel options such as CONFIG_NUMA, CONFIG_NUMA_BALANCING, CONFIG_NUMA_BALANCING_DEFAULT_ENABLED, etc may need to be enabled.

Definition at line 47 of file numa_traits.hpp.


The documentation for this struct was generated from the following file: