souffle
2.0.2-371-g6315b36
|
A PiggyList that allows insertAt functionality. More...
#include <PiggyList.h>
Public Member Functions | |
void | clear () |
void | freeList () |
Free the arrays allocated within the linked list nodes. More... | |
T & | get (size_t index) const |
T * | getBlock (size_t blockNum) const |
void | insertAt (size_t index, T value) |
RandomInsertPiggyList & | operator= (RandomInsertPiggyList &&other)=delete |
RandomInsertPiggyList & | operator= (RandomInsertPiggyList &other)=delete |
RandomInsertPiggyList ()=default | |
RandomInsertPiggyList (const RandomInsertPiggyList &other) | |
copy constructor More... | |
RandomInsertPiggyList (RandomInsertPiggyList &&other)=delete | |
RandomInsertPiggyList (size_t initialbitsize) | |
size_t | size () const |
~RandomInsertPiggyList () | |
Data Fields | |
const size_t | BLOCKBITS = 16ul |
std::array< std::atomic< T * >, maxContainers > | blockLookupTable = {} |
const size_t | INITIALBLOCKSIZE = (1ul << BLOCKBITS) |
std::atomic< size_t > | numElements {0} |
SpinLock | slock |
Static Public Attributes | |
static constexpr size_t | maxContainers = 64 |
A PiggyList that allows insertAt functionality.
This means we can't append, as we don't know the next available element. insertAt is dangerous. You must be careful not to call it for the same index twice!
Definition at line 37 of file PiggyList.h.
|
default |
|
inline |
Definition at line 42 of file PiggyList.h.
|
inline |
|
delete |
|
inline |
Definition at line 71 of file PiggyList.h.
|
inline |
Definition at line 110 of file PiggyList.h.
Referenced by souffle::SparseDisjointSet< value_type >::size(), and souffle::test::TEST().
|
inline |
Free the arrays allocated within the linked list nodes.
Definition at line 130 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::clear(), and souffle::RandomInsertPiggyList< SparseDomain >::~RandomInsertPiggyList().
|
inline |
Definition at line 83 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::insertAt().
|
inline |
Definition at line 79 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::get().
|
inline |
Definition at line 90 of file PiggyList.h.
Referenced by souffle::test::TEST().
|
delete |
|
delete |
|
inline |
Definition at line 75 of file PiggyList.h.
Referenced by souffle::test::TEST().
const size_t souffle::RandomInsertPiggyList< T >::BLOCKBITS = 16ul |
Definition at line 114 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::get(), and souffle::RandomInsertPiggyList< SparseDomain >::insertAt().
std::array<std::atomic<T*>, maxContainers> souffle::RandomInsertPiggyList< T >::blockLookupTable = {} |
Definition at line 122 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::freeList(), souffle::RandomInsertPiggyList< SparseDomain >::getBlock(), souffle::RandomInsertPiggyList< SparseDomain >::insertAt(), and souffle::RandomInsertPiggyList< SparseDomain >::RandomInsertPiggyList().
const size_t souffle::RandomInsertPiggyList< T >::INITIALBLOCKSIZE = (1ul << BLOCKBITS) |
Definition at line 115 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::get(), souffle::RandomInsertPiggyList< SparseDomain >::insertAt(), and souffle::RandomInsertPiggyList< SparseDomain >::RandomInsertPiggyList().
|
staticconstexpr |
Definition at line 121 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::freeList(), and souffle::RandomInsertPiggyList< SparseDomain >::RandomInsertPiggyList().
std::atomic<size_t> souffle::RandomInsertPiggyList< T >::numElements {0} |
Definition at line 118 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::clear(), souffle::RandomInsertPiggyList< SparseDomain >::insertAt(), souffle::RandomInsertPiggyList< SparseDomain >::RandomInsertPiggyList(), and souffle::RandomInsertPiggyList< SparseDomain >::size().
|
mutable |
Definition at line 125 of file PiggyList.h.
Referenced by souffle::RandomInsertPiggyList< SparseDomain >::freeList(), and souffle::RandomInsertPiggyList< SparseDomain >::insertAt().