|
NUMA++ 0.11.0
|
Generic bitmask. More...
#include <bitmask.hpp>
Public Member Functions | |
| Bitmask & | operator= (Bitmask const &rhs) noexcept |
| Copy from rhs to this. | |
Comparison | |
| bool | operator== (Bitmask const &rhs) const noexcept |
| bool | operator!= (Bitmask const &rhs) const noexcept |
Accessors | |
| struct bitmask const * | GetNative () const noexcept |
| Access native bitmask type. | |
| struct bitmask * | GetNative () noexcept |
| Access native bitmask type. | |
| std::size_t | GetSize () const noexcept |
| Query number of bits in mask. | |
| bool | Test (unsigned int position) const noexcept |
| Test if bit in specified position is set. | |
Modifiers | |
If specified bit position is outside valid range no operations is performed. This behaviour is inherited from libnuma. | |
| Bitmask & | Set (unsigned int position, bool value=true) noexcept |
| Set bit in position to specified value. | |
| Bitmask & | Reset (unsigned int position) noexcept |
| Sets bit in specified position to false. | |
Protected Member Functions | |
| Bitmask (NumaBitmaskPtr &&bitmask) | |
| Construction from native bitmask type can be error prone in that the mask wasn't allocated using the correction function. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<class Class, class F> | |
| void | ForEach (Bitmask< Class > const &bitmask, F &&f, bool value=true) |
| Invoke function for each bit in mask that matches value. | |
| template<class Class> | |
| std::ostream & | FormatBitmask (std::ostream &os, Bitmask< Class > const &mask, int min_bits) |
| Formats mask and inserts it to os. | |
| std::ostream & | FormatBitmask (std::ostream &os, bitmask const *mask, int min_bits) |
| Formats mask and inserts it to os. | |
Generic bitmask.
Definition at line 55 of file bitmask.hpp.
|
inlineprotected |
Construction from native bitmask type can be error prone in that the mask wasn't allocated using the correction function.
To prevent mistakes this is made protected so it can only be used by the concrete implementations.
Definition at line 180 of file bitmask.hpp.
|
inlinenoexcept |
Access native bitmask type.
Definition at line 104 of file bitmask.hpp.
|
inlinenoexcept |
Access native bitmask type.
Definition at line 112 of file bitmask.hpp.
|
inlinenodiscardnoexcept |
Query number of bits in mask.
Definition at line 121 of file bitmask.hpp.
|
inlinenodiscardnoexcept |
Definition at line 90 of file bitmask.hpp.
|
inlinenoexcept |
Copy from rhs to this.
| rhs | bitmask to copy from. |
Definition at line 71 of file bitmask.hpp.
|
inlinenodiscardnoexcept |
Definition at line 84 of file bitmask.hpp.
|
inlinenoexcept |
Sets bit in specified position to false.
| position | Zero-indexed bit position to modify. |
Definition at line 169 of file bitmask.hpp.
|
inlinenoexcept |
Set bit in position to specified value.
| position | Zero-indexed bit position to modify. |
| value | Bit value to set (default true). |
Definition at line 152 of file bitmask.hpp.
|
inlinenodiscardnoexcept |
Test if bit in specified position is set.
| position | Zero-indexed bit position to test. |
Definition at line 131 of file bitmask.hpp.