Metafunction for generating a pierced kernel. More...
#include <piercedKernel.hpp>
Classes | |
class | ClearAction |
class | EraseAction |
class | FillAction |
class | MoveAction |
struct | positionGreater |
struct | positionLess |
class | ReserveAction |
class | ResizeAction |
class | ShrinkToFitAction |
class | SortAction |
class | SqueezeAction |
class | SwapAction |
Public Types | |
typedef PiercedKernelIterator< id_t > | const_iterator |
typedef PiercedKernelRange< id_t > | const_range |
typedef id_t | id_type |
typedef std::vector< id_t >::const_iterator | raw_const_iterator |
enum | SyncMode |
Public Types inherited from bitpit::PiercedSyncMaster | |
typedef std::vector< PiercedSyncSlave * > | SyncGroup |
enum | SyncMode { SYNC_MODE_CONCURRENT , SYNC_MODE_JOURNALED , SYNC_MODE_DISABLED , SYNC_MODE_ITR_COUNT = SYNC_MODE_DISABLED + 1 , SYNC_MODE_ITR_BEGIN = 0 , SYNC_MODE_ITR_END = SYNC_MODE_ITR_BEGIN + SYNC_MODE_ITR_COUNT } |
Public Member Functions | |
PiercedKernel () | |
PiercedKernel (const PiercedKernel &other)=default | |
PiercedKernel (PiercedKernel &&other)=default | |
PiercedKernel (std::size_t n) | |
~PiercedKernel () override | |
std::size_t | back () const |
const_iterator | begin () const noexcept |
std::size_t | capacity () const |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
void | checkIntegrity () const |
ClearAction | clear (bool release=true) |
bool | contains (id_t id) const |
bool | contiguous () const |
std::size_t | count (id_t id) const |
void | dump () const |
void | dump (std::ostream &stream) const |
bool | empty () const |
const_iterator | end () const noexcept |
EraseAction | erase (id_t id, bool flush=false) |
std::size_t | evalFlatIndex (id_t id) const |
FillAction | fillAfter (id_t referenceId, id_t id) |
FillAction | fillAppend (id_t id) |
FillAction | fillBefore (id_t referenceId, id_t id) |
FillAction | fillHead (id_t id) |
FillAction | fillHole (std::size_t hole, id_t id) |
FillAction | fillInsert (std::size_t pos, id_t id) |
FillAction | fillTail (id_t id) |
const_iterator | find (const id_t &id) const noexcept |
void | flush () |
std::size_t | front () const |
std::vector< id_t > | getIds (bool ordered=true) const |
std::size_t | getRawIndex (id_t id) const |
id_t | getSizeMarker (std::size_t targetSize, const id_t &fallback=-1) |
bool | isIteratorSlow () |
bool | isSynced () const |
std::size_t | maxSize () const |
MoveAction | moveAfter (id_t referenceId, id_t id, bool flush=false) |
MoveAction | moveBefore (id_t referenceId, id_t id, bool flush=false) |
EraseAction | popBack () |
const_iterator | rawFind (std::size_t pos) const noexcept |
ReserveAction | reserve (std::size_t n) |
ResizeAction | resize (std::size_t n) |
void | restore (std::istream &stream) |
ShrinkToFitAction | shrinkToFit () |
std::size_t | size () const |
SortAction | sort () |
SortAction | sortAfter (id_t referenceId, bool inclusive) |
SortAction | sortBefore (id_t referenceId, bool inclusive) |
SqueezeAction | squeeze () |
SwapAction | swap (id_t id_first, id_t id_second) |
void | swap (PiercedKernel &other) noexcept |
void | sync () |
void | updateId (const id_t ¤tId, const id_t &updatedId) |
Protected Types | |
typedef holes_container::const_iterator | holes_const_iterator |
typedef std::vector< std::size_t > | holes_container |
typedef holes_container::iterator | holes_iterator |
Protected Member Functions | |
ClearAction | _clear (bool release=true) |
ReserveAction | _reserve (std::size_t n) |
ResizeAction | _resize (std::size_t n) |
ShrinkToFitAction | _shrinkToFit () |
SortAction | _sort (std::size_t begin, std::size_t end) |
SqueezeAction | _squeeze () |
std::size_t | findNextUsedPos (std::size_t pos) const |
std::size_t | findPrevUsedPos (std::size_t pos) const |
std::size_t | getFirstUsedPos () const |
std::size_t | getLastUsedPos () const |
std::size_t | getPos (id_t id) const |
std::vector< PiercedStorageSyncSlave< id_t > * > | getStorages () |
std::vector< const PiercedStorageSyncSlave< id_t > * > | getStorages () const |
bool | isPosEmpty (std::size_t pos) const |
std::size_t | rawSize () const |
Protected Member Functions inherited from bitpit::PiercedSyncMaster | |
PiercedSyncMaster () | |
void | dump (std::ostream &stream) const |
PiercedSyncMaster::SyncMode | getSlaveSyncMode (const PiercedSyncSlave *slave) const |
bool | isSlaveRegistered (const PiercedSyncSlave *slave) const |
bool | isSlaveSynced (const PiercedSyncSlave *slave) const |
bool | isSynced () const |
bool | isSyncEnabled () const |
void | processSyncAction (const PiercedSyncAction &action) |
void | registerSlave (PiercedSyncSlave *slave, PiercedSyncMaster::SyncMode syncMode) const |
void | restore (std::istream &stream) |
void | setSyncEnabled (bool enabled) const |
void | swap (PiercedSyncMaster &other) noexcept |
void | sync () |
void | unregisterSlave (const PiercedSyncSlave *slave) const |
Friends | |
template<typename PKI_id_t > | |
class | PiercedKernelIterator |
template<typename PKR_id_t > | |
class | PiercedKernelRange |
template<typename PS_value_t , typename PS_id_t > | |
class | PiercedStorage |
template<typename PSI_value_t , typename PSI_id_t , typename PSI_value_no_cv_t > | |
class | PiercedStorageIterator |
template<typename BPS_id_t > | |
class | PiercedStorageSyncSlave |
Additional Inherited Members | |
Protected Attributes inherited from bitpit::PiercedSyncMaster | |
std::unordered_map< PiercedSyncSlave *, SyncMode > | m_slaves |
Metafunction for generating a pierced kernel.
Usage: use PiercedKernel<id_t>
to declare a pierced kernel.
Internally all the holes are stored in a single vector. The first part of this vector contains the "regular" holes, whereas the last part contains the "pending" holes. The space reserved to the pending holes is fixed. To track begin and end of pending/regular holes section, two couple of begin/end iterators are used.
/------ Regular holes begin | | /------ Regular holes end | | v v |-+-+R+R+R+R+R+R+R+R+R+R+R+-+-+-+-+-+P+P+P+P+P+P+P+-+-+-+-+-+-| < REGULAR HOLES SECTION > < MAX PENDING HOLES > ^ ^ | | Pending holes begin ------/ | | Pending holes end ------/
At the beginning, the vector of the holes will have a size equal to the maximum number of pending holes. When an element is deleted, its position is marked as a pending hole and it is inserted at the end of the existing pending holes (or after the regular holes if there are no pending holes). When the maximum number of pending holes is reached, the hole's vector is flushed. First, pending holes are then converted to regular holes. The difference between pending and regular holes is that the position of a pending hole is just marked as empty, whereas the position of a regular hole contains the distance from the next non-epty element (to speed-up vector traversal). Once the positions associated to the pending holes are updated, pending holes are moved into the regular holes and all the holes are compacted at the beginning of the holes' vector. Finally, the vector is resized: the new size of the vector is the number of regular holes plus the maximum number of allowed pending holes.
When a new element needs to be inserted in the element, first a suitable position is searched in the pending holes, if no suitable positions is found, the search is extended to regular holes. If, among the holes, there is no suitable position, a new element is added in the container.
id_t | The type of the ids to associate to the elements |
Definition at line 106 of file piercedKernel.hpp.
typedef PiercedKernelIterator<id_t> bitpit::PiercedKernel< id_t >::const_iterator |
Constant iterator
Definition at line 136 of file piercedKernel.hpp.
typedef PiercedKernelRange<id_t> bitpit::PiercedKernel< id_t >::const_range |
Constant range
Definition at line 146 of file piercedKernel.hpp.
|
protected |
Holes const iterator
Definition at line 441 of file piercedKernel.hpp.
|
protected |
Container used for storing holes
Definition at line 431 of file piercedKernel.hpp.
|
protected |
Holes iterator
Definition at line 436 of file piercedKernel.hpp.
typedef id_t bitpit::PiercedKernel< id_t >::id_type |
Type of ids stored in the kernel
Definition at line 131 of file piercedKernel.hpp.
typedef std::vector<id_t>::const_iterator bitpit::PiercedKernel< id_t >::raw_const_iterator |
Raw iterator
Definition at line 141 of file piercedKernel.hpp.
enum bitpit::PiercedSyncMaster::SyncMode |
Sync mode
Definition at line 139 of file piercedSync.hpp.
bitpit::PiercedKernel< id_t >::PiercedKernel | ( | ) |
Constructs an empty pierced kernel with no elements.
Definition at line 38 of file piercedKernel.tpp.
bitpit::PiercedKernel< id_t >::PiercedKernel | ( | std::size_t | n | ) |
Constructs a pierced kernel with a capacity at least enough to contain n elements.
n | the minimum capacity requested for the kernel |
Definition at line 51 of file piercedKernel.tpp.
|
override |
Destructor
Definition at line 63 of file piercedKernel.tpp.
|
protected |
Removes all elements from the kernel.
The function will NOT process the sync action.
release | if set to true, the containers that hold holes data are requested to release all unneeded memory (it is a non-binding request) |
Definition at line 114 of file piercedKernel.tpp.
|
protected |
Requests that the kernel capacity be at least enough to contain n elements.
If n is greater than the current kernel capacity, the function causes the kernel to reallocate its data structured increasing its capacity to n (or greater).
In all other cases, the function call does not cause a reallocation and the kernel capacity is not affected.
The function will NOT process the sync action.
n | the minimum capacity requested for the kernel |
Definition at line 178 of file piercedKernel.tpp.
|
protected |
Resizes the kernel so that it contains n elements.
If n is smaller than the current kernel size, the content is reduced to its first n elements, removing those beyond.
If n is greater than the current kernel size, space is reserved to allow the kernel to reach the requested size.
If n is also greater than the current kernel capacity, an automatic reallocation of the allocated kernel space takes place.
Notice that this function changes the actual content of the kernel by erasing elements from it.
The function will NOT process the sync action.
n | is the new kernel size, expressed in number of elements. |
Definition at line 239 of file piercedKernel.tpp.
|
protected |
Requests the kernel to reduce its capacity to fit its size. This method will NOT compact the elements, leaving the existing holes unaltered.
The request is non-binding, and the function can leave the kernel with a capacity greater than its size.
This may cause a reallocation, but has no effect on the kernel size and cannot alter its elements not the holes.
The function will NOT process the sync action.
Definition at line 573 of file piercedKernel.tpp.
|
protected |
Sorts the elements of the kernel in ascending id order.
The function will NOT process the sync action.
beginPos | is the first position that will be sorted |
endPos | is the position past the last element that will be sorted |
Definition at line 368 of file piercedKernel.tpp.
|
protected |
Requests the kernel to compact the elements and reduce its capacity to fit its size.
The request is non-binding, and the function can leave the kernel with a capacity greater than its size.
This may cause a reallocation, but has no effect on the kernel size and cannot alter its elements.
The function will NOT process the sync action.
Definition at line 466 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::back | ( | ) | const |
Returns the position of the last element in the kernel. If the kernel is empty, an exception is thrown.
Definition at line 2117 of file piercedKernel.tpp.
|
noexcept |
Returns a constant iterator pointing to the first element in the vector.
Definition at line 1106 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::capacity | ( | ) | const |
Returns the size of the space currently allocated for the kernel, expressed in terms of elements.
Definition at line 850 of file piercedKernel.tpp.
|
noexcept |
Returns an conts_iterator pointing to the first element in the vector.
Definition at line 1130 of file piercedKernel.tpp.
|
noexcept |
Returns an const_iterator referring to the past-the-end element in the vector.
Definition at line 1142 of file piercedKernel.tpp.
void bitpit::PiercedKernel< id_t >::checkIntegrity | ( | ) | const |
Check the integrity of the kernel.
Definition at line 684 of file piercedKernel.tpp.
PiercedKernel< id_t >::ClearAction bitpit::PiercedKernel< id_t >::clear | ( | bool | release = true | ) |
Removes all elements from the kernel.
release | if set to true, the containers that hold kernel data are requested to release all unneeded memory (it is a non-binding request) |
Definition at line 94 of file piercedKernel.tpp.
bool bitpit::PiercedKernel< id_t >::contains | ( | id_t | id | ) | const |
Checks if the kernel contains the specified id.
id | is the id to look for |
Definition at line 863 of file piercedKernel.tpp.
bool bitpit::PiercedKernel< id_t >::contiguous | ( | ) | const |
Returns whether the kernel is contiguous (i.e. whether it contains no holes).
Definition at line 766 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::count | ( | id_t | id | ) | const |
Searches the container for elements with the specified id and returns the number of matches.
Because all ids in a pierced kernel are unique, the function can only return 1 (if the element is found) or zero (otherwise).
id | is the id to look for |
Definition at line 880 of file piercedKernel.tpp.
void bitpit::PiercedKernel< id_t >::dump | ( | ) | const |
Dumps to screen the internal data.
Definition at line 629 of file piercedKernel.tpp.
void bitpit::PiercedKernel< id_t >::dump | ( | std::ostream & | stream | ) | const |
Dump the vector.
stream | is the stream data should be written to |
Definition at line 2481 of file piercedKernel.tpp.
bool bitpit::PiercedKernel< id_t >::empty | ( | ) | const |
Returns whether the kernel is empty (i.e. whether its size is 0).
Definition at line 777 of file piercedKernel.tpp.
|
noexcept |
Returns a constant iterator referring to the past-the-end element in the vector.
Definition at line 1119 of file piercedKernel.tpp.
PiercedKernel< id_t >::EraseAction bitpit::PiercedKernel< id_t >::erase | ( | id_t | id, |
bool | flush = false ) |
Removes from the kernel the element with the specified id. If the id does not exists the function throws an exception.
The position of the element is marked as empty, this tells the kernel that the position is no longer in use.
id | is the id of the element to erase |
flush | controls if the holes will be flush after updating the kernel |
Definition at line 1717 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::evalFlatIndex | ( | id_t | id | ) | const |
Gets the flat index of the element with the specified id.
A flat id is the id associated to a numbering scheme that starts from the element in the first position of the kernel and is incremented by one for each element in the kernel. The first element will have a flat id equal to 0, the last element will have a flat id equal to (nElements - 1).
If there is no element with the specified id, an exception is thrown.
id | is the id of the element for witch the flat id is requested |
Definition at line 912 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillAfter | ( | id_t | referenceId, |
id_t | id ) |
Fills a position and assigns to it the specified id.
The position filled will be after the specified reference position.
referenceId | is the id of the element before which the new available position will be searched for |
id | is the id that will be associated to the position |
Definition at line 1273 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillAppend | ( | id_t | id | ) |
Fills a position and assigns to it the specified id.
A new position is created at the end of the kernel.
id | is the id that will be associated to the position |
Definition at line 1367 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillBefore | ( | id_t | referenceId, |
id_t | id ) |
Fills a position and assigns to it the specified id.
The position filled will be before the specified reference position.
referenceId | is the id of the element before which the new available position will be searched for |
id | is the id that will be associated to the position |
Definition at line 1321 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillHead | ( | id_t | id | ) |
Fills a position and assigns to it the specified id.
The position filled will be the first position available.
id | is the id that will be associated to the position |
Definition at line 1205 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillHole | ( | std::size_t | hole, |
id_t | id ) |
Fills the specified hole with the given id.
hole | is the position of the hole to fill |
id | is the id that will be associated to the position |
Definition at line 1398 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillInsert | ( | std::size_t | pos, |
id_t | id ) |
Fills a position and assigns to it the specified id.
A new postion is created at the specified position.
pos | is the position at which the id will be inserted |
id | is the id that will be associated to the position |
Definition at line 1485 of file piercedKernel.tpp.
PiercedKernel< id_t >::FillAction bitpit::PiercedKernel< id_t >::fillTail | ( | id_t | id | ) |
Fills a position and assigns to it the specified id.
The position filled will be the first position available.
id | is the id that will be associated to the position |
Definition at line 1238 of file piercedKernel.tpp.
|
noexcept |
Gets a constant iterator pointing to the specified element.
id | is the id |
Definition at line 1078 of file piercedKernel.tpp.
|
protected |
Returns the first non-empty position after the specified starting position.
If the starting position is the last posistion, an exception is thrown.
pos | starting position |
Definition at line 2221 of file piercedKernel.tpp.
|
protected |
Returns the first non-empty position before the specified starting position.
If the starting position is the first posistion, an exception is thrown.
pos | starting position |
Definition at line 2196 of file piercedKernel.tpp.
void bitpit::PiercedKernel< id_t >::flush | ( | ) |
Flush all pending changes.
Definition at line 619 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::front | ( | ) | const |
Returns the position of the first element in the kernel. If the kernel is empty, an exception is thrown.
Definition at line 2133 of file piercedKernel.tpp.
|
protected |
Gets the position of the first element in the container.
If there is no element with the specified id, an exception is thrown.
Definition at line 1169 of file piercedKernel.tpp.
std::vector< id_t > bitpit::PiercedKernel< id_t >::getIds | ( | bool | ordered = true | ) | const |
Gets a vector containing the ids of the elements stored in the kernel.
ordered | if is true the ids will be sorted in ascending order, otherwise the ids will be in random order |
Definition at line 961 of file piercedKernel.tpp.
|
protected |
Gets the position of the last element in the container.
If there is no element with the specified id, an exception is thrown.
Definition at line 1186 of file piercedKernel.tpp.
|
protected |
Gets the position of the element with the specified id.
If there is no element with the specified id, an exception is thrown.
id | is the id of the element for witch the raw id is requested |
Definition at line 1156 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::getRawIndex | ( | id_t | id | ) | const |
Gets the raw index associated to the element with the specified id.
Definition at line 891 of file piercedKernel.tpp.
id_t bitpit::PiercedKernel< id_t >::getSizeMarker | ( | std::size_t | targetSize, |
const id_t & | fallback = -1 ) |
Returns the id of the elmement before which there is the requested number of other elements. If this element does not exist the fallback value will be returned.
targetSize | is the number of elements that needs to be contained before the marker |
fallback | is the fallback value to be returned if the marker cannot be found |
Definition at line 1009 of file piercedKernel.tpp.
|
protected |
Get the storages assocaited with the kernel.
Definition at line 2148 of file piercedKernel.tpp.
|
protected |
Get the storages assocaited with the kernel.
Definition at line 2170 of file piercedKernel.tpp.
bool bitpit::PiercedKernel< id_t >::isIteratorSlow | ( | ) |
Checks if the kernel is in a state that can slow down the iterator.
If there are dirty positions in the kernel, the ids associated to those positions will not point directly to a non-empty element. This means that the iterator will require a loop to reach the next non-empty position and this can slow down the loop. Calling the 'flush' function allow to recover the best performances.
Definition at line 795 of file piercedKernel.tpp.
|
protected |
Returns if the specified position is empty.
A position is considered empty if the element in that position has an id less than 0.
pos | the position to check |
Definition at line 2250 of file piercedKernel.tpp.
bool bitpit::PiercedSyncMaster::isSynced | ( | ) | const |
Check if all the slaves are synced.
Definition at line 178 of file piercedSync.cpp.
std::size_t bitpit::PiercedKernel< id_t >::maxSize | ( | ) | const |
Returns the maximum number of elements that the kernel can hold.
This is the maximum potential size the kernel can reach due to known system or library implementation limitations, but the kernel is by no means guaranteed to be able to reach that size: it can still fail to allocate space at any point before that size is reached.
Definition at line 809 of file piercedKernel.tpp.
PiercedKernel< id_t >::MoveAction bitpit::PiercedKernel< id_t >::moveAfter | ( | id_t | referenceId, |
id_t | id, | ||
bool | flush = false ) |
Move the specified id after the element with the reference id.
referenceId | is the id of the element after which the specified id will be moved |
id | is the id that will be moved |
flush | controls if the holes will be flush after updating the kernel |
Definition at line 1560 of file piercedKernel.tpp.
PiercedKernel< id_t >::MoveAction bitpit::PiercedKernel< id_t >::moveBefore | ( | id_t | referenceId, |
id_t | id, | ||
bool | flush = false ) |
Move the specified id before the element with the reference id.
referenceId | is the id of the element after which the specified id will be moved |
id | is the id that will be moved |
flush | controls if the holes will be flush after updating the kernel |
Definition at line 1624 of file piercedKernel.tpp.
PiercedKernel< id_t >::EraseAction bitpit::PiercedKernel< id_t >::popBack | ( | ) |
Removes the last element in the vector, effectively reducing the container size by one.
Element is not deleted from the internal vector, instead its id is changed to mark the position as empty and allow the container to reuse that position.
Definition at line 1751 of file piercedKernel.tpp.
|
noexcept |
Gets a constant iterator pointing to the specified position.
pos | is the position |
Definition at line 1095 of file piercedKernel.tpp.
|
protected |
Returns the number of raw positions in the kernel.
This is the number of raw positions in the kernel, which is not necessarily equal the number of actual objects held in the kernel nor to its capacity.
Definition at line 837 of file piercedKernel.tpp.
PiercedKernel< id_t >::ReserveAction bitpit::PiercedKernel< id_t >::reserve | ( | std::size_t | n | ) |
Requests that the kernel capacity be at least enough to contain n elements.
If n is greater than the current kernel capacity, the function causes the kernel to reallocate its data structured increasing its capacity to n (or greater).
In all other cases, the function call does not cause a reallocation and the kernel capacity is not affected.
n | the minimum capacity requested for the kernel |
Definition at line 153 of file piercedKernel.tpp.
PiercedKernel< id_t >::ResizeAction bitpit::PiercedKernel< id_t >::resize | ( | std::size_t | n | ) |
Resizes the kernel so that it contains n elements.
If n is smaller than the current kernel size, the content is reduced to its first n elements, removing those beyond.
If n is greater than the current kernel size, space is reserved to allow the kernel to reach the requested size.
If n is also greater than the current kernel capacity, an automatic reallocation of the allocated kernel space takes place.
Notice that this function changes the actual content of the kernel by erasing elements from it.
n | is the new kernel size, expressed in number of elements. |
Definition at line 209 of file piercedKernel.tpp.
void bitpit::PiercedKernel< id_t >::restore | ( | std::istream & | stream | ) |
Restore the vector.
stream | is the stream data should be read from |
Definition at line 2422 of file piercedKernel.tpp.
PiercedKernel< id_t >::ShrinkToFitAction bitpit::PiercedKernel< id_t >::shrinkToFit | ( | ) |
Requests the kernel to reduce its capacity to fit its size. This method will NOT compact the elements, leaving the existing holes unaltered.
The request is non-binding, and the function can leave the kernel with a capacity greater than its size.
This may cause a reallocation, but has no effect on the kernel size and cannot alter its elements not the holes.
Definition at line 550 of file piercedKernel.tpp.
std::size_t bitpit::PiercedKernel< id_t >::size | ( | ) | const |
Returns the number of elements in the kernel.
This is the number of actual objects held in the kernel, which is not necessarily equal to its capacity.
Definition at line 823 of file piercedKernel.tpp.
PiercedKernel< id_t >::SortAction bitpit::PiercedKernel< id_t >::sort | ( | ) |
Sorts the elements of the kernel in ascending id order.
Definition at line 295 of file piercedKernel.tpp.
PiercedKernel< id_t >::SortAction bitpit::PiercedKernel< id_t >::sortAfter | ( | id_t | referenceId, |
bool | inclusive ) |
Sorts the kernel after the element with the reference id in ascending id order.
referenceId | is the id of the element after which the kernel will be sorted |
inclusive | if true the reference element will be sorted, otherwise the sorting will stop at the element following the reference |
Definition at line 315 of file piercedKernel.tpp.
PiercedKernel< id_t >::SortAction bitpit::PiercedKernel< id_t >::sortBefore | ( | id_t | referenceId, |
bool | inclusive ) |
Sorts the kernel before the element with the reference id in ascending id order.
referenceId | is the id of the element before which the kernel will be sorted |
inclusive | if true the reference element will be sorted, otherwise the sorting will stop at the element preceding the reference |
Definition at line 342 of file piercedKernel.tpp.
PiercedKernel< id_t >::SqueezeAction bitpit::PiercedKernel< id_t >::squeeze | ( | ) |
Requests the kernel to compact the elements and reduce its capacity to fit its size.
The request is non-binding, and the function can leave the kernel with a capacity greater than its size.
This may cause a reallocation, but has no effect on the kernel size and cannot alter its elements.
Definition at line 443 of file piercedKernel.tpp.
PiercedKernel< id_t >::SwapAction bitpit::PiercedKernel< id_t >::swap | ( | id_t | id_first, |
id_t | id_second ) |
Swap the elements with the specified id.
id_first | is the id of the first element to be swapped |
id_second | is the id of the second element to be swapped |
Definition at line 1686 of file piercedKernel.tpp.
|
noexcept |
Exchanges the content of the kernel by the content of x, which is another kernel object of the same type. Sizes may differ.
After the call to this member function, the elements in this kernel are those which were in x before the call, and the elements of x are those which were in this. All iterators, references and pointers remain valid for the swapped objects.
other | is another kernel of the same type (i.e., instantiated with the same template parameters) whose content is swapped with that of this kernel. |
Definition at line 597 of file piercedKernel.tpp.
void bitpit::PiercedSyncMaster::sync | ( | ) |
Syncronize all the registered slaves.
Definition at line 177 of file piercedSync.cpp.
void bitpit::PiercedKernel< id_t >::updateId | ( | const id_t & | currentId, |
const id_t & | updatedId ) |
Updates the id of the specified element.
currentId | is the current id of the element |
updatedId | is the new id of the element |
Definition at line 77 of file piercedKernel.tpp.
|
friend |
Definition at line 116 of file piercedKernel.hpp.
Definition at line 119 of file piercedKernel.hpp.
|
friend |
Definition at line 125 of file piercedKernel.hpp.
|
friend |
Definition at line 113 of file piercedKernel.hpp.
|
friend |
Definition at line 122 of file piercedKernel.hpp.