Go to the documentation of this file.
11 #ifndef vtk_m_Bitset_h
12 #define vtk_m_Bitset_h
27 template <
typename MaskType>
32 this->
Mask =
static_cast<MaskType
>(this->
Mask | (
static_cast<MaskType
>(1) << bitIndex));
40 this->
reset(bitIndex);
45 this->
Mask =
static_cast<MaskType
>(this->
Mask & ~(
static_cast<MaskType
>(1) << bitIndex));
50 this->
Mask = this->
Mask ^ (
static_cast<MaskType
>(0) << bitIndex);
55 return ((this->
Mask & (
static_cast<MaskType
>(1) << bitIndex)) != 0);
60 return this->
Mask == otherBitset.
Mask;
69 #endif //vtk_m_Bitset_h
A bitmap to serve different needs.
Definition: Bitset.h:28
Groups connected points that have the same field value.
Definition: Atomic.h:19
bool operator==(const vtkm::Bitset< MaskType > &otherBitset) const
Definition: Bitset.h:58
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
bool test(vtkm::Id bitIndex) const
Definition: Bitset.h:53
void reset(vtkm::Id bitIndex)
Definition: Bitset.h:43
void toggle(vtkm::Id bitIndex)
Definition: Bitset.h:48
MaskType Mask
Definition: Bitset.h:64
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
void set(vtkm::Id bitIndex, bool val)
Definition: Bitset.h:35
void set(vtkm::Id bitIndex)
Definition: Bitset.h:30