Stxxl
1.2.1
|
Forms sorted runs of elements passed in push() method. More...
#include <sort_stream.h>
Public Member Functions | |
runs_creator (Cmp_ c, unsigned_type memory_to_use) | |
Creates the object. | |
void | push (const value_type &val) |
Adds new element to the sorter. | |
const sorted_runs_type & | result () |
Returns the sorted runs object. |
Forms sorted runs of elements passed in push() method.
A specialization of runs_creator
that allows to create sorted runs data structure usable for runs_merger
from elements passed in sorted push() method.
Template parameters:
ValueType_
type of values (parameter for use_push
strategy)Cmp_
type of comparison object used for sorting the runsBlockSize_
size of blocks used to store the runsAllocStr_
functor that defines allocation strategy for the runs
|
inline |
Creates the object.
c | comparator object |
memory_to_use | memory amount that is allowed to used by the sorter in bytes |
|
inline |
Adds new element to the sorter.
val | value to be added |
References element_block< T, Size_ >::begin(), element_block< T, Size_ >::end(), block_manager::new_blocks(), typed_block< RawSize_, T_, NRef_, InfoType_ >::size, and request::wait().
|
inline |
Returns the sorted runs object.
runs_merger
object as input