OmniSciDB
a5dc49c757
|
#include <ColSlotContext.h>
Public Member Functions | |
ColSlotContext () | |
ColSlotContext (const std::vector< Analyzer::Expr * > &col_expr_list, const std::vector< int64_t > &col_exprs_to_not_project) | |
void | setAllSlotsSize (const int8_t slot_width_size) |
void | setAllSlotsPaddedSize (const int8_t padded_size) |
void | setAllUnsetSlotsPaddedSize (const int8_t padded_size) |
void | setAllSlotsPaddedSizeToLogicalSize () |
void | validate () const |
size_t | getColCount () const |
size_t | getSlotCount () const |
const SlotSize & | getSlotInfo (const size_t slot_idx) const |
void | setPaddedSlotWidthBytes (const size_t slot_idx, const int8_t bytes) |
const std::vector< size_t > & | getSlotsForCol (const size_t col_idx) const |
size_t | getAllSlotsPaddedSize () const |
size_t | getAllSlotsAlignedPaddedSize () const |
size_t | getAlignedPaddedSizeForRange (const size_t end) const |
size_t | getTotalBytesOfColumnarBuffers (const size_t entry_count) const |
int8_t | getMinPaddedByteSize (const int8_t actual_min_byte_width) const |
size_t | getCompactByteWidth () const |
size_t | getColOnlyOffInBytes (const size_t slot_idx) const |
bool | empty () |
void | clear () |
void | addColumn (const std::vector< std::tuple< int8_t, int8_t >> &slots_for_col) |
void | addColumnFlatBuffer (const int64_t flatbuffer_size) |
int64_t | getFlatBufferSize (const size_t slot_idx) const |
bool | operator== (const ColSlotContext &that) const |
bool | operator!= (const ColSlotContext &that) const |
void | alignPaddedSlots (const bool sort_on_gpu) |
int64_t | varlenOutputElementSize (const size_t slot_idx) const |
bool | hasVarlenOutput () const |
bool | slotIsVarlen (const size_t slot_idx) const |
bool | checkSlotUsesFlatBufferFormat (const size_t slot_idx) const |
std::string | toString () const |
Private Types | |
using | ArraySize = int64_t |
using | SlotIndex = size_t |
Private Member Functions | |
void | addSlotForColumn (const int8_t logical_size, const size_t column_idx) |
void | addSlotForColumn (const int8_t padded_size, const int8_t logical_size, const size_t column_idx) |
Private Attributes | |
std::vector< SlotSize > | slot_sizes_ |
std::vector< std::vector < size_t > > | col_to_slot_map_ |
std::unordered_map< SlotIndex, ArraySize > | varlen_output_slot_map_ |
Definition at line 46 of file ColSlotContext.h.
|
private |
Definition at line 159 of file ColSlotContext.h.
|
private |
Definition at line 160 of file ColSlotContext.h.
|
inline |
Definition at line 48 of file ColSlotContext.h.
ColSlotContext::ColSlotContext | ( | const std::vector< Analyzer::Expr * > & | col_expr_list, |
const std::vector< int64_t > & | col_exprs_to_not_project | ||
) |
Definition at line 35 of file ColSlotContext.cpp.
References addSlotForColumn(), CHECK, CHECK_EQ, col_to_slot_map_, g_bigint_count, get_bit_width(), get_compact_type(), get_target_info(), kAVG, kENCODING_GEOINT, kENCODING_NONE, kPOINT, slot_sizes_, and varlen_output_slot_map_.
void ColSlotContext::addColumn | ( | const std::vector< std::tuple< int8_t, int8_t >> & | slots_for_col | ) |
Definition at line 259 of file ColSlotContext.cpp.
References addSlotForColumn(), and col_to_slot_map_.
Referenced by QueryMemoryDescriptor::addColSlotInfo().
void ColSlotContext::addColumnFlatBuffer | ( | const int64_t | flatbuffer_size | ) |
Definition at line 268 of file ColSlotContext.cpp.
References addSlotForColumn(), col_to_slot_map_, and varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::addColSlotInfoFlatBuffer().
|
private |
Definition at line 296 of file ColSlotContext.cpp.
Referenced by addColumn(), addColumnFlatBuffer(), and ColSlotContext().
|
private |
Definition at line 301 of file ColSlotContext.cpp.
References CHECK_LT, col_to_slot_map_, and slot_sizes_.
void ColSlotContext::alignPaddedSlots | ( | const bool | sort_on_gpu | ) |
Definition at line 234 of file ColSlotContext.cpp.
References align_to_int64(), CHECK, CHECK_GE, and slot_sizes_.
Referenced by QueryMemoryDescriptor::alignPaddedSlots().
bool ColSlotContext::checkSlotUsesFlatBufferFormat | ( | const size_t | slot_idx | ) | const |
Definition at line 285 of file ColSlotContext.cpp.
References col_to_slot_map_, slot_sizes_, and varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::checkSlotUsesFlatBufferFormat().
void ColSlotContext::clear | ( | ) |
Definition at line 229 of file ColSlotContext.cpp.
References col_to_slot_map_, and slot_sizes_.
Referenced by QueryMemoryDescriptor::clearSlotInfo().
bool ColSlotContext::empty | ( | ) |
size_t ColSlotContext::getAlignedPaddedSizeForRange | ( | const size_t | end | ) | const |
Definition at line 152 of file ColSlotContext.cpp.
References gpu_enabled::accumulate(), align_to_int64(), CHECK_GE, and slot_sizes_.
Referenced by getAllSlotsAlignedPaddedSize(), and getColOnlyOffInBytes().
size_t ColSlotContext::getAllSlotsAlignedPaddedSize | ( | ) | const |
Definition at line 148 of file ColSlotContext.cpp.
References getAlignedPaddedSizeForRange(), and slot_sizes_.
Referenced by QueryMemoryDescriptor::getColsSize().
size_t ColSlotContext::getAllSlotsPaddedSize | ( | ) | const |
Definition at line 138 of file ColSlotContext.cpp.
References gpu_enabled::accumulate(), CHECK_GE, and slot_sizes_.
Referenced by QueryMemoryDescriptor::getRowWidth().
size_t ColSlotContext::getColCount | ( | ) | const |
Definition at line 131 of file ColSlotContext.cpp.
References col_to_slot_map_.
Referenced by QueryMemoryDescriptor::getColCount().
size_t ColSlotContext::getColOnlyOffInBytes | ( | const size_t | slot_idx | ) | const |
Definition at line 216 of file ColSlotContext.cpp.
References align_to_int64(), CHECK_LT, getAlignedPaddedSizeForRange(), and slot_sizes_.
Referenced by QueryMemoryDescriptor::getColOnlyOffInBytes().
size_t ColSlotContext::getCompactByteWidth | ( | ) | const |
Definition at line 192 of file ColSlotContext.cpp.
References CHECK_EQ, CHECK_GT, and slot_sizes_.
Referenced by QueryMemoryDescriptor::getCompactByteWidth().
int64_t ColSlotContext::getFlatBufferSize | ( | const size_t | slot_idx | ) | const |
Definition at line 276 of file ColSlotContext.cpp.
References to_string(), and varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::getFlatBufferSize().
int8_t ColSlotContext::getMinPaddedByteSize | ( | const int8_t | actual_min_byte_width | ) | const |
Definition at line 181 of file ColSlotContext.cpp.
References slot_sizes_.
Referenced by QueryMemoryDescriptor::updateActualMinByteWidth().
size_t ColSlotContext::getSlotCount | ( | ) | const |
Definition at line 134 of file ColSlotContext.cpp.
References slot_sizes_.
Referenced by QueryMemoryDescriptor::getBufferColSlotCount(), QueryMemoryDescriptor::getSlotCount(), QueryMemoryDescriptor::varlenOutputBufferElemSize(), and QueryMemoryDescriptor::varlenOutputRowSizeToSlot().
|
inline |
Definition at line 66 of file ColSlotContext.h.
References CHECK_LT, and slot_sizes_.
Referenced by QueryMemoryInitializer::copyFromTableFunctionGpuBuffers(), QueryMemoryDescriptor::getLogicalSlotWidthBytes(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), and QueryMemoryInitializer::setupTableFunctionGpuBuffers().
|
inline |
Definition at line 76 of file ColSlotContext.h.
References CHECK_LT, and col_to_slot_map_.
Referenced by QueryMemoryDescriptor::getSlotIndexForSingleSlotCol().
size_t ColSlotContext::getTotalBytesOfColumnarBuffers | ( | const size_t | entry_count | ) | const |
Definition at line 168 of file ColSlotContext.cpp.
References gpu_enabled::accumulate(), align_to_int64(), CHECK_GE, and slot_sizes_.
Referenced by QueryMemoryDescriptor::getTotalBytesOfColumnarBuffers().
|
inline |
Definition at line 120 of file ColSlotContext.h.
References varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::hasVarlenOutput().
|
inline |
Definition at line 112 of file ColSlotContext.h.
|
inline |
Definition at line 104 of file ColSlotContext.h.
References col_to_slot_map_, and slot_sizes_.
void ColSlotContext::setAllSlotsPaddedSize | ( | const int8_t | padded_size | ) |
void ColSlotContext::setAllSlotsPaddedSizeToLogicalSize | ( | ) |
Definition at line 118 of file ColSlotContext.cpp.
References slot_sizes_.
Referenced by QueryMemoryDescriptor::QueryMemoryDescriptor(), and QueryMemoryDescriptor::setOutputColumnar().
void ColSlotContext::setAllSlotsSize | ( | const int8_t | slot_width_size | ) |
Definition at line 99 of file ColSlotContext.cpp.
References gpu_enabled::fill(), and slot_sizes_.
Referenced by QueryMemoryDescriptor::useConsistentSlotWidthSize().
void ColSlotContext::setAllUnsetSlotsPaddedSize | ( | const int8_t | padded_size | ) |
Definition at line 110 of file ColSlotContext.cpp.
References slot_sizes_.
Referenced by QueryMemoryDescriptor::QueryMemoryDescriptor().
|
inline |
Definition at line 71 of file ColSlotContext.h.
References CHECK_LT, and slot_sizes_.
Referenced by QueryMemoryDescriptor::setPaddedSlotWidthBytes().
|
inline |
Definition at line 124 of file ColSlotContext.h.
References varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::slotIsVarlenOutput().
|
inline |
Definition at line 130 of file ColSlotContext.h.
References col_to_slot_map_, slot_sizes_, to_string(), and varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::reductionKey().
void ColSlotContext::validate | ( | ) | const |
Definition at line 124 of file ColSlotContext.cpp.
References CHECK_GE, CHECK_LE, and slot_sizes_.
Referenced by QueryMemoryDescriptor::QueryMemoryDescriptor().
int64_t ColSlotContext::varlenOutputElementSize | ( | const size_t | slot_idx | ) | const |
Definition at line 309 of file ColSlotContext.cpp.
References to_string(), and varlen_output_slot_map_.
Referenced by QueryMemoryDescriptor::varlenOutputBufferElemSize(), and QueryMemoryDescriptor::varlenOutputRowSizeToSlot().
|
private |
Definition at line 157 of file ColSlotContext.h.
Referenced by addColumn(), addColumnFlatBuffer(), addSlotForColumn(), checkSlotUsesFlatBufferFormat(), clear(), ColSlotContext(), getColCount(), getSlotsForCol(), operator==(), and toString().
|
private |
Definition at line 156 of file ColSlotContext.h.
Referenced by addSlotForColumn(), alignPaddedSlots(), checkSlotUsesFlatBufferFormat(), clear(), ColSlotContext(), empty(), getAlignedPaddedSizeForRange(), getAllSlotsAlignedPaddedSize(), getAllSlotsPaddedSize(), getColOnlyOffInBytes(), getCompactByteWidth(), getMinPaddedByteSize(), getSlotCount(), getSlotInfo(), getTotalBytesOfColumnarBuffers(), operator==(), setAllSlotsPaddedSize(), setAllSlotsPaddedSizeToLogicalSize(), setAllSlotsSize(), setAllUnsetSlotsPaddedSize(), setPaddedSlotWidthBytes(), toString(), and validate().
Definition at line 161 of file ColSlotContext.h.
Referenced by addColumnFlatBuffer(), checkSlotUsesFlatBufferFormat(), ColSlotContext(), getFlatBufferSize(), hasVarlenOutput(), slotIsVarlen(), toString(), and varlenOutputElementSize().