Turi Create  4.0
turi::swriter_base< Iterator > Class Template Referenceabstract

#include <core/storage/sframe_data/swriter_base.hpp>

Public Member Functions

virtual bool set_num_segments (size_t numseg)=0
 
virtual size_t num_segments () const =0
 Returns the number of parallel output segments.
 
virtual iterator get_output_iterator (size_t segmentid)=0
 Gets an output iterator to the specified segment.
 
virtual void close ()=0
 

Detailed Description

template<typename Iterator>
class turi::swriter_base< Iterator >

Base class for a basic parallel writer interface.

Also see siterable for the reader interface

Definition at line 27 of file swriter_base.hpp.

Member Function Documentation

◆ close()

template<typename Iterator>
virtual void turi::swriter_base< Iterator >::close ( )
pure virtual

Closes the array completely. This implicitly closes all segments. After the writer is closed, no segments can be written. And only after the write is finalized, that the result of the swriter can be given to an sarray for reading.

Implemented in turi::sframe, turi::sarray< T >, turi::sarray< turi::flexible_type >, and turi::sarray< std::string >.

◆ set_num_segments()

template<typename Iterator>
virtual bool turi::swriter_base< Iterator >::set_num_segments ( size_t  numseg)
pure virtual

Sets the number of parallel output segments. Returns true if the number of segments is set successfully, false otherwise. Generally speaking, once an output iterator has been obtained, the number of segments can no longer be changed.

Parameters
numsegA value greater than 0

Implemented in turi::sframe, turi::sarray< T >, turi::sarray< turi::flexible_type >, and turi::sarray< std::string >.


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