OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ResultSetBufferAccessors.h File Reference

Utility functions for easy access to the result set buffers. More...

#include "BufferCompaction.h"
#include "Shared/SqlTypesLayout.h"
#include "Shared/misc.h"
#include "TypePunning.h"
#include "Descriptors/QueryMemoryDescriptor.h"
#include <algorithm>
+ Include dependency graph for ResultSetBufferAccessors.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool is_real_str_or_array (const TargetInfo &target_info)
 
size_t get_slots_for_geo_target (const TargetInfo &target_info, const bool separate_varlen_storage)
 
size_t get_slots_for_target (const TargetInfo &target_info, const bool separate_varlen_storage)
 
size_t advance_slot (const size_t j, const TargetInfo &target_info, const bool separate_varlen_storage)
 
size_t slot_offset_rowwise (const size_t entry_idx, const size_t slot_idx, const size_t key_count, const size_t slot_count)
 
size_t slot_offset_colwise (const size_t entry_idx, const size_t slot_idx, const size_t key_count, const size_t entry_count)
 
size_t key_offset_rowwise (const size_t entry_idx, const size_t key_count, const size_t slot_count)
 
size_t key_offset_colwise (const size_t entry_idx, const size_t key_idx, const size_t entry_count)
 
template<class T >
advance_to_next_columnar_target_buff (T target_ptr, const QueryMemoryDescriptor &query_mem_desc, const size_t target_slot_idx)
 
template<class T >
get_cols_ptr (T buff, const QueryMemoryDescriptor &query_mem_desc)
 
size_t get_key_bytes_rowwise (const QueryMemoryDescriptor &query_mem_desc)
 
size_t get_row_bytes (const QueryMemoryDescriptor &query_mem_desc)
 
template<class T >
row_ptr_rowwise (T buff, const QueryMemoryDescriptor &query_mem_desc, const size_t entry_idx)
 
template<class T >
advance_target_ptr_row_wise (T target_ptr, const TargetInfo &target_info, const size_t slot_idx, const QueryMemoryDescriptor &query_mem_desc, const bool separate_varlen_storage)
 
template<class T >
advance_target_ptr_col_wise (T target_ptr, const TargetInfo &target_info, const size_t slot_idx, const QueryMemoryDescriptor &query_mem_desc, const bool separate_varlen_storage)
 
size_t get_slot_off_quad (const QueryMemoryDescriptor &query_mem_desc)
 
double pair_to_double (const std::pair< int64_t, int64_t > &fp_pair, const SQLTypeInfo &ti, const bool float_argument_input)
 
int64_t null_val_bit_pattern (const SQLTypeInfo &ti, const bool float_argument_input)
 
int64_t read_int_from_buff (const int8_t *ptr, const int8_t compact_sz)
 

Detailed Description

Utility functions for easy access to the result set buffers.

Definition in file ResultSetBufferAccessors.h.

Function Documentation

size_t advance_slot ( const size_t  j,
const TargetInfo target_info,
const bool  separate_varlen_storage 
)
inline

Definition at line 75 of file ResultSetBufferAccessors.h.

References get_slots_for_geo_target(), get_slots_for_target(), SQLTypeInfo::is_geometry(), and TargetInfo::sql_type.

Referenced by anonymous_namespace{ResultSetIteration.cpp}::advance_col_buff_to_slot(), ResultSet::eachCellInColumn(), get_heap_key_slot_index(), ResultSet::getSlotIndicesForTargetIndices(), ResultSet::RowWiseTargetAccessor::initializeOffsetsForStorage(), ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage(), ResultSetReductionJIT::reduceOneEntryBaseline(), ResultSetStorage::reduceOneEntrySlotsBaseline(), and ResultSetStorage::rewriteAggregateBufferOffsets().

77  {
78  if (target_info.sql_type.is_geometry()) {
79  return j + get_slots_for_geo_target(target_info, separate_varlen_storage);
80  }
81  return j + get_slots_for_target(target_info, separate_varlen_storage);
82 }
SQLTypeInfo sql_type
Definition: TargetInfo.h:52
size_t get_slots_for_geo_target(const TargetInfo &target_info, const bool separate_varlen_storage)
bool is_geometry() const
Definition: sqltypes.h:595
size_t get_slots_for_target(const TargetInfo &target_info, const bool separate_varlen_storage)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T >
T advance_target_ptr_col_wise ( target_ptr,
const TargetInfo target_info,
const size_t  slot_idx,
const QueryMemoryDescriptor query_mem_desc,
const bool  separate_varlen_storage 
)
inline

