OmniSciDB  085a039ca4
 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 181 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 182 of file HashJoinKeyHandlers.h.

186  : is_compressed_(is_compressed)
187  , key_dims_count_(key_dims_count)
188  , join_column_(join_column)
189  , 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 230 of file HashJoinKeyHandlers.h.

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

Definition at line 228 of file HashJoinKeyHandlers.h.

References join_column_.

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

Definition at line 226 of file HashJoinKeyHandlers.h.

References key_dims_count_.

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

Definition at line 224 of file HashJoinKeyHandlers.h.

224 { 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 192 of file HashJoinKeyHandlers.h.

References bucket_sizes_for_dimension_, Geospatial::decompress_latitude_coord_geoint32(), Geospatial::decompress_longitude_coord_geoint32(), anonymous_namespace{Utm.h}::f, fixed_width_double_decode_noinline(), fixed_width_int_decode_noinline(), is_compressed_, key_dims_count_, JoinColumnIterator::ptr(), and SUFFIX.

194  {
195  double coords[2];
196 
197  if (is_compressed_) {
200  join_column_iterators->ptr(), /*byte_width=*/4, 0));
203  join_column_iterators->ptr(), /*byte_width=*/4, 1));
204  } else {
205  coords[0] =
206  SUFFIX(fixed_width_double_decode_noinline)(join_column_iterators->ptr(), 0);
207  coords[1] =
208  SUFFIX(fixed_width_double_decode_noinline)(join_column_iterators->ptr(), 1);
209  }
210 
211  const auto x_bucket_sz = bucket_sizes_for_dimension_[0];
212  const auto y_bucket_sz = bucket_sizes_for_dimension_[1];
213 
214  key_scratch_buff[0] = floor(coords[0] * x_bucket_sz);
215  key_scratch_buff[1] = floor(coords[1] * y_bucket_sz);
216  const auto err = f(join_column_iterators[0].index, key_scratch_buff, key_dims_count_);
217  if (err) {
218  return err;
219  }
220 
221  return 0;
222  }
const size_t key_dims_count_
DEVICE double decompress_latitude_coord_geoint32(const int32_t compressed)
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
#define SUFFIX(name)
const double * bucket_sizes_for_dimension_
constexpr double f
Definition: Utm.h:31
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
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 235 of file HashJoinKeyHandlers.h.

Referenced by operator()().

const bool RangeKeyHandler::is_compressed_

Definition at line 232 of file HashJoinKeyHandlers.h.

Referenced by operator()().

const JoinColumn* RangeKeyHandler::join_column_

Definition at line 234 of file HashJoinKeyHandlers.h.

Referenced by get_join_columns().

const size_t RangeKeyHandler::key_dims_count_

Definition at line 233 of file HashJoinKeyHandlers.h.

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


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