STXXL
1.4.0
|
Forms sorted runs of data taking elements in sorted order (element by element).
A specialization of runs_creator
that allows to create sorted runs data structure usable for runs_merger
from sequences of elements in sorted order.
ValueType_ | type of values (parameter for from_sorted_sequences strategy) |
CompareType_ | type of comparison object used for sorting the runs |
BlockSize_ | size of blocks used to store the runs |
AllocStr_ | functor that defines allocation strategy for the runs |
Definition at line 703 of file sort_stream.h.
Public Types | |
typedef AllocStr_ | alloc_strategy_type |
typedef typed_block < BlockSize_, value_type > | block_type |
typedef CompareType_ | cmp_type |
typedef sorted_runs_type | result_type |
typedef sorted_runs < trigger_entry_type, cmp_type > | sorted_runs_data_type |
typedef counting_ptr < sorted_runs_data_type > | sorted_runs_type |
typedef sort_helper::trigger_entry < block_type > | trigger_entry_type |
typedef ValueType_ | value_type |
Public Member Functions | |
runs_creator (CompareType_ c, unsigned_type memory_to_use) | |
Creates the object. More... | |
void | finish () |
Finishes current run and begins new one. More... | |
void | push (const value_type &val) |
Adds new element to the current run. More... | |
sorted_runs_type & | result () |
Returns the sorted runs object. More... | |
Private Types | |
typedef sorted_runs_data_type::run_type | run_type |
Private Attributes | |
alloc_strategy_type | alloc_strategy |
CompareType_ | cmp |
block_type * | cur_block |
unsigned_type | iblock |
unsigned_type | irun |
unsigned_type | m_ |
unsigned_type | offset |
sorted_runs_type | result_ |
buffered_writer< block_type > | writer |
Additional Inherited Members | |
Private Member Functions inherited from stxxl::noncopyable | |
noncopyable () | |
typedef AllocStr_ stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::alloc_strategy_type |
Definition at line 714 of file sort_stream.h.
typedef typed_block<BlockSize_, value_type> stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::block_type |
Definition at line 712 of file sort_stream.h.
typedef CompareType_ stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::cmp_type |
Definition at line 717 of file sort_stream.h.
typedef sorted_runs_type stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::result_type |
Definition at line 720 of file sort_stream.h.
|
private |
Definition at line 723 of file sort_stream.h.
typedef sorted_runs<trigger_entry_type, cmp_type> stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::sorted_runs_data_type |
Definition at line 718 of file sort_stream.h.
typedef counting_ptr<sorted_runs_data_type> stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::sorted_runs_type |
Definition at line 719 of file sort_stream.h.
typedef sort_helper::trigger_entry<block_type> stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::trigger_entry_type |
Definition at line 713 of file sort_stream.h.
typedef ValueType_ stxxl::stream::runs_creator< from_sorted_sequences< ValueType_ >, CompareType_, BlockSize_, AllocStr_ >::value_type |
Definition at line 711 of file sort_stream.h.
|
inline |
Creates the object.
c | comparator object |
memory_to_use | memory amount that is allowed to used by the sorter in bytes. Recommended value: 2 * block_size * D |
Definition at line 741 of file sort_stream.h.
References stxxl::sort_memory_usage_factor(), and stxxl::sort_helper::verify_sentinel_strict_weak_ordering().
|
inline |
Finishes current run and begins new one.
Definition at line 793 of file sort_stream.h.
References stxxl::make_bid_iterator(), and stxxl::block_manager::new_blocks().
|
inline |
Adds new element to the current run.
val | value to be added to the current run |
Definition at line 760 of file sort_stream.h.
References stxxl::make_bid_iterator(), and stxxl::block_manager::new_blocks().
|
inline |
Returns the sorted runs object.
runs_merger
object as input Definition at line 836 of file sort_stream.h.
|
private |
Definition at line 734 of file sort_stream.h.
|
private |
Definition at line 725 of file sort_stream.h.
|
private |
Definition at line 730 of file sort_stream.h.
|
private |
Definition at line 732 of file sort_stream.h.
|
private |
Definition at line 733 of file sort_stream.h.
|
private |
Definition at line 728 of file sort_stream.h.
|
private |
Definition at line 731 of file sort_stream.h.
|
private |
Definition at line 727 of file sort_stream.h.
|
private |
Definition at line 729 of file sort_stream.h.