Thrill
0.1
|
An internal fifo queue that allows removing elements addressed with (a copy of) themselves.
KeyType | Type of contained elements. |
Definition at line 29 of file addressable_queues.hpp.
#include <addressable_queues.hpp>
Public Types | |
using | handle = meta_iterator |
Type of handle to an entry. For use with insert and remove. More... | |
Public Member Functions | |
addressable_fifo_queue () | |
Create an empty queue. More... | |
~addressable_fifo_queue () | |
bool | empty () const |
bool | erase (const KeyType &e) |
void | erase (handle i) |
std::pair< handle, bool > | insert (const KeyType &e) |
KeyType | pop () |
const KeyType & | top () const |
Private Types | |
using | container_iterator = typename container_type::iterator |
using | container_type = std::list< KeyType > |
using | meta_iterator = typename meta_type::iterator |
using | meta_type = std::map< KeyType, container_iterator > |
Private Attributes | |
meta_type | meta |
container_type | vals |
|
private |
Definition at line 32 of file addressable_queues.hpp.
|
private |
Definition at line 31 of file addressable_queues.hpp.
using handle = meta_iterator |
Type of handle to an entry. For use with insert and remove.
Definition at line 41 of file addressable_queues.hpp.
|
private |
Definition at line 34 of file addressable_queues.hpp.
|
private |
Definition at line 33 of file addressable_queues.hpp.
|
inline |
Create an empty queue.
Definition at line 44 of file addressable_queues.hpp.
|
inline |
Definition at line 45 of file addressable_queues.hpp.
|
inline |
Check if queue is empty.
Definition at line 49 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_online_lru< SwappableBlockType >::evictable_blocks_empty(), block_scheduler_algorithm_online_lru< SwappableBlockType >::get_free_internal_block(), addressable_fifo_queue< swappable_block_identifier_type >::pop(), addressable_priority_queue< swappable_block_identifier_type, foxxll::block_scheduler_algorithm_offline_lfd::priority >::pop(), and block_scheduler_algorithm_online_lru< SwappableBlockType >::~block_scheduler_algorithm_online_lru().
|
inline |
Erase element from the queue.
e | Element to remove. |
Definition at line 73 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_online_lru< SwappableBlockType >::acquire(), block_scheduler_algorithm_online_lru< SwappableBlockType >::deinitialize(), and block_scheduler_algorithm_online_lru< SwappableBlockType >::extract_external_block().
|
inline |
Erase element from the queue.
i | Iterator to element to remove. |
Definition at line 85 of file addressable_queues.hpp.
|
inline |
Insert new element. If the element is already in, it is moved to the back.
e | Element to insert. |
Definition at line 57 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_online_lru< SwappableBlockType >::init(), and block_scheduler_algorithm_online_lru< SwappableBlockType >::release().
|
inline |
Remove top element from the queue.
Definition at line 98 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_online_lru< SwappableBlockType >::evictable_blocks_pop(), block_scheduler_algorithm_online_lru< SwappableBlockType >::get_free_internal_block(), and block_scheduler_algorithm_online_lru< SwappableBlockType >::~block_scheduler_algorithm_online_lru().
|
inline |
Access top element in the queue.
Definition at line 93 of file addressable_queues.hpp.
Referenced by addressable_fifo_queue< swappable_block_identifier_type >::pop(), and addressable_priority_queue< swappable_block_identifier_type, foxxll::block_scheduler_algorithm_offline_lfd::priority >::pop().
|
private |
Definition at line 37 of file addressable_queues.hpp.
|
private |
Definition at line 36 of file addressable_queues.hpp.