OmniSciDB
a5dc49c757
|
#include <TargetExprBuilder.h>
Public Member Functions | |
TargetExprCodegenBuilder (const RelAlgExecutionUnit &ra_exe_unit, const bool is_group_by) | |
void | operator() (const Analyzer::Expr *target_expr, const Executor *executor, QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co) |
void | codegen (GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const GpuSharedMemoryContext &gpu_smem_context, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, llvm::Value *varlen_output_buffer, DiamondCodegen &diamond_codegen) const |
void | codegenSampleExpressions (GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, DiamondCodegen &diamond_codegen) const |
void | codegenSingleSlotSampleExpression (GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, DiamondCodegen &diamond_codegen) const |
void | codegenMultiSlotSampleExpressions (GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, DiamondCodegen &diamond_codegen) const |
llvm::Value * | codegenSlotEmptyKey (llvm::Value *agg_col_ptr, std::vector< llvm::Value * > &target_lvs, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const int64_t init_val) const |
Public Attributes | |
size_t | target_index_counter {0} |
size_t | slot_index_counter {0} |
const RelAlgExecutionUnit & | ra_exe_unit |
std::vector< TargetExprCodegen > | target_exprs_to_codegen |
std::vector< TargetExprCodegen > | sample_exprs_to_codegen |
bool | is_group_by |
Definition at line 81 of file TargetExprBuilder.h.
|
inline |
Definition at line 82 of file TargetExprBuilder.h.
void TargetExprCodegenBuilder::codegen | ( | GroupByAndAggregate * | group_by_and_agg, |
Executor * | executor, | ||
const QueryMemoryDescriptor & | query_mem_desc, | ||
const CompilationOptions & | co, | ||
const GpuSharedMemoryContext & | gpu_smem_context, | ||
const std::tuple< llvm::Value *, llvm::Value * > & | agg_out_ptr_w_idx, | ||
const std::vector< llvm::Value * > & | agg_out_vec, | ||
llvm::Value * | output_buffer_byte_stream, | ||
llvm::Value * | out_row_idx, | ||
llvm::Value * | varlen_output_buffer, | ||
DiamondCodegen & | diamond_codegen | ||
) | const |
Definition at line 744 of file TargetExprBuilder.cpp.
References AUTOMATIC_IR_METADATA, and CHECK.
Referenced by GroupByAndAggregate::codegenAggCalls().
void TargetExprCodegenBuilder::codegenMultiSlotSampleExpressions | ( | GroupByAndAggregate * | group_by_and_agg, |
Executor * | executor, | ||
const QueryMemoryDescriptor & | query_mem_desc, | ||
const CompilationOptions & | co, | ||
const std::tuple< llvm::Value *, llvm::Value * > & | agg_out_ptr_w_idx, | ||
const std::vector< llvm::Value * > & | agg_out_vec, | ||
llvm::Value * | output_buffer_byte_stream, | ||
llvm::Value * | out_row_idx, | ||
DiamondCodegen & | diamond_codegen | ||
) | const |
Definition at line 857 of file TargetExprBuilder.cpp.
References AUTOMATIC_IR_METADATA, CHECK, CHECK_GE, CHECK_LT, GroupByAndAggregate::codegenAggArg(), GroupByAndAggregate::codegenAggColumnPtr(), CompilationOptions::device_type, anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), GPU, TargetExprCodegen::is_group_by, and QueryMemoryDescriptor::isLogicalSizedColumnsAllowed().
void TargetExprCodegenBuilder::codegenSampleExpressions | ( | GroupByAndAggregate * | group_by_and_agg, |
Executor * | executor, | ||
const QueryMemoryDescriptor & | query_mem_desc, | ||
const CompilationOptions & | co, | ||
const std::tuple< llvm::Value *, llvm::Value * > & | agg_out_ptr_w_idx, | ||
const std::vector< llvm::Value * > & | agg_out_vec, | ||
llvm::Value * | output_buffer_byte_stream, | ||
llvm::Value * | out_row_idx, | ||
DiamondCodegen & | diamond_codegen | ||
) | const |
Definition at line 792 of file TargetExprBuilder.cpp.
References AUTOMATIC_IR_METADATA, CHECK, CompilationOptions::device_type, and GPU.
void TargetExprCodegenBuilder::codegenSingleSlotSampleExpression | ( | GroupByAndAggregate * | group_by_and_agg, |
Executor * | executor, | ||
const QueryMemoryDescriptor & | query_mem_desc, | ||
const CompilationOptions & | co, | ||
const std::tuple< llvm::Value *, llvm::Value * > & | agg_out_ptr_w_idx, | ||
const std::vector< llvm::Value * > & | agg_out_vec, | ||
llvm::Value * | output_buffer_byte_stream, | ||
llvm::Value * | out_row_idx, | ||
DiamondCodegen & | diamond_codegen | ||
) | const |
Definition at line 829 of file TargetExprBuilder.cpp.
References AUTOMATIC_IR_METADATA, CHECK, CHECK_EQ, CompilationOptions::device_type, and GPU.
llvm::Value * TargetExprCodegenBuilder::codegenSlotEmptyKey | ( | llvm::Value * | agg_col_ptr, |
std::vector< llvm::Value * > & | target_lvs, | ||
Executor * | executor, | ||
const QueryMemoryDescriptor & | query_mem_desc, | ||
const int64_t | init_val | ||
) | const |
Definition at line 920 of file TargetExprBuilder.cpp.
References AUTOMATIC_IR_METADATA, CHECK_EQ, get_int_type(), QueryMemoryDescriptor::isLogicalSizedColumnsAllowed(), LL_BUILDER, LL_CONTEXT, LL_INT, and UNREACHABLE.
void TargetExprCodegenBuilder::operator() | ( | const Analyzer::Expr * | target_expr, |
const Executor * | executor, | ||
QueryMemoryDescriptor & | query_mem_desc, | ||
const CompilationOptions & | co | ||
) |
Definition at line 652 of file TargetExprBuilder.cpp.
References agg_arg(), anonymous_namespace{TargetExprBuilder.cpp}::agg_fn_base_names(), TargetInfo::agg_kind, AUTOMATIC_IR_METADATA, CHECK, CHECK_EQ, constrained_not_null(), CompilationOptions::device_type, g_bigint_count, get_target_info(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), QueryMemoryDescriptor::getQueryDescriptionType(), GPU, TargetInfo::is_agg, anonymous_namespace{TargetExprBuilder.cpp}::is_columnar_projection(), TargetExprCodegen::is_group_by, anonymous_namespace{TargetExprBuilder.cpp}::is_varlen_projection(), kAPPROX_QUANTILE, kSAMPLE, kSINGLE_VALUE, kUNNEST, heavyai::NonGroupedAggregate, QueryMemoryDescriptor::setPaddedSlotWidthBytes(), TargetInfo::skip_null_val, TargetInfo::sql_type, TargetExprCodegen::target_info, to_string(), and VLOG.
bool TargetExprCodegenBuilder::is_group_by |
Definition at line 149 of file TargetExprBuilder.h.
const RelAlgExecutionUnit& TargetExprCodegenBuilder::ra_exe_unit |
Definition at line 144 of file TargetExprBuilder.h.
std::vector<TargetExprCodegen> TargetExprCodegenBuilder::sample_exprs_to_codegen |
Definition at line 147 of file TargetExprBuilder.h.
size_t TargetExprCodegenBuilder::slot_index_counter {0} |
Definition at line 142 of file TargetExprBuilder.h.
std::vector<TargetExprCodegen> TargetExprCodegenBuilder::target_exprs_to_codegen |
Definition at line 146 of file TargetExprBuilder.h.
size_t TargetExprCodegenBuilder::target_index_counter {0} |
Definition at line 141 of file TargetExprBuilder.h.