Definition at line 170 of file ResultSetBufferAccessors.h.

References advance_to_next_columnar_target_buff(), TargetInfo::agg_kind, SQLTypeInfo::get_physical_coord_cols(), TargetInfo::is_agg, SQLTypeInfo::is_geometry(), is_real_str_or_array(), kAVG, run_benchmark_import::result, and TargetInfo::sql_type.

174  {
175  auto result =
176  advance_to_next_columnar_target_buff(target_ptr, query_mem_desc, slot_idx);
177  if ((target_info.is_agg && target_info.agg_kind == kAVG) ||
178  (is_real_str_or_array(target_info) && !separate_varlen_storage)) {
179  return advance_to_next_columnar_target_buff(result, query_mem_desc, slot_idx + 1);
180  } else if (target_info.sql_type.is_geometry() && !separate_varlen_storage) {
181  // TODO: handle varlen projection
182  for (auto i = 1; i < 2 * target_info.sql_type.get_physical_coord_cols(); ++i) {
183  result = advance_to_next_columnar_target_buff(result, query_mem_desc, slot_idx + i);
184  }
185  return result;
186  } else {
187  return result;
188  }
189 }
T advance_to_next_columnar_target_buff(T target_ptr, const QueryMemoryDescriptor &query_mem_desc, const size_t target_slot_idx)
SQLTypeInfo sql_type
Definition: TargetInfo.h:52
bool is_agg
Definition: TargetInfo.h:50
SQLAgg agg_kind
Definition: TargetInfo.h:51
bool is_real_str_or_array(const TargetInfo &target_info)
bool is_geometry() const
Definition: sqltypes.h:595
int get_physical_coord_cols() const
Definition: sqltypes.h:449
Definition: sqldefs.h:74

+ Here is the call graph for this function:

template<class T >
T advance_target_ptr_row_wise ( target_ptr,
const TargetInfo target_info,
const size_t  slot_idx,
const QueryMemoryDescriptor query_mem_desc,
const bool  separate_varlen_storage 
)
inline

Definition at line 148 of file ResultSetBufferAccessors.h.

References TargetInfo::agg_kind, SQLTypeInfo::get_physical_coord_cols(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), TargetInfo::is_agg, SQLTypeInfo::is_geometry(), is_real_str_or_array(), kAVG, run_benchmark_import::result, QueryMemoryDescriptor::slotIsVarlenOutput(), and TargetInfo::sql_type.

Referenced by ResultSet::RowWiseTargetAccessor::initializeOffsetsForStorage(), and ResultSetStorage::rewriteAggregateBufferOffsets().

152  {
153  auto result = target_ptr + query_mem_desc.getPaddedSlotWidthBytes(slot_idx);
154  if ((target_info.is_agg && target_info.agg_kind == kAVG) ||
155  ((!separate_varlen_storage || target_info.is_agg) &&
156  is_real_str_or_array(target_info))) {
157  return result + query_mem_desc.getPaddedSlotWidthBytes(slot_idx + 1);
158  }
159  const bool is_varlen_output_slot = query_mem_desc.slotIsVarlenOutput(slot_idx);
160  if (target_info.sql_type.is_geometry() &&
161  (!separate_varlen_storage || target_info.is_agg) && !is_varlen_output_slot) {
162  for (auto i = 1; i < 2 * target_info.sql_type.get_physical_coord_cols(); ++i) {
163  result += query_mem_desc.getPaddedSlotWidthBytes(slot_idx + i);
164  }
165  }
166  return result;
167 }
bool slotIsVarlenOutput(const size_t slot_idx) const
SQLTypeInfo sql_type
Definition: TargetInfo.h:52
bool is_agg
Definition: TargetInfo.h:50
const int8_t getPaddedSlotWidthBytes(const size_t slot_idx) const
SQLAgg agg_kind
Definition: TargetInfo.h:51
bool is_real_str_or_array(const TargetInfo &target_info)
bool is_geometry() const
Definition: sqltypes.h:595
int get_physical_coord_cols() const
Definition: sqltypes.h:449
Definition: sqldefs.h:74

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T >
T advance_to_next_columnar_target_buff ( target_ptr,
const QueryMemoryDescriptor query_mem_desc,
const size_t  target_slot_idx 
)
inline

