13 #ifndef FOXXLL_MNG_BUF_ISTREAM_HEADER 14 #define FOXXLL_MNG_BUF_ISTREAM_HEADER 30 #define BUF_ISTREAM_CHECK_END 36 template <
typename BlockType,
typename B
idIteratorType>
52 #ifdef BUF_ISTREAM_CHECK_END 72 const size_t seq_length = end - begin;
73 prefetch_seq =
new size_t[seq_length];
80 nbuffers =
std::max(2 * ndisks,
size_t(nbuffers - 1));
82 begin, end, prefetch_seq,
102 #ifdef BUF_ISTREAM_CHECK_END 103 assert(not_finished);
106 record = current_blk->elem[current_elem++];
111 #ifdef BUF_ISTREAM_CHECK_END 137 #ifdef BUF_ISTREAM_CHECK_END 138 assert(not_finished);
146 #ifdef BUF_ISTREAM_CHECK_END 167 #endif // !FOXXLL_MNG_BUF_ISTREAM_HEADER
typename block_type::reference reference
block_type * pull_block()
static uint_pair max()
return an uint_pair instance containing the largest value possible
buf_istream & operator=(const buf_istream &)=delete
non-copyable: delete assignment operator
reference operator*()
Returns reference to the current record in the stream.
unsigned int max_device_id()
Returns automatic physical device id counter.
~buf_istream()
Frees used internal objects.
self_type & operator>>(reference record)
void compute_prefetch_schedule(const size_t *first, const size_t *last, size_t *out_first, size_t m, size_t D)
#define BUF_ISTREAM_CHECK_END
BidIteratorType bid_iterator_type
reference current()
Returns reference to the current record in the stream.
static instance_pointer get_instance()
return instance or create base instance if empty
bool block_consumed(block_type *&buffer)
buf_istream(bid_iterator_type begin, bid_iterator_type end, size_t nbuffers)
block_prefetcher< block_type, bid_iterator_type > prefetcher_type
prefetcher_type * prefetcher