Turi Create
4.0
|
#include <core/storage/sframe_data/sarray_sorted_buffer.hpp>
Public Member Functions | |
sarray_sorted_buffer (size_t buffer_size, comparator_type comparator, bool deduplicate=false) | |
construct with given sarray and the segmentid as sink. | |
void | add (value_type &&val, size_t thread_id=0) |
Add a new element to the container. | |
template<typename OutIterator > | |
void | sort_and_write (OutIterator out) |
void | close () |
Flush the last buffer, and close the sarray. | |
An SArray backed buffer that stores elements in sorted order.
The container has an in memory buffer, and is backed by an sarray segment. When the buffer is full, it is sorted and written into the sarray segment as a sorted chunk.
Definition at line 40 of file sarray_sorted_buffer.hpp.
void turi::sarray_sorted_buffer< T >::sort_and_write | ( | OutIterator | out | ) |
Sort all elements in the container and writes to the output. If deduplicate is true, only output unique elements.
Definition at line 123 of file sarray_sorted_buffer.hpp.