Definition at line 111 of file ResultSetBufferAccessors.h.

References QueryMemoryDescriptor::getPaddedSlotBufferSize().

Referenced by anonymous_namespace{ResultSetIteration.cpp}::advance_col_buff_to_slot(), advance_target_ptr_col_wise(), ResultSet::eachCellInColumn(), ResultSet::getTargetValueFromBufferColwise(), ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage(), ResultSet::makeGeoTargetValue(), and ResultSetStorage::reduceEntriesNoCollisionsColWise().

113  {
114  auto new_target_ptr = target_ptr;
115  new_target_ptr += query_mem_desc.getPaddedSlotBufferSize(target_slot_idx);
116  return new_target_ptr;
117 }
int64_t getPaddedSlotBufferSize(const size_t slot_idx) const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T >
T get_cols_ptr ( buff,
const QueryMemoryDescriptor query_mem_desc 
)
inline

Definition at line 120 of file ResultSetBufferAccessors.h.

References CHECK, QueryMemoryDescriptor::didOutputColumnar(), and QueryMemoryDescriptor::getColOffInBytes().

Referenced by anonymous_namespace{ResultSetIteration.cpp}::advance_col_buff_to_slot(), ResultSet::eachCellInColumn(), ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage(), and ResultSetStorage::reduceEntriesNoCollisionsColWise().

120  {
121  CHECK(query_mem_desc.didOutputColumnar());
122  return buff + query_mem_desc.getColOffInBytes(0);
123 }
#define CHECK(condition)
Definition: Logger.h:291
size_t getColOffInBytes(const size_t col_idx) const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t get_key_bytes_rowwise ( const QueryMemoryDescriptor query_mem_desc)
inline

Definition at line 125 of file ResultSetBufferAccessors.h.

References CHECK, QueryMemoryDescriptor::getEffectiveKeyWidth(), QueryMemoryDescriptor::getGroupbyColCount(), and QueryMemoryDescriptor::hasKeylessHash().

Referenced by ResultSet::eachCellInColumn(), get_row_bytes(), get_slot_off_quad(), ResultSet::getOneColRow(), ResultSetStorage::initializeRowWise(), ResultSetReductionJIT::reduceOneEntryNoCollisions(), and ResultSetStorage::rewriteAggregateBufferOffsets().

125  {
126  if (query_mem_desc.hasKeylessHash()) {
127  return 0;
128  }
129  auto consist_key_width = query_mem_desc.getEffectiveKeyWidth();
130  CHECK(consist_key_width);
131  return consist_key_width * query_mem_desc.getGroupbyColCount();
132 }
size_t getEffectiveKeyWidth() const
size_t getGroupbyColCount() const
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t get_row_bytes ( const QueryMemoryDescriptor query_mem_desc)
inline

Definition at line 134 of file ResultSetBufferAccessors.h.

References align_to_int64(), get_key_bytes_rowwise(), QueryMemoryDescriptor::getRowWidth(), and run_benchmark_import::result.

Referenced by anonymous_namespace{ResultSetReduction.cpp}::get_row_qw_count(), ResultSetStorage::initializeRowWise(), ResultSetReductionJIT::reduceOneEntryBaselineIdx(), ResultSetReductionJIT::reduceOneEntryNoCollisionsIdx(), and row_ptr_rowwise().

134  {
135  size_t result = align_to_int64(get_key_bytes_rowwise(query_mem_desc)); // plus padding
136  return result + query_mem_desc.getRowWidth();
137 }
size_t get_key_bytes_rowwise(const QueryMemoryDescriptor &query_mem_desc)
FORCE_INLINE HOST DEVICE T align_to_int64(T addr)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t get_slot_off_quad ( const QueryMemoryDescriptor query_mem_desc)
inline

