#include <thread_affinity.hpp>
|
| | thread_affinity ()=default |
| | Construct an empty affinity set (no CPU pinning requested).
|
| |
| | thread_affinity (std::vector< cpu_id > cpus) |
| | Construct from a list of CPUs.
|
| |
| | thread_affinity (std::initializer_list< cpu_id > cpus) |
| | Construct from an initializer list of CPUs.
|
| |
| void | add_cpu (cpu_id cpu) |
| | Add a CPU to the affinity set.
|
| |
| void | remove_cpu (cpu_id cpu) |
| | Remove a CPU from the affinity set.
|
| |
| void | clear () noexcept |
| | Remove all CPUs from the affinity set.
|
| |
| auto | contains (cpu_id cpu) const noexcept -> bool |
| | Check whether a CPU is present in the affinity set.
|
| |
| auto | empty () const noexcept -> bool |
| | Return whether the affinity set is empty.
|
| |
| auto | cpus () const noexcept -> std::vector< cpu_id > const & |
| | Return the normalized sorted list of CPUs in the set.
|
| |
Definition at line 18 of file thread_affinity.hpp.
◆ thread_affinity() [1/3]
| threadschedule::thread_affinity::thread_affinity |
( |
| ) |
|
|
default |
Construct an empty affinity set (no CPU pinning requested).
◆ thread_affinity() [2/3]
| threadschedule::thread_affinity::thread_affinity |
( |
std::vector< cpu_id > |
cpus | ) |
|
|
inlineexplicit |
Construct from a list of CPUs.
- Parameters
-
| cpus | CPU identifiers; duplicates are removed and values are sorted. |
Definition at line 27 of file thread_affinity.hpp.
◆ thread_affinity() [3/3]
| threadschedule::thread_affinity::thread_affinity |
( |
std::initializer_list< cpu_id > |
cpus | ) |
|
|
inline |
Construct from an initializer list of CPUs.
- Parameters
-
| cpus | CPU identifiers; duplicates are removed and values are sorted. |
Definition at line 36 of file thread_affinity.hpp.
◆ add_cpu()
| void threadschedule::thread_affinity::add_cpu |
( |
cpu_id |
cpu | ) |
|
|
inline |
◆ clear()
| void threadschedule::thread_affinity::clear |
( |
| ) |
|
|
inlinenoexcept |
◆ contains()
| auto threadschedule::thread_affinity::contains |
( |
cpu_id |
cpu | ) |
const -> bool
|
|
inlinenoexcept |
Check whether a CPU is present in the affinity set.
- Parameters
-
| cpu | CPU identifier to test. |
Definition at line 76 of file thread_affinity.hpp.
Referenced by add_cpu().
◆ cpus()
| auto threadschedule::thread_affinity::cpus |
( |
| ) |
const -> std::vector<cpu_id> const&
|
|
inlinenoexcept |
◆ empty()
| auto threadschedule::thread_affinity::empty |
( |
| ) |
const -> bool
|
|
inlinenoexcept |
◆ remove_cpu()
| void threadschedule::thread_affinity::remove_cpu |
( |
cpu_id |
cpu | ) |
|
|
inline |
The documentation for this class was generated from the following file: