template<class ValueType, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
class stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >
External FIFO queue container.
Introduction to queue container: see STXXL Queue tutorial
Design and Internals of queue container: see Queue.
- Template Parameters
-
ValueType | type of the contained objects (POD with no references to internal memory) |
BlockSize | size of the external memory block in bytes, default is STXXL_DEFAULT_BLOCK_SIZE(ValueType) |
AllocStr | parallel disk allocation strategy, default is STXXL_DEFAULT_ALLOC_STRATEGY |
SizeType | size data type, default is stxxl::uint64 |
- Examples:
- examples/containers/queue1.cpp, and examples/containers/queue2.cpp.
Definition at line 51 of file queue.h.
template<class ValueType , unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
Constructs empty queue with own write and prefetch block pool.
- Parameters
-
D | number of parallel disks, defaulting to the configured number of scratch disks, memory consumption will be 2 * D + 2 blocks (first and last block, D blocks as write cache, D block for prefetching) |
Definition at line 89 of file queue.h.
References STXXL_VERBOSE_QUEUE.
template<class ValueType , unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
Constructs empty queue with own write and prefetch block pool.
- Parameters
-
w_pool_size | number of blocks in the write pool, must be at least 2, recommended at least 3 |
p_pool_size | number of blocks in the prefetch pool, recommended at least 1 |
blocks2prefetch_ | defines the number of blocks to prefetch (front side), default is number of block in the prefetch pool |
Definition at line 108 of file queue.h.
References STXXL_VERBOSE_QUEUE.
template<class ValueType , unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
void stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::pop |
( |
| ) |
|
|
inline |
template<class ValueType , unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
template<class ValueType , unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
void stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::set_prefetch_aggr |
( |
int_type |
blocks2prefetch_ | ) |
|
|
inline |
Defines the number of blocks to prefetch (front
side). This method should be called whenever the prefetch pool is resized.
- Parameters
-
blocks2prefetch_ | defines the number of blocks to prefetch (front side), a negative value means to use the number of blocks in the prefetch pool |
Definition at line 211 of file queue.h.
template<class ValueType , unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
void stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::swap |
( |
queue< ValueType, BlockSize, AllocStr, SizeType > & |
obj | ) |
|
|
inline |
Definition at line 162 of file queue.h.
References stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::alloc_count, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::alloc_strategy, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::back_block, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::back_element, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::bids, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::blocks2prefetch, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::bm, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::delete_pool, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::front_block, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::front_element, stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::m_size, and stxxl::queue< ValueType, BlockSize, AllocStr, SizeType >::pool.