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
VTKM_EXEC_CONT void reset(vtkm::Id bitIndex)
Definition: Bitset.h:43
A bitmap to serve different needs.
Definition: Bitset.h:28
VTKM_EXEC_CONT void set(vtkm::Id bitIndex, bool val)
Definition: Bitset.h:35
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
VTKM_EXEC_CONT bool test(vtkm::Id bitIndex) const
Definition: Bitset.h:53
VTKM_EXEC_CONT bool operator==(const vtkm::Bitset< MaskType > &otherBitset) const
Definition: Bitset.h:58
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_EXEC_CONT void toggle(vtkm::Id bitIndex)
Definition: Bitset.h:48
MaskType Mask
Definition: Bitset.h:64
VTKM_EXEC_CONT void set(vtkm::Id bitIndex)
Definition: Bitset.h:30