Go to the documentation of this file.
19 #ifndef viskores_Bitset_h
20 #define viskores_Bitset_h
35 template <
typename MaskType>
40 this->
Mask =
static_cast<MaskType
>(this->
Mask | (
static_cast<MaskType
>(1) << bitIndex));
48 this->
reset(bitIndex);
53 this->
Mask =
static_cast<MaskType
>(this->
Mask & ~(
static_cast<MaskType
>(1) << bitIndex));
58 this->
Mask = this->
Mask ^ (
static_cast<MaskType
>(0) << bitIndex);
63 return ((this->
Mask & (
static_cast<MaskType
>(1) << bitIndex)) != 0);
68 return this->
Mask == otherBitset.
Mask;
77 #endif //viskores_Bitset_h
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
bool test(viskores::Id bitIndex) const
Definition: Bitset.h:61
bool operator==(const viskores::Bitset< MaskType > &otherBitset) const
Definition: Bitset.h:66
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
Groups connected points that have the same field value.
Definition: Atomic.h:27
void set(viskores::Id bitIndex)
Definition: Bitset.h:38
void reset(viskores::Id bitIndex)
Definition: Bitset.h:51
A bitmap to serve different needs.
Definition: Bitset.h:36
void set(viskores::Id bitIndex, bool val)
Definition: Bitset.h:43
MaskType Mask
Definition: Bitset.h:72
void toggle(viskores::Id bitIndex)
Definition: Bitset.h:56