ZXFoundation™ 26h2
Loading...
Searching...
No Matches
lib.cpumask Module Reference

Data Structures

class  lib::cpumask
 A fixed-capacity, SMP-aware set of CPU identifiers. More...

Functions

auto any () const noexcept -> bool
 Returns true if the set is non-empty.
static constexpr auto capacity () noexcept -> usize
 Maximum number of CPUs this mask can represent.
auto clear (usize cpu, memory_order order=memory_order::seq_cst) noexcept -> void
 Atomically remove a CPU from the set.
auto clear_relaxed (usize cpu) noexcept -> void
 Non-atomically remove a CPU (use only when externally serialized).
auto count () const noexcept -> usize
 Number of CPUs currently in the set.
auto first_set () const noexcept -> std::optional< usize >
 Index of the lowest-numbered member.
template<typename Fn>
auto for_each (Fn &&fn, memory_order confirm=memory_order::acquire) const noexcept -> void
 Invoke fn for every member CPU, in ascending id order.
auto next_set (usize after) const noexcept -> std::optional< usize >
 Index of the lowest-numbered member strictly after after.
auto none () const noexcept -> bool
 Returns true if the set is empty.
auto reset () noexcept -> void
 Remove every CPU from the set.
auto set (usize cpu, memory_order order=memory_order::seq_cst) noexcept -> void
 Atomically add a CPU to the set.
auto set_relaxed (usize cpu) noexcept -> void
 Non-atomically add a CPU (use only when externally serialized).
auto test (usize cpu, memory_order order=memory_order::relaxed) const noexcept -> bool
 Atomically test whether a CPU is in the set.

Files

file  lib/cpumask.cxxm
 Fixed-capacity CPU set primitive built on lib::static_bitmap.