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::VectorListBuffer Class Reference
Inheritance diagram for duckdb::VectorListBuffer:
Collaboration diagram for duckdb::VectorListBuffer:

Public Member Functions

 VectorListBuffer (unique_ptr< Vector > vector, idx_t initial_capacity=STANDARD_VECTOR_SIZE)
 VectorListBuffer (const LogicalType &list_type, idx_t initial_capacity=STANDARD_VECTOR_SIZE)
Vector & GetChild ()
void Reserve (idx_t to_reserve)
void Append (const Vector &to_append, idx_t to_append_size, idx_t source_offset=0)
void Append (const Vector &to_append, const SelectionVector &sel, idx_t to_append_size, idx_t source_offset=0)
void PushBack (const Value &insert)
idx_t GetSize ()
idx_t GetCapacity ()
void SetCapacity (idx_t new_capacity)
void SetSize (idx_t new_size)
Public Member Functions inherited from duckdb::VectorBuffer
 VectorBuffer (VectorBufferType type)
 VectorBuffer (idx_t data_size)
 VectorBuffer (AllocatedData &&data_p)
data_ptr_t GetData ()
void SetData (AllocatedData &&new_data)
VectorAuxiliaryData * GetAuxiliaryData ()
void SetAuxiliaryData (unique_ptr< VectorAuxiliaryData > aux_data_p)
void MoveAuxiliaryData (VectorBuffer &source_buffer)
virtual optional_ptr< Allocator > GetAllocator () const
VectorBufferType GetBufferType () const
VectorAuxiliaryDataType GetAuxiliaryDataType () const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Private Attributes

unique_ptr< Vector > child
 child vectors used for nested data
idx_t capacity = 0
idx_t size = 0

Additional Inherited Members

Static Public Member Functions inherited from duckdb::VectorBuffer
static buffer_ptr< VectorBuffer > CreateStandardVector (PhysicalType type, idx_t capacity=STANDARD_VECTOR_SIZE)
static buffer_ptr< VectorBuffer > CreateConstantVector (PhysicalType type)
static buffer_ptr< VectorBuffer > CreateConstantVector (const LogicalType &logical_type)
static buffer_ptr< VectorBuffer > CreateStandardVector (const LogicalType &logical_type, idx_t capacity=STANDARD_VECTOR_SIZE)
Protected Attributes inherited from duckdb::VectorBuffer
VectorBufferType buffer_type
unique_ptr< VectorAuxiliaryData > aux_data
AllocatedData data

Constructor & Destructor Documentation

◆ VectorListBuffer() [1/2]

duckdb::VectorListBuffer::VectorListBuffer ( unique_ptr< Vector > vector,
idx_t initial_capacity = STANDARD_VECTOR_SIZE )
explicit
138761 : VectorBuffer(VectorBufferType::LIST_BUFFER), child(std::move(vector)), capacity(initial_capacity) {
138762}
unique_ptr< Vector > child
child vectors used for nested data
Definition duckdb.hpp:10255

◆ VectorListBuffer() [2/2]

duckdb::VectorListBuffer::VectorListBuffer ( const LogicalType & list_type,
idx_t initial_capacity = STANDARD_VECTOR_SIZE )
explicit
138765 : VectorBuffer(VectorBufferType::LIST_BUFFER),
138766 child(make_uniq<Vector>(ListType::GetChildType(list_type), initial_capacity)), capacity(initial_capacity) {
138767}

◆ ~VectorListBuffer()

duckdb::VectorListBuffer::~VectorListBuffer ( )
override
138812 {
138813}

Member Function Documentation

◆ GetChild()

Vector & duckdb::VectorListBuffer::GetChild ( )
inline
10232 {
10233 return *child;
10234 }

◆ Reserve()

void duckdb::VectorListBuffer::Reserve ( idx_t to_reserve)
138769 {
138770 if (to_reserve > capacity) {
138771 if (to_reserve > DConstants::MAX_VECTOR_SIZE) {
138772 // overflow: throw an exception
138773 throw OutOfRangeException("Cannot resize vector to %d rows: maximum allowed vector size is %s", to_reserve,
138775 }
138776 idx_t new_capacity = NextPowerOfTwo(to_reserve);
138777 D_ASSERT(new_capacity >= to_reserve);
138778 child->Resize(capacity, new_capacity);
138779 capacity = new_capacity;
138780 }
138781}
static DUCKDB_API string BytesToHumanReadableString(idx_t bytes, idx_t multiplier=1024)
Return a string that formats the give number of bytes.
Definition duckdb.cpp:109517
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
static constexpr const idx_t MAX_VECTOR_SIZE
The total maximum vector size (128GB).
Definition duckdb.hpp:1119

◆ Append() [1/2]

void duckdb::VectorListBuffer::Append ( const Vector & to_append,
idx_t to_append_size,
idx_t source_offset = 0 )
138783 {
138784 Reserve(size + to_append_size - source_offset);
138785 VectorOperations::Copy(to_append, *child, to_append_size, source_offset, size);
138786 size += to_append_size - source_offset;
138787}

◆ Append() [2/2]

void duckdb::VectorListBuffer::Append ( const Vector & to_append,
const SelectionVector & sel,
idx_t to_append_size,
idx_t source_offset = 0 )
138790 {
138791 Reserve(size + to_append_size - source_offset);
138792 VectorOperations::Copy(to_append, *child, sel, to_append_size, source_offset, size);
138793 size += to_append_size - source_offset;
138794}

◆ PushBack()

void duckdb::VectorListBuffer::PushBack ( const Value & insert)
138796 {
138797 while (size + 1 > capacity) {
138798 child->Resize(capacity, capacity * 2);
138799 capacity *= 2;
138800 }
138801 child->SetValue(size++, insert);
138802}

◆ GetSize()

idx_t duckdb::VectorListBuffer::GetSize ( )
inline
10242 {
10243 return size;
10244 }

◆ GetCapacity()

idx_t duckdb::VectorListBuffer::GetCapacity ( )
inline
10246 {
10247 return capacity;
10248 }

◆ SetCapacity()

void duckdb::VectorListBuffer::SetCapacity ( idx_t new_capacity)
138804 {
138805 this->capacity = new_capacity;
138806}

◆ SetSize()

void duckdb::VectorListBuffer::SetSize ( idx_t new_size)
138808 {
138809 this->size = new_size;
138810}

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