Definition at line 191 of file ResultSetBufferAccessors.h.

References align_to_int64(), and get_key_bytes_rowwise().

Referenced by anonymous_namespace{ResultSetReduction.cpp}::fill_slots(), anonymous_namespace{ResultSetReduction.cpp}::get_matching_group_value_reduction(), and ResultSetReductionJIT::reduceOneEntryBaselineIdx().

191  {
192  return align_to_int64(get_key_bytes_rowwise(query_mem_desc)) / sizeof(int64_t);
193 }
size_t get_key_bytes_rowwise(const QueryMemoryDescriptor &query_mem_desc)
FORCE_INLINE HOST DEVICE T align_to_int64(T addr)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t get_slots_for_geo_target ( const TargetInfo target_info,
const bool  separate_varlen_storage 
)
inline

Definition at line 45 of file ResultSetBufferAccessors.h.

References SQLTypeInfo::get_physical_coord_cols(), TargetInfo::is_agg, TargetInfo::is_varlen_projection, and TargetInfo::sql_type.

Referenced by advance_slot().

46  {
47  // Aggregates on geospatial types are serialized directly by rewriting the underlying
48  // buffer. Even if separate varlen storage is valid, treat aggregates the same on
49  // distributed and single node
50  if (target_info.is_varlen_projection ||
51  (separate_varlen_storage && !target_info.is_agg)) {
52  return 1;
53  } else {
54  return 2 * target_info.sql_type.get_physical_coord_cols();
55  }
56 }
SQLTypeInfo sql_type
Definition: TargetInfo.h:52
bool is_varlen_projection
Definition: TargetInfo.h:56
bool is_agg
Definition: TargetInfo.h:50
int get_physical_coord_cols() const
Definition: sqltypes.h:449

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t get_slots_for_target ( const TargetInfo target_info,
const bool  separate_varlen_storage 
)
inline

Definition at line 58 of file ResultSetBufferAccessors.h.

References TargetInfo::agg_kind, TargetInfo::is_agg, is_real_str_or_array(), and kAVG.

Referenced by advance_slot().

59  {
60  if (target_info.is_agg) {
61  if (target_info.agg_kind == kAVG || is_real_str_or_array(target_info)) {
62  return 2;
63  } else {
64  return 1;
65  }
66  } else {
67  if (is_real_str_or_array(target_info) && !separate_varlen_storage) {
68  return 2;
69  } else {
70  return 1;
71  }
72  }
73 }
bool is_agg
Definition: TargetInfo.h:50
SQLAgg agg_kind
Definition: TargetInfo.h:51
bool is_real_str_or_array(const TargetInfo &target_info)
Definition: sqldefs.h:74

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool is_real_str_or_array ( const TargetInfo target_info)
inline

Definition at line 37 of file ResultSetBufferAccessors.h.

References TargetInfo::agg_kind, SQLTypeInfo::get_compression(), TargetInfo::is_agg, SQLTypeInfo::is_array(), SQLTypeInfo::is_string(), kENCODING_NONE, kSAMPLE, TargetInfo::sql_type, and SQLTypeInfo::usesFlatBuffer().

Referenced by advance_target_ptr_col_wise(), advance_target_ptr_row_wise(), get_slots_for_target(), ResultSet::getTargetValueFromBufferColwise(), ResultSet::getTargetValueFromBufferRowwise(), ResultSet::RowWiseTargetAccessor::initializeOffsetsForStorage(), and ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage().

37  {
38  return (!target_info.is_agg || target_info.agg_kind == kSAMPLE) &&
39  !target_info.sql_type.usesFlatBuffer() &&
40  (target_info.sql_type.is_array() ||
41  (target_info.sql_type.is_string() &&
42  target_info.sql_type.get_compression() == kENCODING_NONE));
43 }
SQLTypeInfo sql_type
Definition: TargetInfo.h:52
bool is_agg
Definition: TargetInfo.h:50
bool usesFlatBuffer() const
Definition: sqltypes.h:1081
SQLAgg agg_kind
Definition: TargetInfo.h:51
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
bool is_string() const
Definition: sqltypes.h:559
bool is_array() const
Definition: sqltypes.h:583

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t key_offset_colwise ( const size_t  entry_idx,
const size_t  key_idx,
const size_t  entry_count 
)
inline

