OmniSciDB  a5dc49c757
 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 187 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 188 of file HashJoinKeyHandlers.h.

192  : is_compressed_(is_compressed)
193  , key_dims_count_(key_dims_count)
194  , join_column_(join_column)
195  , 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 236 of file HashJoinKeyHandlers.h.

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

Definition at line 234 of file HashJoinKeyHandlers.h.

References join_column_.

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

Definition at line 232 of file HashJoinKeyHandlers.h.

References key_dims_count_.

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

Definition at line 230 of file HashJoinKeyHandlers.h.

230 { 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 198 of file HashJoinKeyHandlers.h.

References bucket_sizes_for_dimension_, Geospatial::decompress_latitude_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.

200  {
201  double coords[2];
202 
203  if (is_compressed_) {
206  join_column_iterators->ptr(), /*byte_width=*/4, 0));
209  join_column_iterators->ptr(), /*byte_width=*/4, 1));
210  } else {
211  coords[0] =
212  SUFFIX(fixed_width_double_decode_noinline)(join_column_iterators->ptr(), 0);
213  coords[1] =
214  SUFFIX(fixed_width_double_decode_noinline)(join_column_iterators->ptr(), 1);
215  }
216 
217  const auto x_bucket_sz = bucket_sizes_for_dimension_[0];
218  const auto y_bucket_sz = bucket_sizes_for_dimension_[1];
219 
220  key_scratch_buff[0] = floor(coords[0] * x_bucket_sz);
221  key_scratch_buff[1] = floor(coords[1] * y_bucket_sz);
222  const auto err = f(join_column_iterators[0].index, key_scratch_buff, key_dims_count_);
223  if (err) {
224  return err;
225  }
226 
227  return 0;
228  }
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_
DEVICE double decompress_longitude_coord_geoint32(const int32_t compressed)
torch::Tensor f(torch::Tensor x, torch::Tensor W_target, torch::Tensor b_target)
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 241 of file HashJoinKeyHandlers.h.

Referenced by operator()().

const bool RangeKeyHandler::is_compressed_

Definition at line 238 of file HashJoinKeyHandlers.h.

Referenced by operator()().

const JoinColumn* RangeKeyHandler::join_column_

Definition at line 240 of file HashJoinKeyHandlers.h.

Referenced by get_join_columns().

const size_t RangeKeyHandler::key_dims_count_

Definition at line 239 of file HashJoinKeyHandlers.h.

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


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