|
Thrill
0.1
|
An internal priority queue that allows removing elements addressed with (a copy of) themselves.
| KeyType | Type of contained elements. |
| PriorityType | Type of Priority. |
Definition at line 113 of file addressable_queues.hpp.
Inheritance diagram for addressable_priority_queue< KeyType, PriorityType, Cmp >:#include <addressable_queues.hpp>
Classes | |
| struct | cmp |
Public Types | |
| using | handle = meta_iterator |
| Type of handle to an entry. For use with insert and remove. More... | |
Public Member Functions | |
| addressable_priority_queue () | |
| Create an empty queue. More... | |
| ~addressable_priority_queue () | |
| bool | empty () const |
| bool | erase (const KeyType &e) |
| void | erase (handle i) |
| std::pair< handle, bool > | insert (const KeyType &e, const PriorityType o) |
| KeyType | pop () |
| const KeyType & | top () const |
Private Types | |
| using | container_iterator = typename container_type::iterator |
| using | container_type = std::set< std::pair< PriorityType, KeyType >, cmp > |
| 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 127 of file addressable_queues.hpp.
|
private |
Definition at line 126 of file addressable_queues.hpp.
| using handle = meta_iterator |
Type of handle to an entry. For use with insert and remove.
Definition at line 136 of file addressable_queues.hpp.
|
private |
Definition at line 129 of file addressable_queues.hpp.
|
private |
Definition at line 128 of file addressable_queues.hpp.
|
inline |
Create an empty queue.
Definition at line 139 of file addressable_queues.hpp.
|
inline |
Definition at line 140 of file addressable_queues.hpp.
|
inline |
Check if queue is empty.
Definition at line 144 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_offline_lfd< SwappableBlockType >::evictable_blocks_empty(), block_scheduler_algorithm_offline_lfd< SwappableBlockType >::get_free_internal_block(), and block_scheduler_algorithm_offline_lfd< SwappableBlockType >::~block_scheduler_algorithm_offline_lfd().
|
inline |
Erase element from the queue.
| e | Element to remove. |
Definition at line 167 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_offline_lfd< SwappableBlockType >::acquire(), block_scheduler_algorithm_offline_lfd< SwappableBlockType >::deinitialize(), and block_scheduler_algorithm_offline_lfd< SwappableBlockType >::extract_external_block().
|
inline |
Erase element from the queue.
| i | Iterator to element to remove. |
Definition at line 179 of file addressable_queues.hpp.
|
inline |
Insert new element. If the element is already in, it's priority is updated.
| e | Element to insert. |
| o | Priority of element. |
Definition at line 151 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_offline_lfd< SwappableBlockType >::init(), and block_scheduler_algorithm_offline_lfd< SwappableBlockType >::release().
|
inline |
Remove top (= min) element from the queue.
Definition at line 192 of file addressable_queues.hpp.
Referenced by block_scheduler_algorithm_offline_lfd< SwappableBlockType >::evictable_blocks_pop(), block_scheduler_algorithm_offline_lfd< SwappableBlockType >::get_free_internal_block(), and block_scheduler_algorithm_offline_lfd< SwappableBlockType >::~block_scheduler_algorithm_offline_lfd().
|
inline |
Access top (= min) element in the queue.
Definition at line 187 of file addressable_queues.hpp.
|
private |
Definition at line 132 of file addressable_queues.hpp.
|
private |
Definition at line 131 of file addressable_queues.hpp.