OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
JoinColumnIterator
operator++ ()
 
DEVICE FORCE_INLINE
JoinColumnIterator
operator-- ()
 
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
 
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

DEVICE JoinColumnIterator::JoinColumnIterator ( )
inline

Definition at line 105 of file JoinColumnIterator.h.

105 : chunk_data(nullptr) {}
const int8_t * chunk_data
DEVICE JoinColumnIterator::JoinColumnIterator ( const JoinColumn join_column,
const JoinColumnTypeInfo type_info,
size_t  start,
size_t  step 
)
inline

Definition at line 107 of file JoinColumnIterator.h.

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

112  : join_column(join_column)
113  , type_info(type_info)
115  reinterpret_cast<const struct JoinChunk*>(join_column->col_chunks_buff))
116  , chunk_data(join_column->num_elems > 0 ? join_chunk_array->col_buff : nullptr)
117  , index_of_chunk(0)
118  , index_inside_chunk(0)
119  , index(0)
120  , start(start)
121  , step(step) {
122  // Stagger the index differently for each thread iterating over the column.
123  auto temp = this->step;
124  this->step = this->start;
125  operator++();
126  this->step = temp;
127  }
const int8_t * chunk_data
struct JoinChunk * join_chunk_array
size_t num_elems
const int8_t * col_buff
const JoinColumn * join_column
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

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, type_info, 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:91
const size_t elem_sz
#define SUFFIX(name)
#define NULL_INT
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:98
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:149
#define CHECK(condition)
Definition: Logger.h:291
#define NULL_SMALLINT
DEVICE NEVER_INLINE double SUFFIX() fixed_width_double_decode_noinline(const int8_t *byte_stream, const int64_t pos)
Definition: DecodersImpl.h:134
const JoinColumnTypeInfo * type_info

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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
DEVICE FORCE_INLINE IndexedElement JoinColumnIterator::operator* ( ) const
inline

Definition at line 69 of file JoinColumnIterator.h.

References getElementSwitch(), and index.

69  {
70  return {index, getElementSwitch()};
71  }
DEVICE FORCE_INLINE int64_t getElementSwitch() const

+ Here is the call graph for this function:

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

Definition at line 73 of file JoinColumnIterator.h.

References chunk_data, JoinChunk::col_buff, index, index_inside_chunk, index_of_chunk, join_chunk_array, 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
struct JoinChunk * join_chunk_array
const int8_t * col_buff
size_t num_elems

+ Here is the caller graph for this function:

DEVICE FORCE_INLINE JoinColumnIterator& JoinColumnIterator::operator-- ( )
inline

Definition at line 89 of file JoinColumnIterator.h.

References chunk_data, JoinChunk::col_buff, index, index_inside_chunk, index_of_chunk, join_chunk_array, JoinChunk::num_elems, and step.

89  {
90  index -= step;
92  while (chunk_data &&
96  if (index_of_chunk < join_column->num_chunks) {
98  } else {
99  chunk_data = nullptr;
100  }
101  }
102  return *this;
103  }
const int8_t * chunk_data
struct JoinChunk * join_chunk_array
const int8_t * col_buff
size_t num_elems
DEVICE FORCE_INLINE const int8_t* JoinColumnIterator::ptr ( ) const
inline

Definition at line 33 of file JoinColumnIterator.h.

References chunk_data, JoinColumn::elem_sz, index_inside_chunk, and join_column.

Referenced by compute_bucket_sizes_impl(), BoundingBoxIntersectKeyHandler::operator()(), and RangeKeyHandler::operator()().

33  {
35  }
const int8_t * chunk_data
const JoinColumn * join_column

+ Here is the caller graph for this function:

Member Data Documentation

const int8_t* JoinColumnIterator::chunk_data

Definition at line 24 of file JoinColumnIterator.h.

Referenced by getElementSwitch(), operator bool(), operator++(), operator--(), and ptr().

size_t JoinColumnIterator::index

Definition at line 27 of file JoinColumnIterator.h.

Referenced by operator*(), operator++(), and operator--().

size_t JoinColumnIterator::index_inside_chunk

Definition at line 26 of file JoinColumnIterator.h.

Referenced by getElementSwitch(), operator++(), operator--(), and ptr().

size_t JoinColumnIterator::index_of_chunk

Definition at line 25 of file JoinColumnIterator.h.

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

struct JoinChunk* JoinColumnIterator::join_chunk_array

Definition at line 23 of file JoinColumnIterator.h.

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

const JoinColumn* JoinColumnIterator::join_column

Definition at line 21 of file JoinColumnIterator.h.

Referenced by ptr().

size_t JoinColumnIterator::step

Definition at line 29 of file JoinColumnIterator.h.

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

const JoinColumnTypeInfo* JoinColumnIterator::type_info

Definition at line 22 of file JoinColumnIterator.h.

Referenced by getElementSwitch().


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