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::Chimp128Decompression< CHIMP_TYPE > Struct Template Reference

Public Types

using DecompressState = Chimp128DecompressionState<CHIMP_TYPE>

Static Public Member Functions

static void UnpackPackedData (uint16_t packed_data, UnpackedData &dest)
static CHIMP_TYPE Load (ChimpConstants::Flags flag, uint8_t leading_zeros[], uint32_t &leading_zero_index, UnpackedData unpacked_data[], uint32_t &unpacked_index, DecompressState &state)
static CHIMP_TYPE LoadFirst (DecompressState &state)
static CHIMP_TYPE DecompressValue (ChimpConstants::Flags flag, uint8_t leading_zeros[], uint32_t &leading_zero_index, UnpackedData unpacked_data[], uint32_t &unpacked_index, DecompressState &state)

Static Public Attributes

static constexpr uint8_t INDEX_BITS_SIZE = 7
static constexpr uint8_t BIT_SIZE = sizeof(CHIMP_TYPE) * 8

Member Function Documentation

◆ UnpackPackedData()

template<class CHIMP_TYPE>
void duckdb::Chimp128Decompression< CHIMP_TYPE >::UnpackPackedData ( uint16_t packed_data,
UnpackedData & dest )
inlinestatic
397216 {
397218 }
Definition duckdb.cpp:397209

◆ Load()

template<class CHIMP_TYPE>
CHIMP_TYPE duckdb::Chimp128Decompression< CHIMP_TYPE >::Load ( ChimpConstants::Flags flag,
uint8_t leading_zeros[],
uint32_t & leading_zero_index,
UnpackedData unpacked_data[],
uint32_t & unpacked_index,
DecompressState & state )
inlinestatic
397221 {
397222 if (DUCKDB_UNLIKELY(state.first)) {
397223 return LoadFirst(state);
397224 } else {
397226 }
397227 }
static CHIMP_TYPE DecompressValue(ChimpConstants::Flags flag, uint8_t leading_zeros[], uint32_t &leading_zero_index, UnpackedData unpacked_data[], uint32_t &unpacked_index, DecompressState &state)
Definition duckdb.cpp:397237

◆ LoadFirst()

template<class CHIMP_TYPE>
CHIMP_TYPE duckdb::Chimp128Decompression< CHIMP_TYPE >::LoadFirst ( DecompressState & state)
inlinestatic
397229 {
397231 state.ring_buffer.template InsertScan<true>(result);
397232 state.first = false;
397233 state.reference_value = result;
397234 return result;
397235 }

◆ DecompressValue()

template<class CHIMP_TYPE>
CHIMP_TYPE duckdb::Chimp128Decompression< CHIMP_TYPE >::DecompressValue ( ChimpConstants::Flags flag,
uint8_t leading_zeros[],
uint32_t & leading_zero_index,
UnpackedData unpacked_data[],
uint32_t & unpacked_index,
DecompressState & state )
inlinestatic

Value is identical to previous value

397239 {
397241 switch (flag) {
397244 auto index = state.input.template ReadValue<uint8_t, 7>();
397245 result = UnsafeNumericCast<CHIMP_TYPE>(state.ring_buffer.Value(index));
397246 break;
397247 }
397250 state.leading_zeros = unpacked.leading_zero;
397251 state.trailing_zeros = BIT_SIZE - unpacked.significant_bits - state.leading_zeros;
397252 result = state.input.template ReadValue<CHIMP_TYPE>(unpacked.significant_bits);
397253 result <<= state.trailing_zeros;
397254 result ^= state.ring_buffer.Value(unpacked.index);
397255 break;
397256 }
397258 result = state.input.template ReadValue<CHIMP_TYPE>(BIT_SIZE - state.leading_zeros);
397259 result ^= state.reference_value;
397260 break;
397261 }
397263 state.leading_zeros = leading_zeros[leading_zero_index++];
397264 D_ASSERT(state.leading_zeros <= BIT_SIZE);
397265 result = state.input.template ReadValue<CHIMP_TYPE>(BIT_SIZE - state.leading_zeros);
397266 result ^= state.reference_value;
397267 break;
397268 }
397269 default:
397270 throw InternalException("Chimp compression flag with value %d not recognized", flag);
397271 }
397272 state.reference_value = result;
397273 state.ring_buffer.InsertScan(result);
397274 return result;
397275 }

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