OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RangeKeyHandler Struct Reference

#include <HashJoinKeyHandlers.h>

+ Collaboration diagram for RangeKeyHandler:

Public Member Functions

 RangeKeyHandler (const bool is_compressed, const size_t key_dims_count, const JoinColumn *join_column, const double *bucket_sizes_for_dimension)
 
template<typename T , typename KEY_BUFF_HANDLER >
DEVICE int operator() (JoinColumnIterator *join_column_iterators, T *key_scratch_buff, KEY_BUFF_HANDLER f) const
 
DEVICE size_t get_number_of_columns () const
 
DEVICE size_t get_key_component_count () const
 
DEVICE const JoinColumnget_join_columns () const
 
DEVICE const JoinColumnTypeInfoget_join_column_type_infos () const
 

Public Attributes

const bool is_compressed_
 
const size_t key_dims_count_
 
const JoinColumnjoin_column_
 
const double * bucket_sizes_for_dimension_
 

Detailed Description

Definition at line 185 of file HashJoinKeyHandlers.h.

Constructor & Destructor Documentation

RangeKeyHandler::RangeKeyHandler ( const bool  is_compressed,
const size_t  key_dims_count,
const JoinColumn join_column,
const double *  bucket_sizes_for_dimension 
)
inlineexplicit

Definition at line 186 of file HashJoinKeyHandlers.h.

190  : is_compressed_(is_compressed)
191  , key_dims_count_(key_dims_count)
192  , join_column_(join_column)
193  , bucket_sizes_for_dimension_(bucket_sizes_for_dimension) {}
const size_t key_dims_count_
const double * bucket_sizes_for_dimension_
const JoinColumn * join_column_

Member Function Documentation

DEVICE const JoinColumnTypeInfo* RangeKeyHandler::get_join_column_type_infos ( ) const
inline

Definition at line 234 of file HashJoinKeyHandlers.h.

234 { return nullptr; }
DEVICE const JoinColumn* RangeKeyHandler::get_join_columns ( ) const
inline

Definition at line 232 of file HashJoinKeyHandlers.h.

References join_column_.

232 { return join_column_; }
const JoinColumn * join_column_
DEVICE size_t RangeKeyHandler::get_key_component_count ( ) const
inline

Definition at line 230 of file HashJoinKeyHandlers.h.

References key_dims_count_.

230 { return key_dims_count_; }
const size_t key_dims_count_
DEVICE size_t RangeKeyHandler::get_number_of_columns ( ) const
inline

Definition at line 228 of file HashJoinKeyHandlers.h.

228 { return 1; }
template<typename T , typename KEY_BUFF_HANDLER >
DEVICE int RangeKeyHandler::operator() ( JoinColumnIterator join_column_iterators,
T *  key_scratch_buff,
KEY_BUFF_HANDLER  f 
) const
inline

Definition at line 196 of file HashJoinKeyHandlers.h.

References bucket_sizes_for_dimension_, Geospatial::decompress_lattitude_coord_geoint32(), Geospatial::decompress_longitude_coord_geoint32(), f, fixed_width_double_decode_noinline(), fixed_width_int_decode_noinline(), is_compressed_, key_dims_count_, JoinColumnIterator::ptr(), and SUFFIX.

198  {
199  double coords[2];
200 
201  if (is_compressed_) {
204  join_column_iterators->ptr(), /*byte_width=*/4, 0));
207  join_column_iterators->ptr(), /*byte_width=*/4, 1));
208  } else {
209  coords[0] =
210  SUFFIX(fixed_width_double_decode_noinline)(join_column_iterators->ptr(), 0);
211  coords[1] =
212  SUFFIX(fixed_width_double_decode_noinline)(join_column_iterators->ptr(), 1);
213  }
214 
215  const auto x_bucket_sz = bucket_sizes_for_dimension_[0];
216  const auto y_bucket_sz = bucket_sizes_for_dimension_[1];
217 
218  key_scratch_buff[0] = floor(coords[0] * x_bucket_sz);
219  key_scratch_buff[1] = floor(coords[1] * y_bucket_sz);
220  const auto err = f(join_column_iterators[0].index, key_scratch_buff, key_dims_count_);
221  if (err) {
222  return err;
223  }
224 
225  return 0;
226  }
const size_t key_dims_count_
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
DEVICE double decompress_lattitude_coord_geoint32(const int32_t compressed)
#define SUFFIX(name)
const double * bucket_sizes_for_dimension_
DEVICE double decompress_longitude_coord_geoint32(const int32_t compressed)
DEVICE NEVER_INLINE double SUFFIX() fixed_width_double_decode_noinline(const int8_t *byte_stream, const int64_t pos)
Definition: DecodersImpl.h:134
char * f
DEVICE FORCE_INLINE const int8_t * ptr() const

+ Here is the call graph for this function:

Member Data Documentation

const double* RangeKeyHandler::bucket_sizes_for_dimension_

Definition at line 239 of file HashJoinKeyHandlers.h.

Referenced by operator()().

const bool RangeKeyHandler::is_compressed_

Definition at line 236 of file HashJoinKeyHandlers.h.

Referenced by operator()().

const JoinColumn* RangeKeyHandler::join_column_

Definition at line 238 of file HashJoinKeyHandlers.h.

Referenced by get_join_columns().

const size_t RangeKeyHandler::key_dims_count_

Definition at line 237 of file HashJoinKeyHandlers.h.

Referenced by get_key_component_count(), and operator()().


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