Definition at line 104 of file ResultSetBufferAccessors.h.

Referenced by ResultSetStorage::fillOneEntryColWise(), ResultSetStorage::initializeColWise(), ResultSetStorage::moveOneEntryToBuffer(), and ResultSetStorage::reduceOneEntryBaseline().

106  {
107  return key_idx * entry_count + entry_idx;
108 }

+ Here is the caller graph for this function:

size_t key_offset_rowwise ( const size_t  entry_idx,
const size_t  key_count,
const size_t  slot_count 
)
inline

Definition at line 98 of file ResultSetBufferAccessors.h.

Referenced by ResultSetStorage::fillOneEntryRowWise().

100  {
101  return (key_count + slot_count) * entry_idx;
102 }

+ Here is the caller graph for this function:

int64_t null_val_bit_pattern ( const SQLTypeInfo ti,
const bool  float_argument_input 
)
inline

Definition at line 229 of file ResultSetBufferAccessors.h.

References SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), inline_fp_null_val(), inline_int_null_val(), SQLTypeInfo::is_array(), SQLTypeInfo::is_fp(), SQLTypeInfo::is_geometry(), SQLTypeInfo::is_string(), kENCODING_NONE, kFLOAT, and NULL_FLOAT.

Referenced by anonymous_namespace{ResultSetSortImpl.cu}::baseline_sort_fp(), anonymous_namespace{ResultSetSortImpl.cu}::baseline_sort_int(), WindowFunctionContext::computeNullRangeOfSortedPartition(), anonymous_namespace{WindowContext.cpp}::fp_comparator_asc(), anonymous_namespace{WindowContext.cpp}::fp_comparator_desc(), result_set::initialize_target_values_for_storage(), ResultSet::isNull(), and pop_n_rows_from_merged_heaps_gpu().

230  {
231  if (ti.is_fp()) {
232  if (float_argument_input && ti.get_type() == kFLOAT) {
233  return shared::reinterpret_bits<int64_t>(NULL_FLOAT); // 1<<23
234  }
235  const auto double_null_val = inline_fp_null_val(ti);
236  return shared::reinterpret_bits<int64_t>(double_null_val); // 0x381<<52 or 1<<52
237  }
238  if ((ti.is_string() && ti.get_compression() == kENCODING_NONE) || ti.is_array() ||
239  ti.is_geometry()) {
240  return 0;
241  }
242  return inline_int_null_val(ti);
243 }
#define NULL_FLOAT
bool is_fp() const
Definition: sqltypes.h:571
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
double inline_fp_null_val(const SQL_TYPE_INFO &ti)
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
bool is_geometry() const
Definition: sqltypes.h:595
int64_t inline_int_null_val(const SQL_TYPE_INFO &ti)
bool is_string() const
Definition: sqltypes.h:559
bool is_array() const
Definition: sqltypes.h:583

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double pair_to_double ( const std::pair< int64_t, int64_t > &  fp_pair,
const SQLTypeInfo ti,
const bool  float_argument_input 
)
inline

Definition at line 197 of file ResultSetBufferAccessors.h.

References CHECK, exp_to_scale(), logger::FATAL, SQLTypeInfo::get_scale(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), SQLTypeInfo::is_decimal(), SQLTypeInfo::is_integer(), kDOUBLE, kFLOAT, LOG_IF, and NULL_DOUBLE.

Referenced by anonymous_namespace{ResultSetIteration.cpp}::make_avg_target_value(), and ResultSet::ResultSetComparator< BUFFER_ITERATOR_TYPE >::operator()().

199  {
200  if (fp_pair.second == 0) {
201  return NULL_DOUBLE;
202  }
203  double dividend{0.0};
204  switch (ti.get_type()) {
205  case kFLOAT:
206  if (float_argument_input) {
207  dividend = shared::reinterpret_bits<float>(fp_pair.first);
208  break;
209  }
210  case kDOUBLE:
211  dividend = shared::reinterpret_bits<double>(fp_pair.first);
212  break;
213  default:
214 #ifndef __CUDACC__
215  LOG_IF(FATAL, !(ti.is_integer() || ti.is_decimal()))
216  << "Unsupported type for pair to double conversion: " << ti.get_type_name();
217 #else
218  CHECK(ti.is_integer() || ti.is_decimal());
219 #endif
220  dividend = static_cast<double>(fp_pair.first);
221  break;
222  }
223  return ti.is_decimal() && ti.get_scale()
224  ? dividend /
225  (static_cast<double>(fp_pair.second) * exp_to_scale(ti.get_scale()))
226  : dividend / static_cast<double>(fp_pair.second);
227 }
#define NULL_DOUBLE
HOST DEVICE int get_scale() const
Definition: sqltypes.h:396
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
#define LOG_IF(severity, condition)
Definition: Logger.h:384
bool is_integer() const
Definition: sqltypes.h:565
std::string get_type_name() const
Definition: sqltypes.h:482
#define CHECK(condition)
Definition: Logger.h:291
uint64_t exp_to_scale(const unsigned exp)
bool is_decimal() const
Definition: sqltypes.h:568

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int64_t read_int_from_buff ( const int8_t *  ptr,
const int8_t  compact_sz 
)
inline

Definition at line 246 of file ResultSetBufferAccessors.h.

References UNREACHABLE.

Referenced by ResultSet::eachCellInColumn(), ResultSet::RowWiseTargetAccessor::getColumnInternal(), ResultSet::ColumnWiseTargetAccessor::getColumnInternal(), ResultSetStorage::isEmptyEntry(), ResultSetStorage::isEmptyEntryColumnar(), anonymous_namespace{ResultSetIteration.cpp}::make_avg_target_value(), ResultSet::makeGeoTargetValue(), ResultSet::makeTargetValue(), and ResultSet::makeVarlenTargetValue().

246  {
247  switch (compact_sz) {
248  case 8: {
249  return *reinterpret_cast<const int64_t*>(ptr);
250  }
251  case 4: {
252  return *reinterpret_cast<const int32_t*>(ptr);
253  }
254  case 2: {
255  return *reinterpret_cast<const int16_t*>(ptr);
256  }
257  case 1: {
258  return *reinterpret_cast<const int8_t*>(ptr);
259  }
260  default:
261  UNREACHABLE();
262  }
263  UNREACHABLE();
264  return 0;
265 }
#define UNREACHABLE()
Definition: Logger.h:338

+ Here is the caller graph for this function:

template<class T >
T row_ptr_rowwise ( buff,
const QueryMemoryDescriptor query_mem_desc,
const size_t  entry_idx 
)
inline

Definition at line 140 of file ResultSetBufferAccessors.h.

References get_row_bytes().

Referenced by ResultSetStorage::binSearchRowCount(), ResultSet::eachCellInColumn(), ResultSet::getOneColRow(), ResultSet::getRowWiseBaselineEntryAt(), ResultSetStorage::isEmptyEntry(), and ResultSetStorage::rewriteAggregateBufferOffsets().

142  {
143  const auto row_bytes = get_row_bytes(query_mem_desc);
144  return buff + entry_idx * row_bytes;
145 }
size_t get_row_bytes(const QueryMemoryDescriptor &query_mem_desc)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t slot_offset_colwise ( const size_t  entry_idx,
const size_t  slot_idx,
const size_t  key_count,
const size_t  entry_count 
)
inline

Definition at line 91 of file ResultSetBufferAccessors.h.

Referenced by anonymous_namespace{ResultSetReduction.cpp}::fill_slots(), ResultSetStorage::fillOneEntryColWise(), ResultSetStorage::initializeColWise(), and ResultSetStorage::reduceOneEntrySlotsBaseline().

94  {
95  return (key_count + slot_idx) * entry_count + entry_idx;
96 }

+ Here is the caller graph for this function:

size_t slot_offset_rowwise ( const size_t  entry_idx,
const size_t  slot_idx,
const size_t  key_count,
const size_t  slot_count 
)
inline

Definition at line 84 of file ResultSetBufferAccessors.h.

Referenced by ResultSetStorage::fillOneEntryRowWise().

87  {
88  return (key_count + slot_count) * entry_idx + (key_count + slot_idx);
89 }

+ Here is the caller graph for this function: