14 #ifndef STXXL_STREAM__SORTED_RUNS_H
15 #define STXXL_STREAM__SORTED_RUNS_H
18 #include <stxxl/bits/mng/mng.h>
19 #include <stxxl/bits/mng/typed_block.h>
20 #include <stxxl/bits/algo/adaptor.h>
23 __STXXL_BEGIN_NAMESPACE
36 template <
typename TriggerEntryType>
39 typedef TriggerEntryType trigger_entry_type;
40 typedef typename trigger_entry_type::block_type block_type;
41 typedef typename block_type::value_type value_type;
42 typedef std::vector<trigger_entry_type> run_type;
43 typedef std::vector<value_type> small_run_type;
44 typedef stxxl::external_size_type size_type;
45 typedef typename std::vector<run_type>::size_type run_index_type;
48 std::vector<run_type> runs;
49 std::vector<size_type> runs_sizes;
56 small_run_type small_;
60 const small_run_type & small_run()
const
72 for (unsigned_type i = 0; i < runs.size(); ++i)
73 bm->
delete_blocks(make_bid_iterator(runs[i].begin()), make_bid_iterator(runs[i].end()));
79 size_type size()
const
91 #endif // !STXXL_STREAM__SORTED_RUNS_H
All sorted runs of a sort operation.
Definition: sorted_runs.h:37
void delete_blocks(const BIDIteratorClass &bidbegin, const BIDIteratorClass &bidend)
Deallocates blocks.
Definition: mng.h:218
void deallocate_blocks()
Deallocates the blocks which the runs occupy.
Definition: sorted_runs.h:69
Block manager class.
Definition: mng.h:59