OmniSciDB
a5dc49c757
|
#include <TargetExprBuilder.h>
Public Member Functions | |
TargetExprCodegen (const Analyzer::Expr *target_expr, TargetInfo &target_info, const int32_t base_slot_index, const size_t target_idx, const bool is_group_by) | |
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, DiamondCodegen *sample_cfg=nullptr) const |
void | codegenAggregate (GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::vector< llvm::Value * > &target_lvs, 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, int32_t slot_index) const |
Public Attributes | |
const Analyzer::Expr * | target_expr |
TargetInfo | target_info |
int32_t | base_slot_index |
size_t | target_idx |
bool | is_group_by |
Friends | |
std::ostream & | operator<< (std::ostream &os, const TargetExprCodegen &target_expr_codegen) |
Definition at line 33 of file TargetExprBuilder.h.
|
inline |
Definition at line 34 of file TargetExprBuilder.h.
void TargetExprCodegen::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, | ||
DiamondCodegen * | sample_cfg = nullptr |
||
) | const |
Definition at line 116 of file TargetExprBuilder.cpp.
References agg_arg(), anonymous_namespace{TargetExprBuilder.cpp}::agg_fn_base_names(), AUTOMATIC_IR_METADATA, base_slot_index, shared::bit_cast(), CHECK, CHECK_EQ, CHECK_GE, GroupByAndAggregate::codegenAggArg(), codegenAggregate(), GroupByAndAggregate::codegenWindowRowPointer(), CompilationOptions::device_type, QueryMemoryDescriptor::didOutputColumnar(), GroupByAndAggregate::emitCall(), g_bigint_count, get_int_type(), SQLTypeInfo::get_physical_coord_cols(), QueryMemoryDescriptor::getColOffInBytes(), QueryMemoryDescriptor::getColOnlyOffInBytes(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), GPU, TargetInfo::is_agg, SQLTypeInfo::is_geometry(), is_group_by, anonymous_namespace{TargetExprBuilder.cpp}::is_simple_count(), anonymous_namespace{TargetExprBuilder.cpp}::is_varlen_projection(), GpuSharedMemoryContext::isSharedMemoryUsed(), LL_BUILDER, LL_CONTEXT, LL_INT, LLVM_ALIGN, WindowProjectNodeContext::resetWindowFunctionContext(), TargetInfo::sql_type, target_expr, anonymous_namespace{TargetExprBuilder.cpp}::target_has_geo(), target_idx, target_info, QueryMemoryDescriptor::threadsShareMemory(), SQLTypeInfo::usesFlatBuffer(), and window_function_is_aggregate().
void TargetExprCodegen::codegenAggregate | ( | GroupByAndAggregate * | group_by_and_agg, |
Executor * | executor, | ||
const QueryMemoryDescriptor & | query_mem_desc, | ||
const CompilationOptions & | co, | ||
const std::vector< llvm::Value * > & | target_lvs, | ||
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, | ||
int32_t | slot_index | ||
) | const |
Definition at line 317 of file TargetExprBuilder.cpp.
References agg_arg(), TargetInfo::agg_arg_type, anonymous_namespace{TargetExprBuilder.cpp}::agg_fn_base_names(), TargetInfo::agg_kind, AUTOMATIC_IR_METADATA, CHECK, CHECK_EQ, CHECK_GE, CHECK_LT, GroupByAndAggregate::checkErrorCode(), CodeGenerator::codegen(), GroupByAndAggregate::codegenAggColumnPtr(), GroupByAndAggregate::codegenApproxQuantile(), GroupByAndAggregate::codegenCountDistinct(), GroupByAndAggregate::codegenMode(), DiamondCodegen::cond_false_, DiamondCodegen::cond_true_, GroupByAndAggregate::convertNullIfAny(), CompilationOptions::device_type, QueryMemoryDescriptor::didOutputColumnar(), GroupByAndAggregate::emitCall(), get_arg_by_name(), get_compact_type(), SQLTypeInfo::get_compression(), get_int_type(), SQLTypeInfo::get_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), QueryMemoryDescriptor::getColOnlyOffInBytes(), QueryMemoryDescriptor::getLogicalSlotWidthBytes(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), GPU, is_agg_domain_range_equivalent(), TargetInfo::is_distinct, is_distinct_target(), is_group_by, anonymous_namespace{TargetExprBuilder.cpp}::is_simple_count(), anonymous_namespace{TargetExprBuilder.cpp}::is_varlen_projection(), QueryMemoryDescriptor::isLogicalSizedColumnsAllowed(), kAPPROX_QUANTILE, kAVG, kDOUBLE, kENCODING_GEOINT, kFLOAT, kMODE, kNULLT, kPOINT, kSINGLE_VALUE, kSUM_IF, LL_BUILDER, LL_CONTEXT, LL_INT, GroupByAndAggregate::needsUnnestDoublePatch(), numeric_type_name(), patch_agg_fname(), CodeGenerator::posArg(), ROW_FUNC, TargetInfo::skip_null_val, TargetInfo::sql_type, takes_float_argument(), target_expr, anonymous_namespace{TargetExprBuilder.cpp}::target_has_geo(), target_idx, target_info, QueryMemoryDescriptor::threadsShareMemory(), to_string(), QueryMemoryDescriptor::varlenOutputBufferElemSize(), QueryMemoryDescriptor::varlenOutputRowSizeToSlot(), and window_function_requires_peer_handling().
Referenced by codegen().
|
friend |
Definition at line 993 of file TargetExprBuilder.cpp.
int32_t TargetExprCodegen::base_slot_index |
Definition at line 76 of file TargetExprBuilder.h.
Referenced by codegen(), and operator<<().
bool TargetExprCodegen::is_group_by |
Definition at line 78 of file TargetExprBuilder.h.
Referenced by codegen(), codegenAggregate(), TargetExprCodegenBuilder::codegenMultiSlotSampleExpressions(), anonymous_namespace{TargetExprBuilder.cpp}::get_initial_agg_val(), TargetExprCodegenBuilder::operator()(), and operator<<().
const Analyzer::Expr* TargetExprCodegen::target_expr |
Definition at line 73 of file TargetExprBuilder.h.
Referenced by codegen(), codegenAggregate(), and operator<<().
size_t TargetExprCodegen::target_idx |
Definition at line 77 of file TargetExprBuilder.h.
Referenced by codegen(), codegenAggregate(), and operator<<().
TargetInfo TargetExprCodegen::target_info |
Definition at line 74 of file TargetExprBuilder.h.
Referenced by codegen(), codegenAggregate(), TargetExprCodegenBuilder::operator()(), and operator<<().