Stxxl
1.2.1
|
Encapsulates asynchronous prefetching engine. More...
#include <block_prefetcher.h>
Public Member Functions | |
block_prefetcher (bid_iterator_type _cons_begin, bid_iterator_type _cons_end, int_type *_pref_seq, int_type _prefetch_buf_size) | |
Constructs an object and immediately starts prefetching. | |
block_type * | pull_block () |
Pulls next unconsumed block from the consumption sequence. | |
bool | block_consumed (block_type *&buffer) |
Exchanges buffers between prefetcher and application. | |
~block_prefetcher () | |
Frees used memory. |
Encapsulates asynchronous prefetching engine.
block_prefetcher
overlaps I/Os with consumption of read data. Utilizes optimal asynchronous prefetch scheduling (by Peter Sanders et.al.)
|
inline |
Constructs an object and immediately starts prefetching.
_cons_begin | bid_iterator pointing to the bid of the first block to be consumed |
_cons_end | bid_iterator pointing to the bid of the ( last + 1 ) block of consumption sequence |
_pref_seq | gives the prefetch order, is a pointer to the integer array that contains the indices of the blocks in the consumption sequence |
_prefetch_buf_size | amount of prefetch buffers to use |
|
inline |
Frees used memory.
References request::wait().
|
inline |
Exchanges buffers between prefetcher and application.
buffer | pointer to the consumed buffer. After call if return value is true buffer contains valid pointer to the next unconsumed prefetched buffer. |
buffer
must be value returned by pull_block()
or block_consumed()
methods false
if there are no blocks to prefetch left, true
if consumption sequence is not emptied References request::wait().
Referenced by buf_istream< BlkTp_, BIDIteratorTp_ >::operator++(), and buf_istream< BlkTp_, BIDIteratorTp_ >::operator>>().
|
inline |
Pulls next unconsumed block from the consumption sequence.
Referenced by buf_istream< BlkTp_, BIDIteratorTp_ >::buf_istream().