#include <sort.hh>
Public Member Functions | |
Sort (Chain &in, const SortConfig &config, const Compare &compare=Compare(), const Combine &combine=Combine()) | |
uint64_t | Size () const |
std::size_t | Merge (std::size_t lazy_memory) |
void | Output (Chain &out, std::size_t lazy_memory) |
std::size_t | DefaultLazy () |
void | Output (Chain &out) |
int | StealCompleted () |
Definition at line 393 of file sort.hh.
util::stream::Sort< Compare, Combine >::Sort | ( | Chain & | in, | |
const SortConfig & | config, | |||
const Compare & | compare = Compare() , |
|||
const Combine & | combine = Combine() | |||
) | [inline] |
Constructs an object capable of sorting
Definition at line 396 of file sort.hh.
References util::stream::SortConfig::buffer_size, util::scoped_fd::get(), util::stream::SortConfig::total_memory, and UTIL_THROW_IF.
std::size_t util::stream::Sort< Compare, Combine >::DefaultLazy | ( | ) | [inline] |
Definition at line 507 of file sort.hh.
References util::stream::SortConfig::buffer_size, and util::stream::SortConfig::total_memory.
Referenced by util::stream::Sort< Compare, Combine >::Output().
std::size_t util::stream::Sort< Compare, Combine >::Merge | ( | std::size_t | lazy_memory | ) | [inline] |
Definition at line 416 of file sort.hh.
References util::stream::ChainConfig::block_count, util::stream::SortConfig::buffer_size, util::stream::ChainConfig::entry_size, util::scoped_fd::get(), util::MakeTemp(), util::scoped_fd::release(), util::stream::Offsets::RemainingBlocks(), util::scoped_fd::reset(), util::ResizeOrThrow(), util::SeekOrThrow(), util::stream::Sort< Compare, Combine >::Size(), util::SizeOrThrow(), swap(), util::stream::SortConfig::temp_prefix, util::stream::SortConfig::total_memory, util::stream::ChainConfig::total_memory, and util::stream::Chain::Wait().
Referenced by util::stream::Sort< Compare, Combine >::Output(), and util::stream::Sort< Compare, Combine >::StealCompleted().
void util::stream::Sort< Compare, Combine >::Output | ( | Chain & | out | ) | [inline] |
Definition at line 513 of file sort.hh.
References util::stream::Sort< Compare, Combine >::DefaultLazy(), and util::stream::Sort< Compare, Combine >::Output().
void util::stream::Sort< Compare, Combine >::Output | ( | Chain & | out, | |
std::size_t | lazy_memory | |||
) | [inline] |
Definition at line 477 of file sort.hh.
References util::stream::SortConfig::buffer_size, util::scoped_fd::get(), util::stream::Sort< Compare, Combine >::Merge(), util::scoped_fd::release(), util::stream::Chain::SetProgressTarget(), and util::stream::Sort< Compare, Combine >::Size().
Referenced by util::stream::BlockingSort(), and util::stream::Sort< Compare, Combine >::Output().
uint64_t util::stream::Sort< Compare, Combine >::Size | ( | ) | const [inline] |
Definition at line 410 of file sort.hh.
References util::scoped_fd::get(), and util::SizeOrThrow().
Referenced by util::stream::BlockingSort(), util::stream::Sort< Compare, Combine >::Merge(), and util::stream::Sort< Compare, Combine >::Output().
int util::stream::Sort< Compare, Combine >::StealCompleted | ( | ) | [inline] |
Definition at line 518 of file sort.hh.
References util::scoped_fd::get(), util::stream::Sort< Compare, Combine >::Merge(), util::scoped_fd::release(), util::scoped_fd::reset(), and util::SeekOrThrow().