|
MADNESS 0.10.1
|
Description of the CPU affinity of the calling process. More...
#include <thread_binding.h>
Public Member Functions | |
| std::size_t | ncpu_allowed () const |
| Number of hardware threads this process may run on. | |
Public Attributes | |
| bool | available = false |
| std::vector< int > | cpus |
| Logical (hardware thread) ids this process is allowed to run on. | |
| int | ncpu_configured = 0 |
| Number of logical CPUs configured on this host (not just allowed). | |
| std::vector< int > | numa_nodes |
Description of the CPU affinity of the calling process.
Filled in by get_thread_binding_info(); all information is obtained from the OS (sched_getaffinity(2) and sysfs), no external library is needed.
|
inline |
Number of hardware threads this process may run on.
References cpus.
Referenced by madness::check_thread_binding().
True if the platform exposes CPU affinity (Linux). On macOS, or if the affinity query failed, this is false and all other members are meaningless.
Referenced by madness::check_thread_binding(), and madness::get_thread_binding_info().
| std::vector<int> madness::ThreadBindingInfo::cpus |
Logical (hardware thread) ids this process is allowed to run on.
Referenced by madness::check_thread_binding(), madness::get_thread_binding_info(), and ncpu_allowed().
| int madness::ThreadBindingInfo::ncpu_configured = 0 |
Number of logical CPUs configured on this host (not just allowed).
Referenced by madness::check_thread_binding(), and madness::get_thread_binding_info().
| std::vector<int> madness::ThreadBindingInfo::numa_nodes |
Distinct NUMA nodes spanned by cpus, sorted; empty if the NUMA topology could not be determined.
Referenced by madness::check_thread_binding(), and madness::get_thread_binding_info().