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::roaring::ArrayContainerScanState< INVERTED > Struct Template Reference

ARRAY Container. More...

Inheritance diagram for duckdb::roaring::ArrayContainerScanState< INVERTED >:
Collaboration diagram for duckdb::roaring::ArrayContainerScanState< INVERTED >:

Public Member Functions

 ArrayContainerScanState (idx_t container_index, idx_t container_size, idx_t count, data_ptr_t data_p)
virtual void LoadNextValue ()
void ScanPartial (Vector &result, idx_t result_offset, idx_t to_scan) override
void Skip (idx_t to_skip) override
void Verify () const override
Public Member Functions inherited from duckdb::roaring::ContainerScanState
 ContainerScanState (idx_t container_index_p, idx_t container_size)

Protected Attributes

uint16_t value
data_ptr_t data
bool finished = false
const idx_t count
idx_t array_index = 0

Additional Inherited Members

Public Attributes inherited from duckdb::roaring::ContainerScanState
idx_t container_index
 The index of the container.
idx_t container_size
 The size of the container (how many values does it hold).
idx_t scanned_count = 0
 How much of the container is already consumed.

Detailed Description

template<bool INVERTED>
struct duckdb::roaring::ArrayContainerScanState< INVERTED >

ARRAY Container.

Constructor & Destructor Documentation

◆ ArrayContainerScanState()

template<bool INVERTED>
duckdb::roaring::ArrayContainerScanState< INVERTED >::ArrayContainerScanState ( idx_t container_index,
idx_t container_size,
idx_t count,
data_ptr_t data_p )
inline
403563 : ContainerScanState(container_index, container_size), data(data_p), count(count) {
403564 }
ARRAY Container.
Definition duckdb.cpp:403560
idx_t container_index
The index of the container.
Definition duckdb.cpp:403494
idx_t container_size
The size of the container (how many values does it hold).
Definition duckdb.cpp:403496

Member Function Documentation

◆ LoadNextValue()

template<bool INVERTED>
virtual void duckdb::roaring::ArrayContainerScanState< INVERTED >::LoadNextValue ( )
inlinevirtual
403567 {
403568 if (array_index >= count) {
403569 finished = true;
403570 return;
403571 }
403572 value = reinterpret_cast<uint16_t *>(data)[array_index];
403573 array_index++;
403574 }

◆ ScanPartial()

template<bool INVERTED>
void duckdb::roaring::ArrayContainerScanState< INVERTED >::ScanPartial ( Vector & result,
idx_t result_offset,
idx_t to_scan )
inlineoverridevirtual

Implements duckdb::roaring::ContainerScanState.

403577 {
403579
403580 // This method assumes that the validity mask starts off as having all bits set for the entries that are being
403581 // scanned.
403582
403583 if (!INVERTED) {
403584 // If we are mapping valid entries, that means the majority of the bits are invalid
403585 // so we set everything to invalid and only flip the bits that are present in the array
403587 }
403588
403589 if (!array_index) {
403590 LoadNextValue();
403591 }
403592 // At least one of the entries to scan is set
403593 while (!finished) {
403594 if (value >= scanned_count + to_scan) {
403595 break;
403596 }
403597 if (value < scanned_count) {
403598 LoadNextValue();
403599 continue;
403600 }
403601 auto index = value - scanned_count;
403602 if (INVERTED) {
403603 result_mask.SetInvalid(result_offset + index);
403604 } else {
403605 result_mask.SetValid(result_offset + index);
403606 }
403607 LoadNextValue();
403608 }
403610 }
idx_t scanned_count
How much of the container is already consumed.
Definition duckdb.cpp:403498

◆ Skip()

template<bool INVERTED>
void duckdb::roaring::ArrayContainerScanState< INVERTED >::Skip ( idx_t to_skip)
inlineoverridevirtual

Implements duckdb::roaring::ContainerScanState.

403612 {
403614 if (!array_index) {
403615 LoadNextValue();
403616 }
403617 while (!finished && value < end) {
403618 LoadNextValue();
403619 }
403620 // In case array_index has already reached count
403621 scanned_count = end;
403622 }

◆ Verify()

template<bool INVERTED>
void duckdb::roaring::ArrayContainerScanState< INVERTED >::Verify ( ) const
inlineoverridevirtual

Implements duckdb::roaring::ContainerScanState.

403624 {
403625#ifdef DEBUG
403626 uint16_t index = 0;
403627 auto array = reinterpret_cast<uint16_t *>(data);
403628 for (uint16_t i = 0; i < count; i++) {
403629 D_ASSERT(!i || array[i] > index);
403630 index = array[i];
403631 }
403632#endif
403633 }

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