Stxxl
1.4.0
|
All sorted runs of a sort operation. More...
#include <sorted_runs.h>
Public Types | |
typedef TriggerEntryType | trigger_entry_type |
typedef trigger_entry_type::block_type | block_type |
typedef block_type::value_type | value_type |
typedef std::vector < trigger_entry_type > | run_type |
typedef std::vector< value_type > | small_run_type |
typedef stxxl::external_size_type | size_type |
typedef std::vector< run_type > ::size_type | run_index_type |
typedef CompareType_ | cmp_type |
Public Member Functions | |
sorted_runs () | |
~sorted_runs () | |
void | inc_ref () |
Increment internal reference counter. | |
void | dec_ref () |
Decrement internal reference counter. If it hits zero, the object is freed. | |
void | clear () |
Clear the internal state of the object: release all runs and reset. | |
void | add_run (const run_type &run, size_type run_size) |
Add a new run with given number of elements. | |
void | swap (sorted_runs &b) |
Public Attributes | |
size_type | elements |
total number of elements in all runs | |
std::vector< run_type > | runs |
vector of runs (containing vectors of block ids) | |
std::vector< size_type > | runs_sizes |
vector of the number of elements in each individual run | |
small_run_type | small_run |
Small sort optimization: | |
size_type | refs |
reference counter used by counting_ptr<> | |
Private Member Functions | |
void | deallocate_blocks () |
Deallocates the blocks which the runs occupy. |
All sorted runs of a sort operation.
Definition at line 37 of file sorted_runs.h.
typedef trigger_entry_type::block_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::block_type |
Definition at line 40 of file sorted_runs.h.
typedef CompareType_ stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::cmp_type |
Definition at line 47 of file sorted_runs.h.
typedef std::vector<run_type>::size_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::run_index_type |
Definition at line 45 of file sorted_runs.h.
typedef std::vector<trigger_entry_type> stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::run_type |
Definition at line 42 of file sorted_runs.h.
typedef stxxl::external_size_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::size_type |
Definition at line 44 of file sorted_runs.h.
typedef std::vector<value_type> stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::small_run_type |
Definition at line 43 of file sorted_runs.h.
typedef TriggerEntryType stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::trigger_entry_type |
Definition at line 39 of file sorted_runs.h.
typedef block_type::value_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::value_type |
Definition at line 41 of file sorted_runs.h.
stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::sorted_runs | ( | ) | [inline] |
Definition at line 68 of file sorted_runs.h.
stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::~sorted_runs | ( | ) | [inline] |
Definition at line 72 of file sorted_runs.h.
void stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::add_run | ( | const run_type & | run, |
size_type | run_size | ||
) | [inline] |
Add a new run with given number of elements.
Definition at line 101 of file sorted_runs.h.
References run_size.
void stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::clear | ( | ) | [inline] |
Clear the internal state of the object: release all runs and reset.
Definition at line 90 of file sorted_runs.h.
Referenced by stxxl::stream::runs_creator< use_push< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::clear().
void stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::deallocate_blocks | ( | ) | [inline, private] |
Deallocates the blocks which the runs occupy.
Definition at line 124 of file sorted_runs.h.
References stxxl::block_manager::delete_blocks(), and stxxl::make_bid_iterator().
void stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::dec_ref | ( | ) | [inline] |
Decrement internal reference counter. If it hits zero, the object is freed.
Definition at line 84 of file sorted_runs.h.
void stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::inc_ref | ( | ) | [inline] |
Increment internal reference counter.
Definition at line 78 of file sorted_runs.h.
void stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::swap | ( | sorted_runs< TriggerEntryType, CompareType_ > & | b | ) | [inline] |
Swap contents with another object. This is used by the recursive merger to swap in a sorted_runs object with fewer runs.
Definition at line 110 of file sorted_runs.h.
References stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::elements, stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::runs, stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::runs_sizes, stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::small_run, and std::swap().
size_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::elements |
total number of elements in all runs
Definition at line 50 of file sorted_runs.h.
Referenced by stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::swap().
size_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::refs |
reference counter used by counting_ptr<>
Definition at line 65 of file sorted_runs.h.
std::vector<run_type> stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::runs |
vector of runs (containing vectors of block ids)
Definition at line 53 of file sorted_runs.h.
Referenced by stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::swap().
std::vector<size_type> stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::runs_sizes |
vector of the number of elements in each individual run
Definition at line 56 of file sorted_runs.h.
Referenced by stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::swap().
small_run_type stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::small_run |
Small sort optimization:
Definition at line 62 of file sorted_runs.h.
Referenced by stxxl::stream::sorted_runs< TriggerEntryType, CompareType_ >::swap().