26 #include <llvm/ExecutionEngine/ExecutionEngine.h>
27 #include <llvm/IR/Module.h>
28 #include <llvm/IR/Value.h>
33 using FuncPtr = int32_t (*)(int8_t* this_buff,
34 const int8_t* that_buff,
35 const int32_t start_entry_index,
36 const int32_t end_entry_index,
37 const int32_t that_entry_count,
40 const void* serialized_varlen_buffer);
55 const std::vector<TargetInfo>& targets,
56 const std::vector<int64_t>& target_init_vals,
57 const size_t executor_id);
83 Value* this_targets_start_ptr,
84 Value* that_targets_start_ptr)
const;
98 const size_t target_logical_idx,
99 const size_t target_slot_idx,
100 const size_t init_agg_val_idx,
101 const size_t first_slot_idx_for_target,
102 Function* ir_reduce_one_entry)
const;
110 const size_t target_logical_idx,
111 const size_t target_slot_idx,
112 const int64_t init_val,
113 const int8_t chosen_bytes,
114 Function* ir_reduce_one_entry)
const;
119 const size_t target_logical_idx,
120 Function* ir_reduce_one_entry)
const;
124 const size_t target_logical_idx,
125 Function* ir_reduce_one_entry)
const;
129 const size_t target_logical_idx,
130 Function* ir_reduce_one_entry)
const;
133 const llvm::Function* ir_is_empty,
134 const llvm::Function* ir_reduce_one_entry,
135 const llvm::Function* ir_reduce_one_entry_idx,
153 const std::vector<TargetInfo>& targets,
154 const std::vector<int64_t>& target_init_vals,
155 const size_t executor_id)
void reduceOneSlot(Value *this_ptr1, Value *this_ptr2, Value *that_ptr1, Value *that_ptr2, const TargetInfo &target_info, const size_t target_logical_idx, const size_t target_slot_idx, const size_t init_agg_val_idx, const size_t first_slot_idx_for_target, Function *ir_reduce_one_entry) const
void reduceOneEntryNoCollisions(const ReductionCode &reduction_code) const
std::unique_ptr< Function > ir_reduce_loop
void reduceOneEntryBaselineIdx(const ReductionCode &reduction_code) const
void reduceLoop(const ReductionCode &reduction_code) const
llvm::Function * llvm_reduce_loop
void reduceOneEntryNoCollisionsIdx(const ReductionCode &reduction_code) const
bool hasKeylessHash() const
std::vector< std::string > CodeCacheKey
std::string cacheKey() const
std::unique_ptr< Function > ir_reduce_one_entry
const std::vector< int64_t > target_init_vals_
void reduceOneAggregateSlot(Value *this_ptr1, Value *this_ptr2, Value *that_ptr1, Value *that_ptr2, const TargetInfo &target_info, const size_t target_logical_idx, const size_t target_slot_idx, const int64_t init_val, const int8_t chosen_bytes, Function *ir_reduce_one_entry) const
const QueryMemoryDescriptor & query_mem_desc_
int32_t(*)(int8_t *this_buff, const int8_t *that_buff, const int32_t start_entry_index, const int32_t end_entry_index, const int32_t that_entry_count, const void *this_qmd, const void *that_qmd, const void *serialized_varlen_buffer) FuncPtr
const QueryMemoryDescriptor query_mem_desc_
std::unique_ptr< Function > ir_is_empty
virtual ~ResultSetReductionJIT()=default
void reduceOneCountDistinctSlot(Value *this_ptr1, Value *that_ptr1, const size_t target_logical_idx, Function *ir_reduce_one_entry) const
GpuReductionHelperJIT(const QueryMemoryDescriptor &query_mem_desc, const std::vector< TargetInfo > &targets, const std::vector< int64_t > &target_init_vals, const size_t executor_id)
ReductionCode codegen() const override
std::unique_ptr< Function > ir_reduce_one_entry_idx
void reduceOneEntryTargetsNoCollisions(Function *ir_reduce_one_entry, Value *this_targets_start_ptr, Value *that_targets_start_ptr) const
QueryDescriptionType getQueryDescriptionType() const
virtual ReductionCode codegen() const
void finalizeReductionCode(ReductionCode &reduction_code, const llvm::Function *ir_is_empty, const llvm::Function *ir_reduce_one_entry, const llvm::Function *ir_reduce_one_entry_idx, const CodeCacheKey &key) const
Descriptor for the result set buffer layout.
bool didOutputColumnar() const
void isEmpty(const ReductionCode &reduction_code) const
void reduceOneEntryBaseline(const ReductionCode &reduction_code) const
ResultSetReductionJIT(const QueryMemoryDescriptor &query_mem_desc, const std::vector< TargetInfo > &targets, const std::vector< int64_t > &target_init_vals, const size_t executor_id)
void reduceOneApproxQuantileSlot(Value *this_ptr1, Value *that_ptr1, const size_t target_logical_idx, Function *ir_reduce_one_entry) const
void reduceOneModeSlot(Value *this_ptr1, Value *that_ptr1, const size_t target_logical_idx, Function *ir_reduce_one_entry) const
const std::vector< TargetInfo > targets_