14 #ifndef FOXXLL_MNG_BUF_ISTREAM_REVERSE_HEADER 15 #define FOXXLL_MNG_BUF_ISTREAM_REVERSE_HEADER 32 #define BUF_ISTREAM_CHECK_END 38 template <
typename BlockType,
typename B
idIteratorType>
58 #ifdef BUF_ISTREAM_CHECK_END 79 std::reverse_copy(begin, end, bids_.
begin());
85 prefetch_seq =
new size_t[bids_.
size()];
88 nbuffers =
std::max(2 * ndisks, nbuffers - 1);
98 current_blk = prefetcher->pull_block();
99 current_elem = block_type::size - 1;
113 #ifdef BUF_ISTREAM_CHECK_END 114 assert(not_finished);
121 current_elem = block_type::size - 1;
122 #ifdef BUF_ISTREAM_CHECK_END 152 #ifdef BUF_ISTREAM_CHECK_END 153 assert(not_finished);
158 current_elem = block_type::size - 1;
159 #ifdef BUF_ISTREAM_CHECK_END 185 #endif // !FOXXLL_MNG_BUF_ISTREAM_REVERSE_HEADER buf_istream_reverse(bid_iterator_type begin, bid_iterator_type end, size_t nbuffers)
iterator end() noexcept
return mutable iterator beyond last element
static uint_pair max()
return an uint_pair instance containing the largest value possible
reference operator*()
Returns reference to the current record in the stream.
self_type & operator>>(reference record)
prefetcher_type * prefetcher
unsigned int max_device_id()
Returns automatic physical device id counter.
Simpler non-growing vector without initialization.
void compute_prefetch_schedule(const size_t *first, const size_t *last, size_t *out_first, size_t m, size_t D)
reference current()
Returns reference to the current record in the stream.
#define BUF_ISTREAM_CHECK_END
BidIteratorType bid_iterator_type
buf_istream_reverse & operator=(const buf_istream_reverse &)=delete
non-copyable: delete assignment operator
iterator begin() noexcept
return mutable iterator to first element
block_prefetcher< block_type, typename bid_vector_type::iterator > prefetcher_type
size_type size() const noexcept
return number of items in vector
static instance_pointer get_instance()
return instance or create base instance if empty
typename block_type::reference reference
bool block_consumed(block_type *&buffer)
~buf_istream_reverse()
Frees used internal objects.