Class Mask

Nested Relationships

Nested Types

Class Documentation

class Mask

Public Functions

inline Mask(size_t log2dim)

Initialize all bits to zero.

inline Mask(size_t log2dim, bool on)

Initialize all bits to a given value.

inline Mask(const Mask &other)
inline Mask(Mask &&other)
inline ~Mask()
inline size_t memUsage() const

Return the memory footprint in bytes of this Mask.

inline uint32_t bitCount() const

Return the number of bits available in this Mask.

inline uint32_t wordCount() const

Return the number of machine words used by this Mask.

inline uint64_t getWord(size_t n) const
inline void setWord(size_t n, uint64_t v)
inline uint32_t countOn() const
inline bool operator==(const Mask &other) const
inline bool operator!=(const Mask &other) const
inline Iterator beginOn() const
inline bool isOn(uint32_t n) const

Return true if the given bit is set.

inline bool isOn() const

Return true if any bit is set.

inline bool isOff() const
inline bool setOn(uint32_t n)
inline bool setOff(uint32_t n)
inline void set(uint32_t n, bool On)
inline void setOn()

Set all bits on.

inline void setOff()

Set all bits off.

inline void set(bool on)

Set all bits to the value “on”.

inline void toggle()

Toggle the state of all bits in the mask.

inline void toggle(uint32_t n)

Toggle the state of one bit in the mask.

inline uint32_t findFirstOn() const
inline uint32_t size() const
class Iterator

Public Functions

inline Iterator(const Mask *parent)
inline Iterator(uint32_t pos, const Mask *parent)
Iterator &operator=(const Iterator&) = default
inline uint32_t operator*() const
inline operator bool() const
inline Iterator &operator++()