oss_src/sframe/parallel_csv_parser.cpp
parallel_csv_parser(std::vector<flex_type_enum> column_types, 
                      csv_line_tokenizer tokenizer,
                      bool continue_on_failure,
                      bool store_errors,
                      size_t row_limit,
                      std::vector<size_t> column_output_order = std::vector<size_t>(),
                      size_t num_threads = thread_pool::get_instance().size()):
      nthreads(std::max<size_t>(num_threads, 2) - 1), 
      parsed_buffer(nthreads), parsed_buffer_last_elem(nthreads), 
      writing_buffer(nthreads), writing_buffer_last_elem(nthreads), 
      error_buffer(nthreads), writing_error_buffer(nthreads),
      thread_local_tokenizer(nthreads, tokenizer), 
    read_group(thread_pool::get_instance()), 
    write_group(thread_pool::get_instance()), column_types(column_types),
    column_output_order(column_output_order),
    row_limit(row_limit), 
    continue_on_failure(continue_on_failure), 
    store_errors(store_errors),
    line_terminator(tokenizer.line_terminator),
    is_regular_line_terminator(line_terminator == "\n") {
    }
/**
   * Constructs a parallel CSV parser which parses a CSV into SFrames
   * \param column_types This must match the number of columns of output and
   *                     the type of each column. Generally this should the same
   *                     number of columns as in the CSV. If only a subset if
   *                     (say 3 out of 4) columns are to be stored, this should
   *                     contain the types of the output columns, and 
   *                     column_output_order is used to map the CSV columns to
   *                     the output columns. 
   * \param tokenizer The tokenizer rules to use
   * \param continue_on_failure Whether to keep going even when an error is 
   *                            encountered.
   * \param store_errors Whether to store bad lines in a separate SArray
   * \param row_limit Maximum number of rows to read
   * \param column_output_order An array of the same length as the output.
   *                     Essentially column 'i' will be written to output_order[i].
   *                     if output_order[i] == -1, the column is ignored.
   *                     If output_order is empty (default), this is equivalent
   *                     to the having output_order[i] == i.
   * \param num_threads Amount of parallelism to use. 
   */
Constructs a parallel CSV parser which parses a CSV into SFrames
\param column_types This must match the number of columns of output and
the type of each column. Generally this should the same
number of columns as in the CSV. If only a subset if
(say 3 out of 4) columns are to be stored, this should
contain the types of the output columns, and
column_output_order is used to map the CSV columns to
the output columns.
\param tokenizer The tokenizer rules to use
\param continue_on_failure Whether to keep going even when an error is
encountered.
\param store_errors Whether to store bad lines in a separate SArray
\param row_limit Maximum number of rows to read
\param column_output_order An array of the same length as the output.
Essentially column 'i' will be written to output_order[i].
if output_order[i] == -1, the column is ignored.
If output_order is empty (default), this is equivalent
to the having output_order[i] == i.
\param num_threads Amount of parallelism to use.
Constructs a parallel CSV parser which parses a CSV into SFrames \ param column_types This must match the number of columns of output and the type of each column . Generally this should the same number of columns as in the CSV . If only a subset if ( say 3 out of 4 ) columns are to be stored this should contain the types of the output columns and column_output_order is used to map the CSV columns to the output columns . \ param tokenizer The tokenizer rules to use \ param continue_on_failure Whether to keep going even when an error is encountered . \ param store_errors Whether to store bad lines in a separate SArray \ param row_limit Maximum number of rows to read \ param column_output_order An array of the same length as the output . Essentially column ' i ' will be written to output_order [ i ] . if output_order [ i ] == - 1 the column is ignored . If output_order is empty ( default ) this is equivalent to the having output_order [ i ] == i . \ param num_threads Amount of parallelism to use .
parallel_csv_parser(std::vector<flex_type_enum> column_types, 
                      csv_line_tokenizer tokenizer,
                      bool continue_on_failure,
                      bool store_errors,
                      size_t row_limit,
                      std::vector<size_t> column_output_order = std::vector<size_t>(),
                      size_t num_threads = thread_pool::get_instance().size()):
      nthreads(std::max<size_t>(num_threads, 2) - 1), 
      parsed_buffer(nthreads), parsed_buffer_last_elem(nthreads), 
      writing_buffer(nthreads), writing_buffer_last_elem(nthreads), 
      error_buffer(nthreads), writing_error_buffer(nthreads),
      thread_local_tokenizer(nthreads, tokenizer), 
    read_group(thread_pool::get_instance()), 
    write_group(thread_pool::get_instance()), column_types(column_types),
    column_output_order(column_output_order),
    row_limit(row_limit), 
    continue_on_failure(continue_on_failure), 
    store_errors(store_errors),
    line_terminator(tokenizer.line_terminator),
    is_regular_line_terminator(line_terminator == "\n") {
    }
parallel_csv_parser ( std :: vector < flex_type_enum > column_types , csv_line_tokenizer tokenizer , bool continue_on_failure , bool store_errors , size_t row_limit , std :: vector < size_t > column_output_order = std :: vector < size_t > ( ) , size_t num_threads = thread_pool :: get_instance ( ) . size ( ) ) : nthreads ( std :: max < size_t > ( num_threads , 2 ) - 1 ) , parsed_buffer ( nthreads ) , parsed_buffer_last_elem ( nthreads ) , writing_buffer ( nthreads ) , writing_buffer_last_elem ( nthreads ) , error_buffer ( nthreads ) , writing_error_buffer ( nthreads ) , thread_local_tokenizer ( nthreads , tokenizer ) , read_group ( thread_pool :: get_instance ( ) ) , write_group ( thread_pool :: get_instance ( ) ) , column_types ( column_types ) , column_output_order ( column_output_order ) , row_limit ( row_limit ) , continue_on_failure ( continue_on_failure ) , store_errors ( store_errors ) , line_terminator ( tokenizer . line_terminator ) , is_regular_line_terminator ( line_terminator == " \n " ) { }
Constructs a parallel CSV parser which parses a CSV into SFrames
 \param column_types This must match the number of columns of output and
                     the type of each column.
Constructs a parallel CSV parser which parses a CSV into SFrames \ param column_types This must match the number of columns of output and the type of each column .