|
Stxxl
1.4.0
|
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, completion_handler do_after_fetch=default_completion_handler()) | |
| 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. | |
| bool | empty () const |
| unsigned_type | pos () const |
| ~block_prefetcher () | |
| Frees used memory. | |
Protected Member Functions | |
| block_type * | wait (int_type iblock) |
Protected Attributes | |
| bid_iterator_type | consume_seq_begin |
| bid_iterator_type | consume_seq_end |
| unsigned_type | seq_length |
| int_type * | prefetch_seq |
| unsigned_type | nextread |
| unsigned_type | nextconsume |
| const int_type | nreadblocks |
| block_type * | read_buffers |
| request_ptr * | read_reqs |
| bid_type * | read_bids |
| onoff_switch * | completed |
| int_type * | pref_buffer |
| completion_handler | do_after_fetch |
Private Types | |
| typedef block_type::bid_type | bid_type |
Private Member Functions | |
| block_prefetcher () | |
Encapsulates asynchronous prefetching engine.
block_prefetcher overlaps I/Os with consumption of read data. Utilizes optimal asynchronous prefetch scheduling (by Peter Sanders et.al.)
Definition at line 54 of file block_prefetcher.h.
typedef block_type::bid_type stxxl::block_prefetcher< block_type, bid_iterator_type >::bid_type [private] |
Definition at line 57 of file block_prefetcher.h.
| stxxl::block_prefetcher< block_type, bid_iterator_type >::block_prefetcher | ( | ) | [inline, private] |
Definition at line 56 of file block_prefetcher.h.
| stxxl::block_prefetcher< block_type, bid_iterator_type >::block_prefetcher | ( | bid_iterator_type | _cons_begin, |
| bid_iterator_type | _cons_end, | ||
| int_type * | _pref_seq, | ||
| int_type | _prefetch_buf_size, | ||
| completion_handler | do_after_fetch = default_completion_handler() |
||
| ) | [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 |
Definition at line 102 of file block_prefetcher.h.
| stxxl::block_prefetcher< block_type, bid_iterator_type >::~block_prefetcher | ( | ) | [inline] |
Frees used memory.
Definition at line 208 of file block_prefetcher.h.
References stxxl::block_prefetcher< block_type, bid_iterator_type >::wait().
| bool stxxl::block_prefetcher< block_type, bid_iterator_type >::block_consumed | ( | block_type *& | buffer | ) | [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 Definition at line 159 of file block_prefetcher.h.
| bool stxxl::block_prefetcher< block_type, bid_iterator_type >::empty | ( | ) | const [inline] |
Definition at line 196 of file block_prefetcher.h.
| unsigned_type stxxl::block_prefetcher< block_type, bid_iterator_type >::pos | ( | ) | const [inline] |
Definition at line 202 of file block_prefetcher.h.
| block_type* stxxl::block_prefetcher< block_type, bid_iterator_type >::pull_block | ( | ) | [inline] |
Pulls next unconsumed block from the consumption sequence.
Definition at line 149 of file block_prefetcher.h.
Referenced by stxxl::stream::basic_runs_merger< sorted_runs_type, CompareType_, AllocStr_ >::initialize().
| block_type* stxxl::block_prefetcher< block_type, bid_iterator_type >::wait | ( | int_type | iblock | ) | [inline, protected] |
Definition at line 80 of file block_prefetcher.h.
Referenced by stxxl::block_prefetcher< block_type, bid_iterator_type >::~block_prefetcher().
onoff_switch* stxxl::block_prefetcher< block_type, bid_iterator_type >::completed [protected] |
Definition at line 75 of file block_prefetcher.h.
bid_iterator_type stxxl::block_prefetcher< block_type, bid_iterator_type >::consume_seq_begin [protected] |
Definition at line 60 of file block_prefetcher.h.
bid_iterator_type stxxl::block_prefetcher< block_type, bid_iterator_type >::consume_seq_end [protected] |
Definition at line 61 of file block_prefetcher.h.
completion_handler stxxl::block_prefetcher< block_type, bid_iterator_type >::do_after_fetch [protected] |
Definition at line 78 of file block_prefetcher.h.
unsigned_type stxxl::block_prefetcher< block_type, bid_iterator_type >::nextconsume [protected] |
Definition at line 67 of file block_prefetcher.h.
unsigned_type stxxl::block_prefetcher< block_type, bid_iterator_type >::nextread [protected] |
Definition at line 66 of file block_prefetcher.h.
const int_type stxxl::block_prefetcher< block_type, bid_iterator_type >::nreadblocks [protected] |
Definition at line 69 of file block_prefetcher.h.
int_type* stxxl::block_prefetcher< block_type, bid_iterator_type >::pref_buffer [protected] |
Definition at line 76 of file block_prefetcher.h.
int_type* stxxl::block_prefetcher< block_type, bid_iterator_type >::prefetch_seq [protected] |
Definition at line 64 of file block_prefetcher.h.
bid_type* stxxl::block_prefetcher< block_type, bid_iterator_type >::read_bids [protected] |
Definition at line 73 of file block_prefetcher.h.
block_type* stxxl::block_prefetcher< block_type, bid_iterator_type >::read_buffers [protected] |
Definition at line 71 of file block_prefetcher.h.
request_ptr* stxxl::block_prefetcher< block_type, bid_iterator_type >::read_reqs [protected] |
Definition at line 72 of file block_prefetcher.h.
unsigned_type stxxl::block_prefetcher< block_type, bid_iterator_type >::seq_length [protected] |
Definition at line 62 of file block_prefetcher.h.
1.7.6.1