Stxxl
1.3.2
|
Functions | |
template<class RunsType_ , class Cmp_ > | |
bool | stream::check_sorted_runs (const RunsType_ &sruns, Cmp_ cmp) |
Checker for the sorted runs object created by the runs_creator . More... | |
template<class InputIterator_ > | |
iterator2stream< InputIterator_ > | stream::streamify (InputIterator_ begin, InputIterator_ end) |
Input iterator range to stream converter. More... | |
template<typename Tp_ , typename AllocStr_ , typename SzTp_ , typename DiffTp_ , unsigned BlkSize_, typename PgTp_ , unsigned PgSz_> | |
vector_iterator2stream < stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > > | stream::streamify (stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > begin, stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > end, unsigned_type nbuffers=0) |
Input external stxxl::vector iterator range to stream converter It is more efficient than generic input iterator streamify thanks to use of overlapping. More... | |
template<typename Tp_ , typename AllocStr_ , typename SzTp_ , typename DiffTp_ , unsigned BlkSize_, typename PgTp_ , unsigned PgSz_> | |
vector_iterator2stream < stxxl::const_vector_iterator < Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > > | stream::streamify (stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > begin, stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > end, unsigned_type nbuffers=0) |
Input external stxxl::vector const iterator range to stream converter It is more efficient than generic input iterator streamify thanks to use of overlapping. More... | |
template<typename Tp_ , typename AllocStr_ , typename SzTp_ , typename DiffTp_ , unsigned BlkSize_, typename PgTp_ , unsigned PgSz_> | |
vector_iterator2stream_sr < stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > > | stream::streamify_sr (stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > begin, stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > end, unsigned_type nbuffers=0) |
Version of streamify . Switches from vector_iterator2stream to iterator2stream for small ranges. More... | |
template<typename Tp_ , typename AllocStr_ , typename SzTp_ , typename DiffTp_ , unsigned BlkSize_, typename PgTp_ , unsigned PgSz_> | |
vector_iterator2stream_sr < stxxl::const_vector_iterator < Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > > | stream::streamify_sr (stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > begin, stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > end, unsigned_type nbuffers=0) |
Version of streamify . Switches from vector_iterator2stream to iterator2stream for small ranges. More... | |
template<class OutputIterator_ , class StreamAlgorithm_ > | |
OutputIterator_ | stream::materialize (StreamAlgorithm_ &in, OutputIterator_ out) |
Stores consecutively stream content to an output iterator. More... | |
template<class OutputIterator_ , class StreamAlgorithm_ > | |
OutputIterator_ | stream::materialize (StreamAlgorithm_ &in, OutputIterator_ outbegin, OutputIterator_ outend) |
Stores consecutively stream content to an output iterator range until end of the stream or end of the iterator range is reached. More... | |
template<typename Tp_ , typename AllocStr_ , typename SzTp_ , typename DiffTp_ , unsigned BlkSize_, typename PgTp_ , unsigned PgSz_, class StreamAlgorithm_ > | |
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | stream::materialize (StreamAlgorithm_ &in, stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > outbegin, stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > outend, unsigned_type nbuffers=0) |
Stores consecutively stream content to an output stxxl::vector iterator until end of the stream or end of the iterator range is reached. More... | |
template<typename Tp_ , typename AllocStr_ , typename SzTp_ , typename DiffTp_ , unsigned BlkSize_, typename PgTp_ , unsigned PgSz_, class StreamAlgorithm_ > | |
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | stream::materialize (StreamAlgorithm_ &in, stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > out, unsigned_type nbuffers=0) |
Stores consecutively stream content to an output stxxl::vector iterator. More... | |
template<class StreamAlgorithm_ > | |
void | stream::discard (StreamAlgorithm_ &in) |
Reads stream content and discards it. Useful where you do not need the processed stream anymore, but are just interested in side effects, or just for debugging. More... | |
template<class Generator_ > | |
generator2stream< Generator_ > | stream::streamify (Generator_ gen_) |
Adaptable generator to stream converter. More... | |
Package that enables pipelining of consequent sorts and scans of the external data avoiding the saving the intermediate results on the disk, e.g. the output of a sort can be directly fed into a scan procedure without the need to save it on a disk. All components of the package are contained in the \c stxxl::stream namespace. STREAM ALGORITHM CONCEPT (Do not confuse with C++ input/output streams)
//! //! struct stream_algorithm // stream, pipe, whatever //! { //! typedef some_type value_type; //! //! const value_type & operator * () const; // return current element of the stream //! stream_algorithm & operator ++ (); // go to next element. precondition: empty() == false //! bool empty() const; // return true if end of stream is reached //! //! }; //!
bool stream::check_sorted_runs | ( | const RunsType_ & | sruns, |
Cmp_ | cmp | ||
) |
Checker for the sorted runs object created by the runs_creator
.
sruns | sorted runs object |
cmp | comparison object used for checking the order of elements in runs |
true
if runs are sorted, false
otherwise =
References wait_all().
void stream::discard | ( | StreamAlgorithm_ & | in | ) |
Reads stream content and discards it. Useful where you do not need the processed stream anymore, but are just interested in side effects, or just for debugging.
in | input stream |
OutputIterator_ stream::materialize | ( | StreamAlgorithm_ & | in, |
OutputIterator_ | out | ||
) |
Stores consecutively stream content to an output iterator.
in | stream to be stored used as source |
out | output iterator used as destination |
Referenced by sort().
OutputIterator_ stream::materialize | ( | StreamAlgorithm_ & | in, |
OutputIterator_ | outbegin, | ||
OutputIterator_ | outend | ||
) |
Stores consecutively stream content to an output iterator range until end of the stream or end of the iterator range is reached.
in | stream to be stored used as source |
outbegin | output iterator used as destination |
outend | output end iterator, pointing beyond the output range |
This function is useful when you do not know the length of the stream beforehand.
stxxl::vector_iterator<Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_> stream::materialize | ( | StreamAlgorithm_ & | in, |
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | outbegin, | ||
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | outend, | ||
unsigned_type | nbuffers = 0 |
||
) |
Stores consecutively stream content to an output stxxl::vector
iterator until end of the stream or end of the iterator range is reached.
in | stream to be stored used as source |
outbegin | output stxxl::vector iterator used as destination |
outend | output end iterator, pointing beyond the output range |
nbuffers | number of blocks used for overlapped writing (0 is default, which equals to (2 * number_of_disks) |
This function is useful when you do not know the length of the stream beforehand.
stxxl::vector_iterator<Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_> stream::materialize | ( | StreamAlgorithm_ & | in, |
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | out, | ||
unsigned_type | nbuffers = 0 |
||
) |
Stores consecutively stream content to an output stxxl::vector
iterator.
in | stream to be stored used as source |
out | output stxxl::vector iterator used as destination |
nbuffers | number of blocks used for overlapped writing (0 is default, which equals to (2 * number_of_disks) |
iterator2stream<InputIterator_> stream::streamify | ( | InputIterator_ | begin, |
InputIterator_ | end | ||
) |
Input iterator range to stream converter.
begin | iterator, pointing to the first value |
end | iterator, pointing to the last + 1 position, i.e. beyond the range |
Referenced by random_shuffle(), and sort().
vector_iterator2stream<stxxl::vector_iterator<Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_> > stream::streamify | ( | stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | begin, |
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | end, | ||
unsigned_type | nbuffers = 0 |
||
) |
Input external stxxl::vector
iterator range to stream converter It is more efficient than generic input iterator streamify
thanks to use of overlapping.
begin | iterator, pointing to the first value |
end | iterator, pointing to the last + 1 position, i.e. beyond the range |
nbuffers | number of blocks used for overlapped reading (0 is default, which equals to (2 * number_of_disks) |
vector_iterator2stream<stxxl::const_vector_iterator<Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_> > stream::streamify | ( | stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | begin, |
stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | end, | ||
unsigned_type | nbuffers = 0 |
||
) |
Input external stxxl::vector
const iterator range to stream converter It is more efficient than generic input iterator streamify
thanks to use of overlapping.
begin | const iterator, pointing to the first value |
end | const iterator, pointing to the last + 1 position, i.e. beyond the range |
nbuffers | number of blocks used for overlapped reading (0 is default, which equals to (2 * number_of_disks) |
generator2stream<Generator_> stream::streamify | ( | Generator_ | gen_ | ) |
Adaptable generator to stream converter.
gen_ | generator object |
vector_iterator2stream_sr<stxxl::vector_iterator<Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_> > stream::streamify_sr | ( | stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | begin, |
stxxl::vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | end, | ||
unsigned_type | nbuffers = 0 |
||
) |
Version of streamify
. Switches from vector_iterator2stream
to iterator2stream
for small ranges.
vector_iterator2stream_sr<stxxl::const_vector_iterator<Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_> > stream::streamify_sr | ( | stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | begin, |
stxxl::const_vector_iterator< Tp_, AllocStr_, SzTp_, DiffTp_, BlkSize_, PgTp_, PgSz_ > | end, | ||
unsigned_type | nbuffers = 0 |
||
) |
Version of streamify
. Switches from vector_iterator2stream
to iterator2stream
for small ranges.