|
souffle
2.0.2-371-g6315b36
|
A sparse bit-map is a bit map virtually assigning a bit value to every value if the uint32_t domain. More...
#include <Brie.h>

Data Structures | |
| struct | merge_op |
Public Types | |
| using | index_type = typename data_store_t::index_type |
| using | iterator = SparseBitMapIter< this_t > |
| using | op_context = typename data_store_t::op_context |
Public Member Functions | |
| void | addAll (const SparseBitMap &other) |
| Sets all bits set in other to 1 within this bit map. More... | |
| iterator | begin () const |
| Obtains an iterator pointing to the first index set to 1. More... | |
| void | clear () |
| Resets all contained bits to 0. More... | |
| void | dump (bool detail=false, std::ostream &out=std::cout) const |
| A debugging utility printing the internal structure of this map to the given output stream. More... | |
| bool | empty () const |
| iterator | end () const |
| Returns an iterator referencing the position after the last set bit. More... | |
| iterator | find (index_type i) const |
| Obtains an iterator referencing the position i if the corresponding bit is set, end() otherwise. More... | |
| iterator | find (index_type i, op_context &ctxt) const |
| Obtains an iterator referencing the position i if the corresponding bit is set, end() otherwise. More... | |
| std::size_t | getMemoryUsage () const |
| Computes the total memory usage of this data structure. More... | |
| const data_store_t & | getStore () const |
| Provides write-protected access to the internal store for running analysis on the data structure. More... | |
| iterator | lower_bound (index_type i) const |
| Locates an iterator to the first element in this sparse bit map not less than the given index. More... | |
| SparseBitMap & | operator= (const SparseBitMap &)=default |
| SparseBitMap & | operator= (SparseBitMap &&)=default |
| bool | operator[] (index_type i) const |
| Determines the whether the bit addressed by i is set or not. More... | |
| bool | set (index_type i) |
| Sets the bit addressed by i to 1. More... | |
| bool | set (index_type i, op_context &ctxt) |
| Sets the bit addressed by i to 1. More... | |
| std::size_t | size () const |
| Determines the number of bits set. More... | |
| SparseBitMap ()=default | |
| SparseBitMap (const SparseBitMap &)=default | |
| SparseBitMap (SparseBitMap &&)=default | |
| bool | test (index_type i) const |
| Determines the whether the bit addressed by i is set or not. More... | |
| bool | test (index_type i, op_context &ctxt) const |
| Determines the whether the bit addressed by i is set or not. More... | |
| iterator | upper_bound (index_type i) const |
| Locates an iterator to the first element in this sparse bit map than is greater than the given index. More... | |
Private Types | |
| using | atomic_value_t = typename data_store_t::atomic_value_type |
| using | data_store_t = SparseArray< value_t, BITS, merge_op > |
| using | this_t = SparseBitMap< BITS > |
| using | value_t = uint64_t |
Static Private Member Functions | |
| static uint64_t | toMask (const value_t &value) |
Private Attributes | |
| data_store_t | store |
Static Private Attributes | |
| static constexpr size_t | BITS_PER_ENTRY = sizeof(value_t) * CHAR_BIT |
| static constexpr uint64_t | LEAF_INDEX_MASK = BITS_PER_ENTRY - 1 |
| static constexpr size_t | LEAF_INDEX_WIDTH = __builtin_ctz(BITS_PER_ENTRY) |
Friends | |
| template<typename A > | |
| class | detail::brie::SparseBitMapIter |
A sparse bit-map is a bit map virtually assigning a bit value to every value if the uint32_t domain.
However, only 1-bits are stored utilizing a nested sparse array structure.
| BITS | similar to the BITS parameter of the sparse array type |
|
private |
|
private |
| using souffle::SparseBitMap< BITS >::index_type = typename data_store_t::index_type |
| using souffle::SparseBitMap< BITS >::iterator = SparseBitMapIter<this_t> |
| using souffle::SparseBitMap< BITS >::op_context = typename data_store_t::op_context |
|
private |
|
private |
|
default |
|
default |
|
default |
|
inline |
Sets all bits set in other to 1 within this bit map.
Definition at line 1798 of file Brie.h.
References souffle::SparseArray< T, BITS, merge_op, copy_op >::begin().

|
inline |
|
inline |
Resets all contained bits to 0.
Definition at line 1771 of file Brie.h.
References souffle::SparseArray< T, BITS, merge_op, copy_op >::getMemoryUsage().

|
inline |
|
inline |
Definition at line 1692 of file Brie.h.
References souffle::SparseArray< T, BITS, merge_op, copy_op >::getAtomic(), and i.

|
inline |
Returns an iterator referencing the position after the last set bit.
Definition at line 1825 of file Brie.h.
References souffle::SparseArray< T, BITS, merge_op, copy_op >::find(), and i.
Referenced by souffle::detail::brie::fix_first_nested< Dim >::operator()(), and souffle::detail::brie::fix_binding< 0, Dim, Dim >::operator()().

|
inline |
Obtains an iterator referencing the position i if the corresponding bit is set, end() otherwise.
Definition at line 1833 of file Brie.h.
Referenced by souffle::detail::brie::fix_first_nested< Dim >::operator()().
|
inline |
Obtains an iterator referencing the position i if the corresponding bit is set, end() otherwise.
An operation context can be provided to exploit temporal locality.
Definition at line 1843 of file Brie.h.
References i, and souffle::SparseArray< T, BITS, merge_op, copy_op >::lowerBound().

|
inline |
|
inline |
|
inline |
Locates an iterator to the first element in this sparse bit map not less than the given index.
Definition at line 1861 of file Brie.h.
Referenced by souffle::detail::brie::fix_binding< 0, Dim, Dim >::operator()().
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
Determines the number of bits set.
Definition at line 1778 of file Brie.h.
References souffle::SparseArray< T, BITS, merge_op, copy_op >::addAll(), and souffle::SparseBitMap< BITS >::store.

|
inline |
|
inline |
|
inlinestaticprivate |
Definition at line 1662 of file Brie.h.
Referenced by souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator*().
|
inline |
|
friend |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
Definition at line 1659 of file Brie.h.
Referenced by souffle::detail::brie::SparseBitMapIter< SparseBitMap >::operator*().
|
private |
Definition at line 1673 of file Brie.h.
Referenced by souffle::SparseBitMap< BITS >::size().
1.8.17