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::ChimpGroupState< CHIMP_TYPE > Struct Template Reference
Collaboration diagram for duckdb::ChimpGroupState< CHIMP_TYPE >:

Public Member Functions

void Init (uint8_t *data)
void Reset ()
bool Started () const
idx_t RemainingInGroup () const
void Scan (CHIMP_TYPE *dest, idx_t count)
void LoadFlags (uint8_t *packed_data, idx_t group_size)
void LoadLeadingZeros (uint8_t *packed_data, idx_t leading_zero_block_size)
idx_t CalculatePackedDataCount () const
void LoadPackedData (uint16_t *packed_data, idx_t packed_data_block_count)
void LoadValues (CHIMP_TYPE *result, idx_t count)

Public Attributes

uint32_t leading_zero_index
uint32_t unpacked_index
ChimpConstants::Flags flags [ChimpPrimitives::CHIMP_SEQUENCE_SIZE+1]
uint8_t leading_zeros [ChimpPrimitives::CHIMP_SEQUENCE_SIZE+1]
UnpackedData unpacked_data_blocks [ChimpPrimitives::CHIMP_SEQUENCE_SIZE]
CHIMP_TYPE values [ChimpPrimitives::CHIMP_SEQUENCE_SIZE]

Private Attributes

idx_t index
idx_t max_leading_zeros_to_read
idx_t max_flags_to_read
idx_t max_packed_data_to_read
Chimp128DecompressionState< CHIMP_TYPE > chimp_state

Member Function Documentation

◆ Init()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::Init ( uint8_t * data)
inline
397452 {
397453 chimp_state.input.SetStream(data);
397454 Reset();
397455 }
Definition duckdb.cpp:397450

◆ Reset()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::Reset ( )
inline
397457 {
397458 chimp_state.Reset();
397459 index = 0;
397460 }

◆ Started()

template<class CHIMP_TYPE>
bool duckdb::ChimpGroupState< CHIMP_TYPE >::Started ( ) const
inline
397462 {
397463 return !!index;
397464 }

◆ RemainingInGroup()

template<class CHIMP_TYPE>
idx_t duckdb::ChimpGroupState< CHIMP_TYPE >::RemainingInGroup ( ) const
inline
397467 {
397469 }

◆ Scan()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::Scan ( CHIMP_TYPE * dest,
idx_t count )
inline
397471 {
397472 memcpy(dest, (void *)(values + index), count * sizeof(CHIMP_TYPE));
397473 index += count;
397474 }

◆ LoadFlags()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::LoadFlags ( uint8_t * packed_data,
idx_t group_size )
inline
397476 {
397478 flag_buffer.SetBuffer(packed_data);
397479 flags[0] = ChimpConstants::Flags::VALUE_IDENTICAL; // First value doesn't require a flag
397480 for (idx_t i = 0; i < group_size; i++) {
397481 flags[1 + i] = (ChimpConstants::Flags)flag_buffer.Extract();
397482 }
397483 max_flags_to_read = group_size;
397484 index = 0;
397485 }

◆ LoadLeadingZeros()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::LoadLeadingZeros ( uint8_t * packed_data,
idx_t leading_zero_block_size )
inline
397487 {
397488#ifdef DEBUG
397489 idx_t flag_one_count = 0;
397490 for (idx_t i = 0; i < max_flags_to_read; i++) {
397492 }
397493 // There are 8 leading zero values packed in one block, the block could be partially filled
397496#endif
397498 leading_zero_buffer.SetBuffer(packed_data);
397499 for (idx_t i = 0; i < leading_zero_block_size; i++) {
397501 }
397502 max_leading_zeros_to_read = leading_zero_block_size;
397503 leading_zero_index = 0;
397504 }
static T AlignValue(T n)
Align value (ceiling) (not for pointer types).
Definition duckdb.hpp:2126

◆ CalculatePackedDataCount()

template<class CHIMP_TYPE>
idx_t duckdb::ChimpGroupState< CHIMP_TYPE >::CalculatePackedDataCount ( ) const
inline
397506 {
397507 idx_t count = 0;
397508 for (idx_t i = 0; i < max_flags_to_read; i++) {
397510 }
397511 return count;
397512 }

◆ LoadPackedData()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::LoadPackedData ( uint16_t * packed_data,
idx_t packed_data_block_count )
inline
397514 {
397515 for (idx_t i = 0; i < packed_data_block_count; i++) {
397516 PackedDataUtils<CHIMP_TYPE>::Unpack(packed_data[i], unpacked_data_blocks[i]);
397517 if (unpacked_data_blocks[i].significant_bits == 0) {
397518 unpacked_data_blocks[i].significant_bits = 64;
397519 }
397520 unpacked_data_blocks[i].leading_zero =
397521 ChimpConstants::Decompression::LEADING_REPRESENTATION[unpacked_data_blocks[i].leading_zero];
397522 }
397523 unpacked_index = 0;
397524 max_packed_data_to_read = packed_data_block_count;
397525 }

◆ LoadValues()

template<class CHIMP_TYPE>
void duckdb::ChimpGroupState< CHIMP_TYPE >::LoadValues ( CHIMP_TYPE * result,
idx_t count )
inline
397527 {
397528 for (idx_t i = 0; i < count; i++) {
397529 result[i] = Chimp128Decompression<CHIMP_TYPE>::Load(flags[i], leading_zeros, leading_zero_index,
397530 unpacked_data_blocks, unpacked_index, chimp_state);
397531 }
397532 }

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