A VdfMask is placed on connections to specify the data flowing through them.
More...
#include <mask.h>
A VdfMask is placed on connections to specify the data flowing through them.
Definition at line 36 of file mask.h.
Typedef on the internal bitset implementation used.
Definition at line 38 of file mask.h.
Constructs an empty mask.
Definition at line 47 of file mask.h.
| VdfMask::VdfMask |
( |
size_t |
size | ) |
|
|
inlineexplicit |
Constructs a mask of size size.
Definition at line 51 of file mask.h.
Constructs a mask by moving the contents of bits into the mask.
*bits may not be used after passing it to this constructor.
Definition at line 85 of file mask.h.
| static VdfMask VdfMask::AllOnes |
( |
size_t |
size | ) |
|
|
inlinestatic |
Returns a mask of the requested size that will iterate over all elements.
Definition at line 494 of file mask.h.
| static VdfMask VdfMask::AllZeros |
( |
size_t |
size | ) |
|
|
inlinestatic |
Returns a mask of the requested size where no element is set.
Definition at line 509 of file mask.h.
Returns an iterator that can be used to iterate through the elements of the mask.
Definition at line 482 of file mask.h.
| void VdfMask::ClearIndex |
( |
size_t |
index | ) |
|
|
inline |
Removes the given index from the mask.
The corresponding element will be cleared after this call.
Definition at line 143 of file mask.h.
Complement. Flips all the bits in the mask.
Definition at line 372 of file mask.h.
| bool VdfMask::Contains |
( |
const VdfMask & |
mask | ) |
const |
|
inline |
Returns true if mask is a subset-of or equal to this mask, false otherwise.
Definition at line 186 of file mask.h.
Get this mask's content as CtCompressedfBits. This should not be used except where performance is critical.
Definition at line 556 of file mask.h.
| size_t VdfMask::GetFirstSet |
( |
| ) |
const |
|
inline |
Returns the first set bit in the mask.
Definition at line 226 of file mask.h.
| size_t VdfMask::GetHash |
( |
| ) |
const |
|
inline |
Returns a hash for the mask.
Definition at line 565 of file mask.h.
| size_t VdfMask::GetLastSet |
( |
| ) |
const |
|
inline |
Returns the last set bit in the mask.
Definition at line 236 of file mask.h.
| size_t VdfMask::GetMemoryUsage |
( |
| ) |
const |
|
inline |
Returns the amount of memory in bytes used by this mask. Note that masks are now shared, so this method is of dubious value.
Definition at line 539 of file mask.h.
| size_t VdfMask::GetNumSet |
( |
| ) |
const |
|
inline |
Returns the number of set bits in the mask.
Definition at line 246 of file mask.h.
| std::string VdfMask::GetRLEString |
( |
| ) |
const |
|
inline |
Returns the mask in an RLE format.
This is useful for debugging large masks. For example, the output of a mask that is 110001111 would be: 1x2-0x3-1x4
Definition at line 528 of file mask.h.
| size_t VdfMask::GetSize |
( |
| ) |
const |
|
inline |
Returns the size of the mask.
This is the number of elements that can be indexed in the mask, not the number of elements set.
Definition at line 158 of file mask.h.
| bool VdfMask::IsAllOnes |
( |
| ) |
const |
|
inline |
Returns true if this mask has all entries set.
Definition at line 196 of file mask.h.
| bool VdfMask::IsAllZeros |
( |
| ) |
const |
|
inline |
Returns true if this mask has all entries unset.
Definition at line 206 of file mask.h.
| bool VdfMask::IsAnySet |
( |
| ) |
const |
|
inline |
Returns true, if there is at least a single set entry.
Definition at line 216 of file mask.h.
| bool VdfMask::IsContiguous |
( |
| ) |
const |
|
inline |
Returns true if the set bits in the mask are contiguous.
Note: This returns false if there are no set bits in the mask.
Definition at line 258 of file mask.h.
| bool VdfMask::IsEmpty |
( |
| ) |
const |
|
inline |
Returns true if this mask is empty, i.e. it is of size zero.
Definition at line 168 of file mask.h.
| bool VdfMask::IsSet |
( |
size_t |
index | ) |
const |
|
inline |
Returns true if mask at index is set
Definition at line 131 of file mask.h.
Returns true if this and rhs are equal, false otherwise.
Definition at line 275 of file mask.h.
Returns true if this and rhs are equal, false otherwise.
Definition at line 303 of file mask.h.
Ands two masks together.
The result is that an element is set iff it is set in both masks.
Definition at line 294 of file mask.h.
Returns true if this and rhs are equal, false otherwise.
Definition at line 364 of file mask.h.
Performs an asymmetric set difference.
This method turns off the bits that are set in both this and in rhs.
Definition at line 353 of file mask.h.
| bool VdfMask::operator== |
( |
const VdfMask & |
rhs | ) |
const |
|
inline |
Returns true if this and rhs are equal, false otherwise.
Definition at line 271 of file mask.h.
Returns true if this and rhs are equal, false otherwise.
Definition at line 342 of file mask.h.
Xors two masks together.
The result is that an element is set iff it is set in exactly one of the two masks.
Definition at line 333 of file mask.h.
Returns true if this and rhs are equal, false otherwise.
Definition at line 322 of file mask.h.
Ors two masks together.
The result is that an element is set iff it is set in either mask.
Definition at line 313 of file mask.h.
| bool VdfMask::Overlaps |
( |
const VdfMask & |
mask | ) |
const |
|
inline |
Returns true if this mask and mask have any set entries in common, and false otherwise.
Definition at line 175 of file mask.h.
Enables all the bits in the mask.
Definition at line 105 of file mask.h.
| void VdfMask::SetIndex |
( |
size_t |
index | ) |
|
|
inline |
Adds the given index to the mask.
The corresponding element will be set after this call.
Definition at line 119 of file mask.h.
Sets this mask to rhs if this mask is of zero size. Otherwise, will or rhs to this mask.
Definition at line 385 of file mask.h.
Swap this mask's bits with rhs.
Definition at line 93 of file mask.h.
| VDF_API std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const VdfMask & |
mask |
|
) |
| |
|
friend |
Swap lhs's bits with rhs.
Definition at line 99 of file mask.h.
| void TfDelegatedCountDecrement |
( |
VdfMask::_BitsImpl * |
p | ) |
|
|
friend |
| void TfDelegatedCountIncrement |
( |
VdfMask::_BitsImpl * |
p | ) |
|
|
friend |
| friend class Vdf_MaskRegistry |
|
friend |
The documentation for this class was generated from the following file: