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::ComputePartitionIndicesFunctor Struct Reference

Static Public Member Functions

template<idx_t radix_bits>
static void Operation (Vector &hashes, Vector &partition_indices, const idx_t original_count, const SelectionVector &append_sel, const idx_t append_count)

Member Function Documentation

◆ Operation()

template<idx_t radix_bits>
void duckdb::ComputePartitionIndicesFunctor::Operation ( Vector & hashes,
Vector & partition_indices,
const idx_t original_count,
const SelectionVector & append_sel,
const idx_t append_count )
inlinestatic
93630 {
93631 using CONSTANTS = RadixPartitioningConstants<radix_bits>;
93632 if (!append_sel.IsSet() || hashes.GetVectorType() == VectorType::CONSTANT_VECTOR) {
93633 UnaryExecutor::Execute<hash_t, hash_t>(hashes, partition_indices, append_count,
93634 [&](hash_t hash) { return CONSTANTS::ApplyMask(hash); });
93635 } else {
93636 partition_indices.SetVectorType(VectorType::FLAT_VECTOR);
93637 // We could just slice the "hashes" vector and use the UnaryExecutor
93638 // But slicing a dictionary vector causes SelectionData to be allocated
93639 // Instead, we just directly compute the partition indices using the selection vectors
93640 UnifiedVectorFormat format;
93641 hashes.ToUnifiedFormat(original_count, format);
93642 const auto source_data = UnifiedVectorFormat::GetData<hash_t>(format);
93643 const auto &source_sel = *format.sel;
93644
93645 partition_indices.SetVectorType(VectorType::FLAT_VECTOR);
93646 const auto target = FlatVector::GetData<hash_t>(partition_indices);
93647
93648 if (source_sel.IsSet()) {
93649 for (idx_t i = 0; i < append_count; i++) {
93650 const auto source_idx = source_sel.get_index(append_sel[i]);
93651 target[i] = CONSTANTS::ApplyMask(source_data[source_idx]);
93652 }
93653 } else {
93654 for (idx_t i = 0; i < append_count; i++) {
93655 const auto source_idx = append_sel[i];
93656 target[i] = CONSTANTS::ApplyMask(source_data[source_idx]);
93657 }
93658 }
93659 }
93660 }
std::basic_string< Char > format(const S &format_str, Args &&... args)
Definition duckdb.cpp:16295
uint64_t hash_t
The type used for hashes.
Definition duckdb.hpp:243
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

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