Viskores  1.0
Public Member Functions | Private Attributes | List of all members
viskores::Bitset< MaskType > Struct Template Reference

A bitmap to serve different needs. More...

#include <Bitset.h>

Public Member Functions

void set (viskores::Id bitIndex)
 
void set (viskores::Id bitIndex, bool val)
 
void reset (viskores::Id bitIndex)
 
void toggle (viskores::Id bitIndex)
 
bool test (viskores::Id bitIndex) const
 
bool operator== (const viskores::Bitset< MaskType > &otherBitset) const
 

Private Attributes

MaskType Mask = 0
 

Detailed Description

template<typename MaskType>
struct viskores::Bitset< MaskType >

A bitmap to serve different needs.

Ex. Editing particular bits in a byte(s), checkint if particular bit values are present or not. Once Cuda supports std::bitset, we should use the standard one if possible. Additional cast in logical operations are required to avoid compiler warnings when using 16 or 8 bit MaskType.

Member Function Documentation

◆ operator==()

template<typename MaskType >
bool viskores::Bitset< MaskType >::operator== ( const viskores::Bitset< MaskType > &  otherBitset) const
inline

◆ reset()

template<typename MaskType >
void viskores::Bitset< MaskType >::reset ( viskores::Id  bitIndex)
inline

◆ set() [1/2]

template<typename MaskType >
void viskores::Bitset< MaskType >::set ( viskores::Id  bitIndex)
inline

◆ set() [2/2]

template<typename MaskType >
void viskores::Bitset< MaskType >::set ( viskores::Id  bitIndex,
bool  val 
)
inline

◆ test()

template<typename MaskType >
bool viskores::Bitset< MaskType >::test ( viskores::Id  bitIndex) const
inline

◆ toggle()

template<typename MaskType >
void viskores::Bitset< MaskType >::toggle ( viskores::Id  bitIndex)
inline

Member Data Documentation

◆ Mask

template<typename MaskType >
MaskType viskores::Bitset< MaskType >::Mask = 0
private

The documentation for this struct was generated from the following file: