Concurrent dynamically allocated bitset.
More...
#include <DynamicBitset.h>
|
static constexpr uint32_t | bits_uint64 = sizeof(uint64_t) * CHAR_BIT |
|
Concurrent dynamically allocated bitset.
galois::DynamicBitSet::DynamicBitSet |
( |
| ) |
|
|
inline |
Constructor which initializes to an empty bitset.
void galois::DynamicBitSet::bitwise_and |
( |
const DynamicBitSet & |
other | ) |
|
|
inline |
Does an IN-PLACE bitwise and of this bitset and another bitset.
- Parameters
-
other | Other bitset to do bitwise and with |
Does an IN-PLACE bitwise and of 2 passed in bitsets and saves to this bitset.
- Parameters
-
other1 | Bitset to and with other 2 |
other2 | Bitset to and with other 1 |
void galois::DynamicBitSet::bitwise_or |
( |
const DynamicBitSet & |
other | ) |
|
|
inline |
void galois::DynamicBitSet::bitwise_xor |
( |
const DynamicBitSet & |
other | ) |
|
|
inline |
Does an IN-PLACE bitwise xor of this bitset and another bitset.
- Parameters
-
other | Other bitset to do bitwise xor with |
Does an IN-PLACE bitwise and of 2 passed in bitsets and saves to this bitset.
- Parameters
-
other1 | Bitset to xor with other 2 |
other2 | Bitset to xor with other 1 |
uint64_t galois::DynamicBitSet::count |
( |
| ) |
const |
|
inline |
Count how many bits are set in the bitset.
- Returns
- number of set bits in the bitset
const auto& galois::DynamicBitSet::get_vec |
( |
| ) |
const |
|
inline |
Returns the underlying bitset representation to the user.
- Returns
- constant reference vector of copyable atomics that represents the bitset
auto& galois::DynamicBitSet::get_vec |
( |
| ) |
|
|
inline |
Returns the underlying bitset representation to the user.
- Returns
- reference to vector of copyable atomics that represents the bitset
std::vector<uint32_t> galois::DynamicBitSet::getOffsets |
( |
| ) |
const |
|
inline |
Returns a vector containing the set bits in this bitset in order from left to right.
Do NOT call in a parallel region as it uses galois::on_each.
- Returns
- vector with offsets into set bits
void galois::DynamicBitSet::reserve |
( |
uint64_t |
n | ) |
|
|
inline |
Reserves capacity for the bitset.
- Parameters
-
n | Size to reserve the capacity of the bitset to |
void galois::DynamicBitSet::reset |
( |
| ) |
|
|
inline |
Gets the space taken by the bitset.
- Returns
- the space in bytes taken by this bitset Unset every bit in the bitset.
void galois::DynamicBitSet::reset |
( |
size_t |
begin, |
|
|
size_t |
end |
|
) |
| |
|
inline |
Unset a range of bits given an inclusive range.
- Parameters
-
begin | first bit in range to reset |
end | last bit in range to reset |
bool galois::DynamicBitSet::reset |
( |
size_t |
index | ) |
|
|
inline |
Reset a bit in the bitset.
- Parameters
-
- Returns
- the old value
void galois::DynamicBitSet::resize |
( |
uint64_t |
n | ) |
|
|
inline |
Resizes the bitset.
- Parameters
-
n | Size to change the bitset to |
bool galois::DynamicBitSet::set |
( |
size_t |
index | ) |
|
|
inline |
Set a bit in the bitset.
- Parameters
-
- Returns
- the old value
size_t galois::DynamicBitSet::size |
( |
| ) |
const |
|
inline |
Gets the size of the bitset.
- Returns
- The number of bits held by the bitset
bool galois::DynamicBitSet::test |
( |
size_t |
index | ) |
const |
|
inline |
Check a bit to see if it is currently set.
Using this is recommeneded only if set() and reset() are not being used in that parallel section/phase
- Parameters
-
index | Bit to check to see if set |
- Returns
- true if index is set
constexpr uint32_t galois::DynamicBitSet::bits_uint64 = sizeof(uint64_t) * CHAR_BIT |
|
staticprotected |
size_t galois::DynamicBitSet::num_bits |
|
protected |
The documentation for this class was generated from the following file: