bitsetHD< blockType, MemorySpace > Class Template Reference

Public Types

using BlockType = blockType
 
using blockViewType = Kokkos::View< BlockType *, Kokkos::LayoutLeft, MemorySpace >
 
using deviceType = typename blockViewType::device_type
 
using memory_space = typename blockViewType::memory_space
 
using execution_space = typename blockViewType::execution_space
 

Public Member Functions

 bitsetHD (const word &name, int32 numBits)
 
 bitsetHD (const bitsetHD &)=default
 
 bitsetHD (bitsetHD &&)=default
 
bitsetHDoperator= (const bitsetHD &)=default
 
bitsetHDoperator= (bitsetHD &&)=default
 
void set ()
 
void reset ()
 
void clear ()
 
INLINE_FUNCTION_HD void set (int32 pos) const
 
INLINE_FUNCTION_HD void unset (int32 pos) const
 
INLINE_FUNCTION_HD void reset (int32 pos) const
 
INLINE_FUNCTION_HD void flip (int32 pos) const
 
INLINE_FUNCTION_HD bool isSet (int32 pos) const
 
INLINE_FUNCTION_HD bool isUnset (int32 pos) const
 
INLINE_FUNCTION_HD bool isSetReset (int32 pos) const
 
INLINE_FUNCTION_HD int32 numBlocks () const
 
INLINE_FUNCTION_HD int32 numBits () const
 
INLINE_FUNCTION_HD int32 size () const
 
INLINE_FUNCTION_HD int32 capacity () const
 
INLINE_FUNCTION_H void realloc (int32 numBits)
 

Static Protected Member Functions

static INLINE_FUNCTION_HD int32 blockIndex (int32 pos)
 
static INLINE_FUNCTION_HD BlockType bitIndex (int32 pos)
 
static INLINE_FUNCTION_HD BlockType blockMask (int32 pos)
 
static INLINE_FUNCTION_HD int32 calculateBlockSize (int32 numBits)
 

Protected Attributes

int32 numBlocks_
 
int32 numBits_
 
blockViewType blocks_
 

Static Protected Attributes

const static int32 bitsPerBlock_ = std::numeric_limits<BlockType>::digits
 
const static int32 blockMask_ = bitsPerBlock_ - 1
 

Detailed Description

template<typename blockType, typename MemorySpace = void>
class pFlow::bitsetHD< blockType, MemorySpace >

Definition at line 37 of file bitsetHD.hpp.

Member Typedef Documentation

◆ BlockType

using BlockType = blockType

Definition at line 41 of file bitsetHD.hpp.

◆ blockViewType

using blockViewType = Kokkos::View<BlockType*, Kokkos::LayoutLeft, MemorySpace>

Definition at line 43 of file bitsetHD.hpp.

◆ deviceType

using deviceType = typename blockViewType::device_type

Definition at line 45 of file bitsetHD.hpp.

◆ memory_space

using memory_space = typename blockViewType::memory_space

Definition at line 47 of file bitsetHD.hpp.

◆ execution_space

using execution_space = typename blockViewType::execution_space

Definition at line 49 of file bitsetHD.hpp.

Constructor & Destructor Documentation

◆ bitsetHD() [1/3]

bitsetHD ( const word name,
int32  numBits 
)
inline

Definition at line 93 of file bitsetHD.hpp.

◆ bitsetHD() [2/3]

bitsetHD ( const bitsetHD< blockType, MemorySpace > &  )
default

◆ bitsetHD() [3/3]

bitsetHD ( bitsetHD< blockType, MemorySpace > &&  )
default

Member Function Documentation

◆ blockIndex()

◆ bitIndex()

static INLINE_FUNCTION_HD BlockType bitIndex ( int32  pos)
inlinestaticprotected

Definition at line 72 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::bitsPerBlock_.

◆ blockMask()

◆ calculateBlockSize()

static INLINE_FUNCTION_HD int32 calculateBlockSize ( int32  numBits)
inlinestaticprotected

Definition at line 84 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::bitsPerBlock_, and bitsetHD< blockType, MemorySpace >::numBits().

Referenced by bitsetHD< blockType, MemorySpace >::realloc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

bitsetHD& operator= ( const bitsetHD< blockType, MemorySpace > &  )
default

◆ operator=() [2/2]

bitsetHD& operator= ( bitsetHD< blockType, MemorySpace > &&  )
default

◆ set() [1/2]

void set ( )
inline

Definition at line 110 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::blocks_.

◆ reset() [1/2]

void reset ( )
inline

Definition at line 115 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::blocks_.

◆ clear()

void clear ( )
inline

Definition at line 120 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::blocks_.

◆ set() [2/2]

INLINE_FUNCTION_HD void set ( int32  pos) const
inline

◆ unset()

INLINE_FUNCTION_HD void unset ( int32  pos) const
inline

Definition at line 133 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::blockIndex(), bitsetHD< blockType, MemorySpace >::blockMask(), and bitsetHD< blockType, MemorySpace >::blocks_.

Referenced by bitsetHD< blockType, MemorySpace >::reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset() [2/2]

INLINE_FUNCTION_HD void reset ( int32  pos) const
inline

Definition at line 140 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::unset().

Here is the call graph for this function:

◆ flip()

INLINE_FUNCTION_HD void flip ( int32  pos) const
inline

◆ isSet()

INLINE_FUNCTION_HD bool isSet ( int32  pos) const
inline

Definition at line 153 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::blockIndex(), bitsetHD< blockType, MemorySpace >::blockMask(), and bitsetHD< blockType, MemorySpace >::blocks_.

Referenced by bitsetHD< blockType, MemorySpace >::isUnset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isUnset()

INLINE_FUNCTION_HD bool isUnset ( int32  pos) const
inline

Definition at line 160 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::isSet().

Here is the call graph for this function:

◆ isSetReset()

INLINE_FUNCTION_HD bool isSetReset ( int32  pos) const
inline

◆ numBlocks()

INLINE_FUNCTION_HD int32 numBlocks ( ) const
inline

Definition at line 176 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::numBlocks_.

◆ numBits()

INLINE_FUNCTION_HD int32 numBits ( ) const
inline

Definition at line 182 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::numBits_.

Referenced by bitsetHD< blockType, MemorySpace >::calculateBlockSize(), and bitsetHD< blockType, MemorySpace >::realloc().

Here is the caller graph for this function:

◆ size()

INLINE_FUNCTION_HD int32 size ( ) const
inline

Definition at line 188 of file bitsetHD.hpp.

References bitsetHD< blockType, MemorySpace >::numBits_.

◆ capacity()

◆ realloc()

Member Data Documentation

◆ numBlocks_

◆ numBits_

◆ blocks_

◆ bitsPerBlock_

◆ blockMask_

const static int32 blockMask_ = bitsPerBlock_ - 1
inlinestaticprotected

Definition at line 63 of file bitsetHD.hpp.

Referenced by bitsetHD< blockType, MemorySpace >::blockMask().


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