OmniSciDB
a5dc49c757
|
#include <QueryMemoryInitializer.h>
Classes | |
struct | TargetAggOpsMetadata |
Public Types | |
using | ModeIndexSet = robin_hood::unordered_set< size_t > |
using | QuantileParam = std::optional< double > |
Public Member Functions | |
QueryMemoryInitializer (const RelAlgExecutionUnit &ra_exe_unit, const QueryMemoryDescriptor &query_mem_desc, const int device_id, const ExecutorDeviceType device_type, const ExecutorDispatchMode dispatch_mode, const bool output_columnar, const bool sort_on_gpu, const shared::TableKey &outer_table_key, const int64_t num_rows, const std::vector< std::vector< const int8_t * >> &col_buffers, const std::vector< std::vector< uint64_t >> &frag_offsets, RenderAllocatorMap *render_allocator_map, RenderInfo *render_info, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, DeviceAllocator *gpu_allocator, const size_t thread_idx, const Executor *executor) | |
QueryMemoryInitializer (const TableFunctionExecutionUnit &exe_unit, const QueryMemoryDescriptor &query_mem_desc, const int device_id, const ExecutorDeviceType device_type, const int64_t num_rows, const std::vector< std::vector< const int8_t * >> &col_buffers, const std::vector< std::vector< uint64_t >> &frag_offsets, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, DeviceAllocator *device_allocator, const Executor *executor) | |
const auto | getCountDistinctBitmapDevicePtr () const |
const auto | getCountDistinctBitmapHostPtr () const |
const auto | getCountDistinctBitmapBytes () const |
const auto | getVarlenOutputHostPtr () const |
const auto | getVarlenOutputPtr () const |
ResultSet * | getResultSet (const size_t index) const |
std::unique_ptr< ResultSet > | getResultSetOwned (const size_t index) |
void | resetResultSet (const size_t index) |
int64_t | getAggInitValForIndex (const size_t index) const |
const auto | getGroupByBuffersPtr () |
const auto | getGroupByBuffersSize () const |
const auto | getNumBuffers () const |
GpuGroupByBuffers | setupTableFunctionGpuBuffers (const QueryMemoryDescriptor &query_mem_desc, const int device_id, const unsigned block_size_x, const unsigned grid_size_x, const bool zero_initialize_buffers) |
void | copyFromTableFunctionGpuBuffers (Data_Namespace::DataMgr *data_mgr, const QueryMemoryDescriptor &query_mem_desc, const size_t entry_count, const GpuGroupByBuffers &gpu_group_by_buffers, const int device_id, const unsigned block_size_x, const unsigned grid_size_x) |
void | copyGroupByBuffersFromGpu (DeviceAllocator &device_allocator, const QueryMemoryDescriptor &query_mem_desc, const size_t entry_count, const GpuGroupByBuffers &gpu_group_by_buffers, const RelAlgExecutionUnit *ra_exe_unit, const unsigned block_size_x, const unsigned grid_size_x, const int device_id, const bool prepend_index_buffer) const |
Private Member Functions | |
void | initGroupByBuffer (int64_t *buffer, const RelAlgExecutionUnit &ra_exe_unit, const QueryMemoryDescriptor &query_mem_desc, TargetAggOpsMetadata &agg_expr_metadata, const ExecutorDeviceType device_type, const bool output_columnar, const Executor *executor) |
void | initRowGroups (const QueryMemoryDescriptor &query_mem_desc, int64_t *groups_buffer, const std::vector< int64_t > &init_vals, TargetAggOpsMetadata &agg_expr_metadata, const int32_t groups_buffer_entry_count, const size_t warp_size, const Executor *executor, const RelAlgExecutionUnit &ra_exe_unit) |
void | initColumnarGroups (const QueryMemoryDescriptor &query_mem_desc, int64_t *groups_buffer, const std::vector< int64_t > &init_vals, const Executor *executor, const RelAlgExecutionUnit &ra_exe_unit) |
void | initColumnsPerRow (const QueryMemoryDescriptor &query_mem_desc, int8_t *row_ptr, const std::vector< int64_t > &init_vals, const TargetAggOpsMetadata &agg_op_metadata) |
void | allocateCountDistinctGpuMem (const QueryMemoryDescriptor &query_mem_desc) |
std::vector< int64_t > | calculateCountDistinctBufferSize (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) const |
void | allocateCountDistinctBuffers (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) |
int64_t | allocateCountDistinctBitmap (const size_t bitmap_byte_sz) |
int64_t | allocateCountDistinctSet () |
ModeIndexSet | initializeModeIndexSet (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) |
void | allocateModeBuffer (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) |
std::vector< QuantileParam > | initializeQuantileParams (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) |
void | allocateTDigestsBuffer (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) |
GpuGroupByBuffers | prepareTopNHeapsDevBuffer (const QueryMemoryDescriptor &query_mem_desc, const int8_t *init_agg_vals_dev_ptr, const size_t n, const int device_id, const unsigned block_size_x, const unsigned grid_size_x) |
GpuGroupByBuffers | createAndInitializeGroupByBufferGpu (const RelAlgExecutionUnit &ra_exe_unit, const QueryMemoryDescriptor &query_mem_desc, const int8_t *init_agg_vals_dev_ptr, const int device_id, const ExecutorDispatchMode dispatch_mode, const unsigned block_size_x, const unsigned grid_size_x, const int8_t warp_size, const bool can_sort_on_gpu, const bool output_columnar, RenderAllocator *render_allocator) |
size_t | computeNumberOfBuffers (const QueryMemoryDescriptor &query_mem_desc, const ExecutorDeviceType device_type, const Executor *executor) const |
void | compactProjectionBuffersCpu (const QueryMemoryDescriptor &query_mem_desc, const size_t projection_count) |
void | compactProjectionBuffersGpu (const QueryMemoryDescriptor &query_mem_desc, Data_Namespace::DataMgr *data_mgr, const GpuGroupByBuffers &gpu_group_by_buffers, const size_t projection_count, const int device_id) |
void | applyStreamingTopNOffsetCpu (const QueryMemoryDescriptor &query_mem_desc, const RelAlgExecutionUnit &ra_exe_unit) |
void | applyStreamingTopNOffsetGpu (Data_Namespace::DataMgr *data_mgr, const QueryMemoryDescriptor &query_mem_desc, const GpuGroupByBuffers &gpu_group_by_buffers, const RelAlgExecutionUnit &ra_exe_unit, const unsigned total_thread_count, const int device_id) |
std::shared_ptr< VarlenOutputInfo > | getVarlenOutputInfo () |
Private Attributes | |
const int64_t | num_rows_ |
std::shared_ptr < RowSetMemoryOwner > | row_set_mem_owner_ |
std::vector< std::unique_ptr < ResultSet > > | result_sets_ |
std::vector< int64_t > | init_agg_vals_ |
size_t | num_buffers_ |
std::vector< int64_t * > | group_by_buffers_ |
std::shared_ptr< VarlenOutputInfo > | varlen_output_info_ |
CUdeviceptr | varlen_output_buffer_ |
int8_t * | varlen_output_buffer_host_ptr_ |
CUdeviceptr | count_distinct_bitmap_device_mem_ptr_ |
size_t | count_distinct_bitmap_mem_size_ |
int8_t * | count_distinct_bitmap_host_crt_ptr_ |
int8_t * | count_distinct_bitmap_host_mem_ptr_ |
DeviceAllocator * | device_allocator_ {nullptr} |
std::vector < Data_Namespace::AbstractBuffer * > | temporary_buffers_ |
const size_t | thread_idx_ |
Friends | |
class | Executor |
class | QueryExecutionContext |
Definition at line 35 of file QueryMemoryInitializer.h.
using QueryMemoryInitializer::ModeIndexSet = robin_hood::unordered_set<size_t> |
Definition at line 37 of file QueryMemoryInitializer.h.
using QueryMemoryInitializer::QuantileParam = std::optional<double> |
Definition at line 38 of file QueryMemoryInitializer.h.
QueryMemoryInitializer::QueryMemoryInitializer | ( | const RelAlgExecutionUnit & | ra_exe_unit, |
const QueryMemoryDescriptor & | query_mem_desc, | ||
const int | device_id, | ||
const ExecutorDeviceType | device_type, | ||
const ExecutorDispatchMode | dispatch_mode, | ||
const bool | output_columnar, | ||
const bool | sort_on_gpu, | ||
const shared::TableKey & | outer_table_key, | ||
const int64_t | num_rows, | ||
const std::vector< std::vector< const int8_t * >> & | col_buffers, | ||
const std::vector< std::vector< uint64_t >> & | frag_offsets, | ||
RenderAllocatorMap * | render_allocator_map, | ||
RenderInfo * | render_info, | ||
std::shared_ptr< RowSetMemoryOwner > | row_set_mem_owner, | ||
DeviceAllocator * | gpu_allocator, | ||
const size_t | thread_idx, | ||
const Executor * | executor | ||
) |
Definition at line 224 of file QueryMemoryInitializer.cpp.
References gpu_enabled::accumulate(), anonymous_namespace{QueryMemoryInitializer.cpp}::alloc_group_by_buffer(), allocateCountDistinctBuffers(), allocateCountDistinctGpuMem(), allocateModeBuffer(), allocateTDigestsBuffer(), calculateCountDistinctBufferSize(), CHECK, anonymous_namespace{QueryMemoryInitializer.cpp}::check_count_distinct_expr_metadata(), CHECK_EQ, CHECK_GE, anonymous_namespace{QueryMemoryInitializer.cpp}::check_total_bitmap_memory(), anonymous_namespace{QueryMemoryInitializer.cpp}::collect_target_expr_metadata(), QueryMemoryInitializer::TargetAggOpsMetadata::count_distinct_buf_size, CPU, RelAlgExecutionUnit::estimator, ResultSet::fixupQueryMemoryDescriptor(), g_max_memory_allocation_size, anonymous_namespace{QueryMemoryInitializer.cpp}::get_col_frag_offsets(), anonymous_namespace{QueryMemoryInitializer.cpp}::get_consistent_frags_sizes(), anonymous_namespace{QueryMemoryInitializer.cpp}::get_input_idx(), QueryMemoryDescriptor::getApproxQuantileDescriptors(), QueryMemoryDescriptor::getBufferSizeBytes(), QueryMemoryDescriptor::getEntryCount(), QueryMemoryDescriptor::getRowSize(), getVarlenOutputInfo(), GPU, group_by_buffers_, QueryMemoryInitializer::TargetAggOpsMetadata::has_count_distinct, QueryMemoryInitializer::TargetAggOpsMetadata::has_mode, QueryMemoryInitializer::TargetAggOpsMetadata::has_tdigest, QueryMemoryDescriptor::hasKeylessHash(), QueryMemoryDescriptor::hasVarlenOutput(), initGroupByBuffer(), initializeModeIndexSet(), initializeQuantileParams(), QueryMemoryDescriptor::interleavedBins(), QueryMemoryDescriptor::isGroupBy(), KernelPerFragment, QueryMemoryDescriptor::lazyInitGroups(), QueryMemoryInitializer::TargetAggOpsMetadata::mode_index_set, num_buffers_, QueryMemoryInitializer::TargetAggOpsMetadata::quantile_params, result_sets_, row_set_mem_owner_, RelAlgExecutionUnit::target_exprs, target_exprs_to_infos(), RelAlgExecutionUnit::target_exprs_union, thread_idx_, QueryMemoryDescriptor::threadsCanReuseGroupByBuffers(), QueryMemoryDescriptor::threadsShareMemory(), RelAlgExecutionUnit::union_all, RelAlgExecutionUnit::use_bump_allocator, RenderInfo::useCudaBuffers(), QueryMemoryDescriptor::varlenOutputBufferElemSize(), and VLOG.
QueryMemoryInitializer::QueryMemoryInitializer | ( | const TableFunctionExecutionUnit & | exe_unit, |
const QueryMemoryDescriptor & | query_mem_desc, | ||
const int | device_id, | ||
const ExecutorDeviceType | device_type, | ||
const int64_t | num_rows, | ||
const std::vector< std::vector< const int8_t * >> & | col_buffers, | ||
const std::vector< std::vector< uint64_t >> & | frag_offsets, | ||
std::shared_ptr< RowSetMemoryOwner > | row_set_mem_owner, | ||
DeviceAllocator * | device_allocator, | ||
const Executor * | executor | ||
) |
Definition at line 466 of file QueryMemoryInitializer.cpp.
|
private |
Definition at line 912 of file QueryMemoryInitializer.cpp.
References CHECK, count_distinct_bitmap_host_crt_ptr_, count_distinct_bitmap_host_mem_ptr_, row_set_mem_owner_, and thread_idx_.
Referenced by allocateCountDistinctBuffers(), and initColumnsPerRow().
|
private |
Definition at line 890 of file QueryMemoryInitializer.cpp.
References allocateCountDistinctBitmap(), allocateCountDistinctSet(), Bitmap, CountDistinctDescriptor::bitmapPaddedSizeBytes(), CHECK, g_bigint_count, get_target_info(), QueryMemoryDescriptor::getCountDistinctDescriptor(), QueryMemoryDescriptor::getSlotIndexForSingleSlotCol(), init_agg_vals_, is_distinct_target(), RelAlgExecutionUnit::target_exprs, and UnorderedSet.
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 835 of file QueryMemoryInitializer.cpp.
References Allocator::alloc(), Bitmap, CHECK, count_distinct_bitmap_device_mem_ptr_, count_distinct_bitmap_host_crt_ptr_, count_distinct_bitmap_host_mem_ptr_, count_distinct_bitmap_mem_size_, QueryMemoryDescriptor::countDistinctDescriptorsLogicallyEmpty(), device_allocator_, QueryMemoryDescriptor::getCountDistinctDescriptor(), QueryMemoryDescriptor::getCountDistinctDescriptorsSize(), QueryMemoryDescriptor::getEntryCount(), Invalid, row_set_mem_owner_, thread_idx_, and DeviceAllocator::zeroDeviceMem().
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 925 of file QueryMemoryInitializer.cpp.
References row_set_mem_owner_.
Referenced by allocateCountDistinctBuffers(), and initColumnsPerRow().
|
private |
Definition at line 946 of file QueryMemoryInitializer.cpp.
References CHECK_LE, CHECK_LT, RelAlgExecutionUnit::eachAggTarget(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::getSlotIndexForSingleSlotCol(), init_agg_vals_, kMODE, row_set_mem_owner_, and RelAlgExecutionUnit::target_exprs.
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 981 of file QueryMemoryInitializer.cpp.
References CHECK, CHECK_EQ, CHECK_LE, CHECK_LT, RelAlgExecutionUnit::eachAggTarget(), QueryMemoryDescriptor::getApproxQuantileDescriptors(), QueryMemoryDescriptor::getLogicalSlotWidthBytes(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::getSlotIndexForSingleSlotCol(), init_agg_vals_, kAPPROX_QUANTILE, row_set_mem_owner_, RelAlgExecutionUnit::target_exprs, and thread_idx_.
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 1372 of file QueryMemoryInitializer.cpp.
References CHECK_EQ, CPU, streaming_top_n::get_rows_copy_from_heaps(), QueryMemoryDescriptor::getBufferSizeBytes(), QueryMemoryDescriptor::getEntryCount(), QueryMemoryDescriptor::getRowSize(), group_by_buffers_, QueryMemoryDescriptor::hasVarlenOutput(), SortInfo::limit, SortInfo::offset, and RelAlgExecutionUnit::sort_info.
|
private |
Definition at line 1388 of file QueryMemoryInitializer.cpp.
References CHECK_EQ, GpuGroupByBuffers::data, QueryMemoryDescriptor::getEntryCount(), QueryMemoryDescriptor::getRowSize(), group_by_buffers_, QueryMemoryDescriptor::hasVarlenOutput(), num_buffers_, and UNREACHABLE.
|
private |
Definition at line 865 of file QueryMemoryInitializer.cpp.
References Bitmap, CountDistinctDescriptor::bitmapPaddedSizeBytes(), CHECK, g_bigint_count, get_target_info(), QueryMemoryDescriptor::getCountDistinctDescriptor(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::getSlotIndexForSingleSlotCol(), is_distinct_target(), RelAlgExecutionUnit::target_exprs, and UnorderedSet.
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 1295 of file QueryMemoryInitializer.cpp.
References CHECK, anonymous_namespace{QueryMemoryInitializer.cpp}::compact_projection_buffer_for_cpu_columnar(), QueryMemoryDescriptor::getEntryCount(), group_by_buffers_, QueryMemoryDescriptor::hasVarlenOutput(), and result_sets_.
|
private |
Definition at line 1313 of file QueryMemoryInitializer.cpp.
References CHECK, copy_projection_buffer_from_gpu_columnar(), QueryMemoryDescriptor::getEntryCount(), group_by_buffers_, QueryMemoryDescriptor::hasVarlenOutput(), and result_sets_.
|
private |
Definition at line 1251 of file QueryMemoryInitializer.cpp.
References QueryMemoryDescriptor::blocksShareMemory(), and CPU.
void QueryMemoryInitializer::copyFromTableFunctionGpuBuffers | ( | Data_Namespace::DataMgr * | data_mgr, |
const QueryMemoryDescriptor & | query_mem_desc, | ||
const size_t | entry_count, | ||
const GpuGroupByBuffers & | gpu_group_by_buffers, | ||
const int | device_id, | ||
const unsigned | block_size_x, | ||
const unsigned | grid_size_x | ||
) |
Definition at line 1214 of file QueryMemoryInitializer.cpp.
References align_to_int64(), CHECK_LE, GpuGroupByBuffers::data, GpuGroupByBuffers::entry_count, QueryMemoryDescriptor::getBufferColSlotCount(), QueryMemoryDescriptor::getColSlotContext(), getQueryEngineCudaStreamForDevice(), ColSlotContext::getSlotInfo(), group_by_buffers_, and SlotSize::logical_size.
void QueryMemoryInitializer::copyGroupByBuffersFromGpu | ( | DeviceAllocator & | device_allocator, |
const QueryMemoryDescriptor & | query_mem_desc, | ||
const size_t | entry_count, | ||
const GpuGroupByBuffers & | gpu_group_by_buffers, | ||
const RelAlgExecutionUnit * | ra_exe_unit, | ||
const unsigned | block_size_x, | ||
const unsigned | grid_size_x, | ||
const int | device_id, | ||
const bool | prepend_index_buffer | ||
) | const |
Definition at line 1338 of file QueryMemoryInitializer.cpp.
References copy_group_by_buffers_from_gpu(), GpuGroupByBuffers::data, streaming_top_n::get_heap_size(), QueryMemoryDescriptor::getBufferSizeBytes(), QueryMemoryDescriptor::getRowSize(), GPU, group_by_buffers_, QueryMemoryDescriptor::hasVarlenOutput(), SortInfo::limit, anonymous_namespace{Utm.h}::n, SortInfo::offset, RelAlgExecutionUnit::sort_info, and QueryMemoryDescriptor::useStreamingTopN().
|
private |
Definition at line 1059 of file QueryMemoryInitializer.cpp.
References Allocator::alloc(), CHECK, CHECK_EQ, DeviceAllocator::copyToDevice(), create_dev_group_by_buffers(), device_allocator_, RenderAllocator::getAllocatedSize(), QueryMemoryDescriptor::getBufferSizeBytes(), QueryMemoryDescriptor::getEffectiveKeyWidth(), QueryMemoryDescriptor::getEntryCount(), getGroupByBuffersSize(), QueryMemoryDescriptor::getGroupbyColCount(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), QueryMemoryDescriptor::getRowSize(), QueryMemoryDescriptor::getSlotCount(), GPU, group_by_buffers_, QueryMemoryDescriptor::hasKeylessHash(), QueryMemoryDescriptor::hasVarlenOutput(), init_columnar_group_by_buffer_on_device(), init_group_by_buffer_on_device(), QueryMemoryDescriptor::interleavedBins(), QueryMemoryDescriptor::lazyInitGroups(), SortInfo::limit, anonymous_namespace{Utm.h}::n, num_rows_, SortInfo::offset, prepareTopNHeapsDevBuffer(), row_set_mem_owner_, RelAlgExecutionUnit::sort_info, thread_idx_, QueryMemoryDescriptor::threadsShareMemory(), UNREACHABLE, RelAlgExecutionUnit::use_bump_allocator, QueryMemoryDescriptor::useStreamingTopN(), varlen_output_buffer_, varlen_output_buffer_host_ptr_, varlen_output_info_, and QueryMemoryDescriptor::varlenOutputBufferElemSize().
|
inline |
Definition at line 111 of file QueryMemoryInitializer.h.
References CHECK_LT, and init_agg_vals_.
|
inline |
Definition at line 87 of file QueryMemoryInitializer.h.
References count_distinct_bitmap_mem_size_.
|
inline |
Definition at line 79 of file QueryMemoryInitializer.h.
References count_distinct_bitmap_device_mem_ptr_.
|
inline |
Definition at line 83 of file QueryMemoryInitializer.h.
References count_distinct_bitmap_host_mem_ptr_.
|
inline |
Definition at line 116 of file QueryMemoryInitializer.h.
References group_by_buffers_.
|
inline |
Definition at line 120 of file QueryMemoryInitializer.h.
References group_by_buffers_.
Referenced by createAndInitializeGroupByBufferGpu().
|
inline |
Definition at line 122 of file QueryMemoryInitializer.h.
References CHECK_EQ, group_by_buffers_, and num_buffers_.
|
inline |
Definition at line 96 of file QueryMemoryInitializer.h.
References CHECK_LT, and result_sets_.
|
inline |
Definition at line 101 of file QueryMemoryInitializer.h.
References CHECK_LT, and result_sets_.
|
inline |
Definition at line 92 of file QueryMemoryInitializer.h.
References varlen_output_buffer_host_ptr_.
|
private |
Definition at line 1415 of file QueryMemoryInitializer.cpp.
References varlen_output_buffer_, varlen_output_buffer_host_ptr_, and varlen_output_info_.
Referenced by QueryMemoryInitializer().
|
inline |
Definition at line 94 of file QueryMemoryInitializer.h.
References varlen_output_buffer_.
|
private |
Definition at line 704 of file QueryMemoryInitializer.cpp.
References align_to_int64(), CHECK, CHECK_LT, EMPTY_KEY_64, g_bigint_count, get_target_info(), QueryMemoryDescriptor::getEntryCount(), QueryMemoryDescriptor::getGroupbyColCount(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), QueryMemoryDescriptor::getQueryDescriptionType(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::hasKeylessHash(), is_distinct_target(), heavyai::Projection, and RelAlgExecutionUnit::target_exprs.
Referenced by initGroupByBuffer().
|
private |
Definition at line 770 of file QueryMemoryInitializer.cpp.
References allocateCountDistinctBitmap(), allocateCountDistinctSet(), CHECK, CHECK_EQ, CHECK_LT, CHECK_NE, QueryMemoryInitializer::TargetAggOpsMetadata::count_distinct_buf_size, QueryMemoryDescriptor::getApproxQuantileDescriptors(), QueryMemoryDescriptor::getNextColOffInBytesRowOnly(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryInitializer::TargetAggOpsMetadata::has_count_distinct, QueryMemoryInitializer::TargetAggOpsMetadata::has_mode, QueryMemoryInitializer::TargetAggOpsMetadata::has_tdigest, QueryMemoryDescriptor::isGroupBy(), QueryMemoryInitializer::TargetAggOpsMetadata::mode_index_set, QueryMemoryInitializer::TargetAggOpsMetadata::quantile_params, row_set_mem_owner_, and thread_idx_.
Referenced by initRowGroups().
|
private |
Definition at line 568 of file QueryMemoryInitializer.cpp.
References streaming_top_n::get_rows_offset_of_heaps(), QueryMemoryDescriptor::getEntryCount(), GPU, init_agg_vals_, initColumnarGroups(), initRowGroups(), QueryMemoryDescriptor::interleavedBins(), SortInfo::limit, anonymous_namespace{Utm.h}::n, SortInfo::offset, RelAlgExecutionUnit::sort_info, and QueryMemoryDescriptor::useStreamingTopN().
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 931 of file QueryMemoryInitializer.cpp.
References CHECK_LE, CHECK_LT, RelAlgExecutionUnit::eachAggTarget(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::getSlotIndexForSingleSlotCol(), kMODE, and RelAlgExecutionUnit::target_exprs.
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 961 of file QueryMemoryInitializer.cpp.
References CHECK, CHECK_EQ, CHECK_LE, CHECK_LT, RelAlgExecutionUnit::eachAggTarget(), QueryMemoryDescriptor::getLogicalSlotWidthBytes(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::getSlotIndexForSingleSlotCol(), kAPPROX_QUANTILE, and RelAlgExecutionUnit::target_exprs.
Referenced by QueryMemoryInitializer().
|
private |
Definition at line 608 of file QueryMemoryInitializer.cpp.
References CHECK, cpu_threads(), result_set::fill_empty_key(), ResultSet::fixupQueryMemoryDescriptor(), g_optimize_row_initialization, QueryMemoryDescriptor::getAvailableCpuThreads(), QueryMemoryDescriptor::getColOffInBytes(), QueryMemoryDescriptor::getEffectiveKeyWidth(), QueryMemoryDescriptor::getGroupbyColCount(), QueryMemoryDescriptor::getRowSize(), QueryMemoryInitializer::TargetAggOpsMetadata::has_count_distinct, QueryMemoryInitializer::TargetAggOpsMetadata::has_mode, QueryMemoryInitializer::TargetAggOpsMetadata::has_tdigest, QueryMemoryDescriptor::hasKeylessHash(), initColumnsPerRow(), and threading_serial::parallel_for().
Referenced by initGroupByBuffer().
|
private |
Definition at line 1005 of file QueryMemoryInitializer.cpp.
References Allocator::alloc(), CHECK, DeviceAllocator::copyToDevice(), device_allocator_, streaming_top_n::get_heap_size(), streaming_top_n::get_rows_offset_of_heaps(), QueryMemoryDescriptor::getEffectiveKeyWidth(), QueryMemoryDescriptor::getGroupbyColCount(), QueryMemoryDescriptor::getRowSize(), GPU, QueryMemoryDescriptor::hasKeylessHash(), init_group_by_buffer_on_device(), QueryMemoryDescriptor::lazyInitGroups(), anonymous_namespace{Utm.h}::n, DeviceAllocator::setDeviceMem(), UNREACHABLE, and DeviceAllocator::zeroDeviceMem().
Referenced by createAndInitializeGroupByBufferGpu().
|
inline |
Definition at line 106 of file QueryMemoryInitializer.h.
References CHECK_LT, and result_sets_.
GpuGroupByBuffers QueryMemoryInitializer::setupTableFunctionGpuBuffers | ( | const QueryMemoryDescriptor & | query_mem_desc, |
const int | device_id, | ||
const unsigned | block_size_x, | ||
const unsigned | grid_size_x, | ||
const bool | zero_initialize_buffers | ||
) |
Definition at line 1173 of file QueryMemoryInitializer.cpp.
References align_to_int64(), Allocator::alloc(), CHECK, CHECK_GT, DeviceAllocator::copyToDevice(), device_allocator_, QueryMemoryDescriptor::getBufferColSlotCount(), QueryMemoryDescriptor::getColSlotContext(), ColSlotContext::getSlotInfo(), SlotSize::logical_size, num_rows_, and DeviceAllocator::zeroDeviceMem().
|
friend |
Definition at line 273 of file QueryMemoryInitializer.h.
|
friend |
Definition at line 274 of file QueryMemoryInitializer.h.
|
private |
Definition at line 263 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctGpuMem(), and getCountDistinctBitmapDevicePtr().
|
private |
Definition at line 265 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctBitmap(), and allocateCountDistinctGpuMem().
|
private |
Definition at line 266 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctBitmap(), allocateCountDistinctGpuMem(), and getCountDistinctBitmapHostPtr().
|
private |
Definition at line 264 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctGpuMem(), and getCountDistinctBitmapBytes().
|
private |
Definition at line 268 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctGpuMem(), createAndInitializeGroupByBufferGpu(), prepareTopNHeapsDevBuffer(), and setupTableFunctionGpuBuffers().
|
private |
Definition at line 258 of file QueryMemoryInitializer.h.
Referenced by applyStreamingTopNOffsetCpu(), applyStreamingTopNOffsetGpu(), compactProjectionBuffersCpu(), compactProjectionBuffersGpu(), copyFromTableFunctionGpuBuffers(), copyGroupByBuffersFromGpu(), createAndInitializeGroupByBufferGpu(), getGroupByBuffersPtr(), getGroupByBuffersSize(), getNumBuffers(), and QueryMemoryInitializer().
|
private |
Definition at line 255 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctBuffers(), allocateModeBuffer(), allocateTDigestsBuffer(), getAggInitValForIndex(), and initGroupByBuffer().
|
private |
Definition at line 257 of file QueryMemoryInitializer.h.
Referenced by applyStreamingTopNOffsetGpu(), getNumBuffers(), and QueryMemoryInitializer().
|
private |
Definition at line 251 of file QueryMemoryInitializer.h.
Referenced by createAndInitializeGroupByBufferGpu(), and setupTableFunctionGpuBuffers().
|
private |
Definition at line 253 of file QueryMemoryInitializer.h.
Referenced by compactProjectionBuffersCpu(), compactProjectionBuffersGpu(), getResultSet(), getResultSetOwned(), QueryMemoryInitializer(), and resetResultSet().
|
private |
Definition at line 252 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctBitmap(), allocateCountDistinctGpuMem(), allocateCountDistinctSet(), allocateModeBuffer(), allocateTDigestsBuffer(), createAndInitializeGroupByBufferGpu(), initColumnsPerRow(), and QueryMemoryInitializer().
|
private |
Definition at line 269 of file QueryMemoryInitializer.h.
|
private |
Definition at line 271 of file QueryMemoryInitializer.h.
Referenced by allocateCountDistinctBitmap(), allocateCountDistinctGpuMem(), allocateTDigestsBuffer(), createAndInitializeGroupByBufferGpu(), initColumnsPerRow(), and QueryMemoryInitializer().
|
private |
Definition at line 260 of file QueryMemoryInitializer.h.
Referenced by createAndInitializeGroupByBufferGpu(), getVarlenOutputInfo(), and getVarlenOutputPtr().
|
private |
Definition at line 261 of file QueryMemoryInitializer.h.
Referenced by createAndInitializeGroupByBufferGpu(), getVarlenOutputHostPtr(), and getVarlenOutputInfo().
|
private |
Definition at line 259 of file QueryMemoryInitializer.h.
Referenced by createAndInitializeGroupByBufferGpu(), and getVarlenOutputInfo().