STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::sequential::bitset Class Reference

A sequential compressed set of bits, where each bit can be individually accessed. More...

Public Member Functions

 bitset (std::size_t n)
 Create the bitset with n elements. More...
 
bool get (std::size_t i) const
 Retrive the value of bit i. More...
 
 __attribute__ ((always_inline)) inline void set(std
 Set the value of bit at index i. More...
 
const_iterator begin () const
 Begin iterator of only the set bits in the set.
 
const_iterator end () const
 End iterator of only the set bits in the set.
 
std::size_t size () const
 The total number of elemnts in the set.
 
void swap (bitset &other)
 Swap the storage of another bitset.
 
bool empty () const
 Whether or not any bits are set.
 
void clear (void)
 Unset all of the bits.
 

Public Types

using const_iterator = detail::const_bitset_set_index_iterator
 

Detailed Description

A sequential compressed set of bits, where each bit can be individually accessed.

Constructor & Destructor Documentation

◆ bitset()

stapl::sequential::bitset::bitset ( std::size_t  n)

Create the bitset with n elements.

Parameters
Thenumber of elements (not bits) in the set

Member Function Documentation

◆ get()

bool stapl::sequential::bitset::get ( std::size_t  i) const

Retrive the value of bit i.

Parameters
Theindex of the bit to retrieve

◆ __attribute__()

stapl::sequential::bitset::__attribute__ ( (always_inline)  )

Set the value of bit at index i.

Parameters
Theindex of the bit to set

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