OmniSciDB  dfae7c3b14
JoinColumnIterator Struct Reference

Iterates over the rows of a JoinColumn across multiple fragments/chunks. More...

#include <JoinColumnIterator.h>

+ Collaboration diagram for JoinColumnIterator:

Classes

struct  IndexedElement
 

Public Member Functions

DEVICE FORCE_INLINE operator bool () const
 
DEVICE FORCE_INLINE const int8_t * ptr () const
 
DEVICE FORCE_INLINE int64_t getElementSwitch () const
 
DEVICE FORCE_INLINE IndexedElement operator* () const
 
DEVICE FORCE_INLINE JoinColumnIteratoroperator++ ()
 
DEVICE JoinColumnIterator ()
 
DEVICE JoinColumnIterator (const JoinColumn *join_column, const JoinColumnTypeInfo *type_info, size_t start, size_t step)
 

Public Attributes

const JoinColumnjoin_column
 
const JoinColumnTypeInfotype_info
 
const struct JoinChunkjoin_chunk_array
 
const int8_t * chunk_data
 
size_t index_of_chunk
 
size_t index_inside_chunk
 
size_t index
 
size_t start
 
size_t step
 

Detailed Description

Iterates over the rows of a JoinColumn across multiple fragments/chunks.

Definition at line 20 of file JoinColumnIterator.h.

Constructor & Destructor Documentation

◆ JoinColumnIterator() [1/2]

DEVICE JoinColumnIterator::JoinColumnIterator ( )
inline

Definition at line 89 of file JoinColumnIterator.h.

Referenced by JoinColumnTyped::begin(), JoinColumnTyped::Slice::begin(), JoinColumnTyped::end(), JoinColumnTyped::Slice::end(), and JoinColumnTupleIterator::JoinColumnTupleIterator().

89 : chunk_data(nullptr) {}
const int8_t * chunk_data
+ Here is the caller graph for this function:

◆ JoinColumnIterator() [2/2]

DEVICE JoinColumnIterator::JoinColumnIterator ( const JoinColumn join_column,
const JoinColumnTypeInfo type_info,
size_t  start,
size_t  step 
)
inline

Definition at line 91 of file JoinColumnIterator.h.

References operator++(), start, and step.

96  : join_column(join_column)
97  , type_info(type_info)
99  reinterpret_cast<const struct JoinChunk*>(join_column->col_chunks_buff))
100  , chunk_data(join_column->num_elems > 0 ? join_chunk_array->col_buff : nullptr)
101  , index_of_chunk(0)
102  , index_inside_chunk(0)
103  , index(0)
104  , start(start)
105  , step(step) {
106  // Stagger the index differently for each thread iterating over the column.
107  auto temp = this->step;
108  this->step = this->start;
109  operator++();
110  this->step = temp;
111  }
const int8_t * chunk_data
size_t num_elems
const int8_t * col_buff
const JoinColumn * join_column
const struct JoinChunk * join_chunk_array
const int8_t * col_chunks_buff
DEVICE FORCE_INLINE JoinColumnIterator & operator++()
const JoinColumnTypeInfo * type_info
+ Here is the call graph for this function:

Member Function Documentation

◆ getElementSwitch()

DEVICE FORCE_INLINE int64_t JoinColumnIterator::getElementSwitch ( ) const
inline

Definition at line 37 of file JoinColumnIterator.h.

References CHECK, chunk_data, JoinColumnTypeInfo::column_type, Double, JoinColumnTypeInfo::elem_sz, fixed_width_double_decode_noinline(), fixed_width_int_decode_noinline(), fixed_width_small_date_decode_noinline(), fixed_width_unsigned_decode_noinline(), index_inside_chunk, NULL_INT, NULL_SMALLINT, Signed, SmallDate, SUFFIX, and Unsigned.

Referenced by operator*().

37  {
38  switch (type_info->column_type) {
39  case SmallDate:
41  chunk_data,
46  case Signed:
49  case Unsigned:
52  case Double:
54  default:
55 #ifndef __CUDACC__
56  CHECK(false);
57 #else
58  assert(0);
59 #endif
60  return 0;
61  }
62  }
const int8_t * chunk_data
const ColumnType column_type
DEVICE NEVER_INLINE int64_t SUFFIX() fixed_width_int_decode_noinline(const int8_t *byte_stream, const int32_t byte_width, const int64_t pos)
Definition: DecodersImpl.h:83
const size_t elem_sz
#define SUFFIX(name)
DEVICE NEVER_INLINE int64_t SUFFIX() fixed_width_unsigned_decode_noinline(const int8_t *byte_stream, const int32_t byte_width, const int64_t pos)
Definition: DecodersImpl.h:90
#define NULL_INT
Definition: sqltypes.h:183
DEVICE NEVER_INLINE int64_t SUFFIX() fixed_width_small_date_decode_noinline(const int8_t *byte_stream, const int32_t byte_width, const int32_t null_val, const int64_t ret_null_val, const int64_t pos)
Definition: DecodersImpl.h:141
#define NULL_SMALLINT
Definition: sqltypes.h:182
#define CHECK(condition)
Definition: Logger.h:197
DEVICE NEVER_INLINE double SUFFIX() fixed_width_double_decode_noinline(const int8_t *byte_stream, const int64_t pos)
Definition: DecodersImpl.h:126
const JoinColumnTypeInfo * type_info
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator bool()

DEVICE FORCE_INLINE JoinColumnIterator::operator bool ( ) const
inline

Definition at line 31 of file JoinColumnIterator.h.

References chunk_data.

31 { return chunk_data; }
const int8_t * chunk_data

◆ operator*()

DEVICE FORCE_INLINE IndexedElement JoinColumnIterator::operator* ( ) const
inline

Definition at line 69 of file JoinColumnIterator.h.

References getElementSwitch(), and JoinColumnIterator::IndexedElement::index.

69  {
70  return {index, getElementSwitch()};
71  }
DEVICE FORCE_INLINE int64_t getElementSwitch() const
+ Here is the call graph for this function:

◆ operator++()

DEVICE FORCE_INLINE JoinColumnIterator& JoinColumnIterator::operator++ ( void  )
inline

Definition at line 73 of file JoinColumnIterator.h.

References JoinChunk::col_buff, index_of_chunk, JoinChunk::num_elems, and step.

Referenced by JoinColumnIterator().

73  {
74  index += step;
76  while (chunk_data &&
80  if (index_of_chunk < join_column->num_chunks) {
82  } else {
83  chunk_data = nullptr;
84  }
85  }
86  return *this;
87  }
const int8_t * chunk_data
const int8_t * col_buff
const struct JoinChunk * join_chunk_array
size_t num_elems
+ Here is the caller graph for this function:

◆ ptr()

DEVICE FORCE_INLINE const int8_t* JoinColumnIterator::ptr ( ) const
inline

Definition at line 33 of file JoinColumnIterator.h.

References JoinColumn::elem_sz.

Referenced by compute_bucket_sizes_impl(), and OverlapsKeyHandler::operator()().

33  {
35  }
const int8_t * chunk_data
const JoinColumn * join_column
+ Here is the caller graph for this function:

Member Data Documentation

◆ chunk_data

const int8_t* JoinColumnIterator::chunk_data

Definition at line 24 of file JoinColumnIterator.h.

Referenced by getElementSwitch(), and operator bool().

◆ index

size_t JoinColumnIterator::index

Definition at line 27 of file JoinColumnIterator.h.

◆ index_inside_chunk

size_t JoinColumnIterator::index_inside_chunk

Definition at line 26 of file JoinColumnIterator.h.

Referenced by getElementSwitch().

◆ index_of_chunk

size_t JoinColumnIterator::index_of_chunk

Definition at line 25 of file JoinColumnIterator.h.

Referenced by operator++().

◆ join_chunk_array

const struct JoinChunk* JoinColumnIterator::join_chunk_array

Definition at line 23 of file JoinColumnIterator.h.

◆ join_column

const JoinColumn* JoinColumnIterator::join_column

Definition at line 21 of file JoinColumnIterator.h.

◆ start

size_t JoinColumnIterator::start

◆ step

size_t JoinColumnIterator::step

Definition at line 29 of file JoinColumnIterator.h.

Referenced by JoinColumnIterator(), and operator++().

◆ type_info

const JoinColumnTypeInfo* JoinColumnIterator::type_info

Definition at line 22 of file JoinColumnIterator.h.


The documentation for this struct was generated from the following file: