OmniSciDB  c1a53651b2
 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 74 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().

76  {
77  if (target_info.sql_type.is_geometry()) {
78  return j + get_slots_for_geo_target(target_info, separate_varlen_storage);
79  }
80  return j + get_slots_for_target(target_info, separate_varlen_storage);
81 }
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:592
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 172 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.

176  {
177  auto result =
178  advance_to_next_columnar_target_buff(target_ptr, query_mem_desc, slot_idx);
179  if ((target_info.is_agg && target_info.agg_kind == kAVG) ||
180  (is_real_str_or_array(target_info) && !separate_varlen_storage)) {
181  return advance_to_next_columnar_target_buff(result, query_mem_desc, slot_idx + 1);
182  } else if (target_info.sql_type.is_geometry() && !separate_varlen_storage) {
183  // TODO: handle varlen projection
184  for (auto i = 1; i < 2 * target_info.sql_type.get_physical_coord_cols(); ++i) {
185  result = advance_to_next_columnar_target_buff(result, query_mem_desc, slot_idx + i);
186  }
187  return result;
188  } else {
189  return result;
190  }
191 }
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:592
int get_physical_coord_cols() const
Definition: sqltypes.h:433
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 150 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().

154  {
155  auto result = target_ptr + query_mem_desc.getPaddedSlotWidthBytes(slot_idx);
156  if ((target_info.is_agg && target_info.agg_kind == kAVG) ||
157  ((!separate_varlen_storage || target_info.is_agg) &&
158  is_real_str_or_array(target_info))) {
159  return result + query_mem_desc.getPaddedSlotWidthBytes(slot_idx + 1);
160  }
161  const bool is_varlen_output_slot = query_mem_desc.slotIsVarlenOutput(slot_idx);
162  if (target_info.sql_type.is_geometry() &&
163  (!separate_varlen_storage || target_info.is_agg) && !is_varlen_output_slot) {
164  for (auto i = 1; i < 2 * target_info.sql_type.get_physical_coord_cols(); ++i) {
165  result += query_mem_desc.getPaddedSlotWidthBytes(slot_idx + i);
166  }
167  }
168  return result;
169 }
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:592
int get_physical_coord_cols() const
Definition: sqltypes.h:433
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 110 of file ResultSetBufferAccessors.h.

References align_to_int64(), QueryMemoryDescriptor::getEntryCount(), and QueryMemoryDescriptor::getPaddedSlotWidthBytes().

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().

112  {
113  auto new_target_ptr = target_ptr;
114  const auto column_size = query_mem_desc.getEntryCount() *
115  query_mem_desc.getPaddedSlotWidthBytes(target_slot_idx);
116  new_target_ptr += align_to_int64(column_size);
117 
118  return new_target_ptr;
119 }
const int8_t getPaddedSlotWidthBytes(const size_t slot_idx) const
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:

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

Definition at line 122 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().

122  {
123  CHECK(query_mem_desc.didOutputColumnar());
124  return buff + query_mem_desc.getColOffInBytes(0);
125 }
#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 127 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().

127  {
128  if (query_mem_desc.hasKeylessHash()) {
129  return 0;
130  }
131  auto consist_key_width = query_mem_desc.getEffectiveKeyWidth();
132  CHECK(consist_key_width);
133  return consist_key_width * query_mem_desc.getGroupbyColCount();
134 }
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 136 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().

136  {
137  size_t result = align_to_int64(get_key_bytes_rowwise(query_mem_desc)); // plus padding
138  return result + query_mem_desc.getRowWidth();
139 }
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 193 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().

193  {
194  return align_to_int64(get_key_bytes_rowwise(query_mem_desc)) / sizeof(int64_t);
195 }
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 44 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().

45  {
46  // Aggregates on geospatial types are serialized directly by rewriting the underlying
47  // buffer. Even if separate varlen storage is valid, treat aggregates the same on
48  // distributed and single node
49  if (target_info.is_varlen_projection ||
50  (separate_varlen_storage && !target_info.is_agg)) {
51  return 1;
52  } else {
53  return 2 * target_info.sql_type.get_physical_coord_cols();
54  }
55 }
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:433

+ 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 57 of file ResultSetBufferAccessors.h.

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

Referenced by advance_slot().

58  {
59  if (target_info.is_agg) {
60  if (target_info.agg_kind == kAVG || is_real_str_or_array(target_info)) {
61  return 2;
62  } else {
63  return 1;
64  }
65  } else {
66  if (is_real_str_or_array(target_info) && !separate_varlen_storage) {
67  return 2;
68  } else {
69  return 1;
70  }
71  }
72 }
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, and TargetInfo::sql_type.

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.is_array() ||
40  (target_info.sql_type.is_string() &&
41  target_info.sql_type.get_compression() == kENCODING_NONE));
42 }
SQLTypeInfo sql_type
Definition: TargetInfo.h:52
bool is_agg
Definition: TargetInfo.h:50
SQLAgg agg_kind
Definition: TargetInfo.h:51
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:389
bool is_string() const
Definition: sqltypes.h:580
bool is_array() const
Definition: sqltypes.h:588

+ 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 103 of file ResultSetBufferAccessors.h.

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

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

+ 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 97 of file ResultSetBufferAccessors.h.

Referenced by ResultSetStorage::fillOneEntryRowWise().

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

+ 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 231 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().

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

+ 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 199 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()().

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

+ 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 248 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().

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

+ 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 142 of file ResultSetBufferAccessors.h.

References get_row_bytes().

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

144  {
145  const auto row_bytes = get_row_bytes(query_mem_desc);
146  return buff + entry_idx * row_bytes;
147 }
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 90 of file ResultSetBufferAccessors.h.

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

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

+ 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 83 of file ResultSetBufferAccessors.h.

Referenced by ResultSetStorage::fillOneEntryRowWise().

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

+ Here is the caller graph for this function: