util::stream::Sort< Compare, Combine > Class Template Reference

#include <sort.hh>

Collaboration diagram for util::stream::Sort< Compare, Combine >:

Collaboration graph
[legend]

List of all members.

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 ()


Detailed Description

template<class Compare, class Combine = NeverCombine>
class util::stream::Sort< Compare, Combine >

Sort

Definition at line 393 of file sort.hh.


Constructor & Destructor Documentation

template<class Compare, class Combine = NeverCombine>
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.

Here is the call graph for this function:


Member Function Documentation

template<class Compare, class Combine = NeverCombine>
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().

Here is the caller graph for this function:

template<class Compare, class Combine = NeverCombine>
std::size_t util::stream::Sort< Compare, Combine >::Merge ( std::size_t  lazy_memory  )  [inline]

template<class Compare, class Combine = NeverCombine>
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().

Here is the call graph for this function:

template<class Compare, class Combine = NeverCombine>
void util::stream::Sort< Compare, Combine >::Output ( Chain out,
std::size_t  lazy_memory 
) [inline]

template<class Compare, class Combine = NeverCombine>
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().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Compare, class Combine = NeverCombine>
int util::stream::Sort< Compare, Combine >::StealCompleted (  )  [inline]


The documentation for this class was generated from the following file:

Generated on Thu Jul 6 00:34:55 2017 for Moses by  doxygen 1.5.9