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::RoaringStateAppender< STATE_TYPE > Struct Template Reference

Static Public Member Functions

static void AppendBytes (STATE_TYPE &state, validity_t entry, idx_t bits)
static void AppendVector (STATE_TYPE &state, Vector &input, idx_t input_size)

Member Function Documentation

◆ AppendBytes()

template<class STATE_TYPE>
void duckdb::roaring::RoaringStateAppender< STATE_TYPE >::AppendBytes ( STATE_TYPE & state,
validity_t entry,
idx_t bits )
inlinestatic
403817 {
403819
403820 idx_t full_bytes = bits / 8;
403821 idx_t last_bits = bits % 8;
403822 for (idx_t i = 0; i < full_bytes; i++) {
403823 // Create a mask for the byte we care about (least to most significant byte)
403824 auto bitmask = ValidityUncompressed::UPPER_MASKS[8] >> ((7 - i) * 8);
403825 // Shift to the least significant bits so we can use it to index our bitmask table
403826 auto array_index = static_cast<uint8_t>((entry & bitmask) >> (i * 8));
403828 }
403829
403830 if (DUCKDB_UNLIKELY(last_bits != 0)) {
403831 auto bitmask = ValidityUncompressed::UPPER_MASKS[8] >> ((7 - full_bytes) * 8);
403832 auto array_index = static_cast<uint8_t>((entry & bitmask) >> (full_bytes * 8));
403834 }
403835 }
Definition duckdb.cpp:403812

◆ AppendVector()

template<class STATE_TYPE>
void duckdb::roaring::RoaringStateAppender< STATE_TYPE >::AppendVector ( STATE_TYPE & state,
Vector & input,
idx_t input_size )
inlinestatic
403837 {
403839 input.ToUnifiedFormat(input_size, unified);
403840 auto &validity = unified.validity;
403841
403842 if (validity.AllValid()) {
403843 // All bits are set implicitly
403844 idx_t appended = 0;
403845 while (appended < input_size) {
403846 idx_t to_append =
403851 }
403852 appended += to_append;
403853 }
403854 } else {
403855 // There is a validity mask
403856 idx_t appended = 0;
403857 while (appended < input_size) {
403858 idx_t to_append =
403860
403861 // Deal with a ragged start, when 'appended' isn't a multiple of ValidityMask::BITS_PER_VALUE
403862 // then we need to process the remainder of the entry
403866 auto validity_entry = validity.GetValidityEntry(entry_offset);
403867
403870 if (to_append < to_process) {
403871 // Limit the amount of bits to set
403872 auto left_bits = to_process - to_append;
403875 } else {
403877 }
403878
403881 // All bits are set
403883 } else if (masked_entry == 0) {
403884 // None of the bits are set
403886 } else {
403887 // Mixed set/unset bits
403888 AppendBytes(state, masked_entry, to_process);
403889 }
403890
403892 appended += to_process;
403893 entry_offset++;
403894 }
403895
403898 // get the validity entry at this index
403899 auto validity_entry = validity.GetValidityEntry(entry_offset + entry_index);
403901 // All bits are set
403904 // None of the bits are set
403906 } else {
403907 // Mixed set/unset bits
403909 }
403910 }
403911
403912 // Deal with a ragged end, when the validity entry isn't entirely used
403914 if (DUCKDB_UNLIKELY(remainder != 0)) {
403915 auto validity_entry = validity.GetValidityEntry(entry_offset + entry_count);
403918 // All bits are set
403920 } else if (masked == 0) {
403921 // None of the bits are set
403923 } else {
403924 AppendBytes(state, validity_entry, remainder);
403925 }
403926 }
403927
403930 }
403931 appended += to_append;
403932 }
403933 }
403934 }

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