Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ThreadLines Struct Reference

Public Member Functions

void Verify () const
 Validate everything is as it should be, returns true if it's all good, false o.w.
void Insert (idx_t thread, ValidatorLine line_info)
string Print () const

Private Attributes

map< idx_t, ValidatorLine > thread_lines

Static Private Attributes

static constexpr idx_t error_margin = 2
 We allow up to 2 bytes of error margin (basically \r
).

Constructor & Destructor Documentation

◆ ThreadLines()

duckdb::ThreadLines::ThreadLines ( )
inline
166455{};

Member Function Documentation

◆ Verify()

void duckdb::ThreadLines::Verify ( ) const

Validate everything is as it should be, returns true if it's all good, false o.w.

177011 {
177012 bool initialized = false;
177013 idx_t last_end_pos = 0;
177014 for (auto &line_info : thread_lines) {
177015 if (!initialized) {
177016 // First run, we just set the initialized to true
177017 initialized = true;
177018 } else {
177019 if (line_info.second.start_pos == line_info.second.end_pos) {
177020 last_end_pos = line_info.second.end_pos;
177021 continue;
177022 }
177023 if (last_end_pos + error_margin < line_info.second.start_pos ||
177024 line_info.second.start_pos < last_end_pos - error_margin) {
177025 std::ostringstream error;
177026 error << "The Parallel CSV Reader currently does not support a full read on this file." << '\n';
177027 error << "To correctly parse this file, please run with the single threaded error (i.e., parallel = "
177028 "false)"
177029 << '\n';
177030 throw NotImplementedException(error.str());
177031 }
177032 }
177033 last_end_pos = line_info.second.end_pos;
177034 }
177035}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
static constexpr idx_t error_margin
We allow up to 2 bytes of error margin (basically \r ).
Definition duckdb.cpp:166466

◆ Insert()

void duckdb::ThreadLines::Insert ( idx_t thread,
ValidatorLine line_info )
176997 {
176998 D_ASSERT(thread_lines.find(thread_idx) == thread_lines.end());
176999 thread_lines.insert({thread_idx, line_info});
177000}

◆ Print()

string duckdb::ThreadLines::Print ( ) const
177002 {
177003 string result;
177004 for (auto &line : thread_lines) {
177005 result += "{start_pos: " + std::to_string(line.second.start_pos) +
177006 ", end_pos: " + std::to_string(line.second.end_pos) + "}";
177007 }
177008 return result;
177009}
void line(InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)

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