OmniSciDB  2e3a973ef4
anonymous_namespace{JoinHashTableInterface.cpp}::keyed_hash Namespace Reference

Functions

template<typename T >
void to_set_one_to_one (const int8_t *ptr1, size_t entry_count, size_t key_component_count, DecodedJoinHashBufferSet &s)
 
template<typename T >
void to_set_one_to_many (const int8_t *ptr1, const int32_t *const ptr2, const int32_t *const ptr3, const int32_t *const ptr4, size_t entry_count, size_t key_component_count, DecodedJoinHashBufferSet &s)
 

Function Documentation

◆ to_set_one_to_many()

template<typename T >
void anonymous_namespace{JoinHashTableInterface.cpp}::keyed_hash::to_set_one_to_many ( const int8_t *  ptr1,
const int32_t *const  ptr2,
const int32_t *const  ptr3,
const int32_t *const  ptr4,
size_t  entry_count,
size_t  key_component_count,
DecodedJoinHashBufferSet s 
)

Definition at line 380 of file JoinHashTableInterface.cpp.

References DecodedJoinHashBufferEntry::payload.

Referenced by JoinHashTableInterface::toSet().

386  {
387  auto empty = get_empty_key<T>();
388  auto ptr = reinterpret_cast<const T*>(ptr1);
389  for (size_t e = 0; e < entry_count; ++e, ptr += key_component_count) {
390  if (*ptr == empty) {
391  continue;
392  }
393 
394  std::vector<int64_t> key;
395  size_t j = 0;
396  for (; j < key_component_count - 1; ++j) {
397  key.push_back(ptr[j]);
398  }
399 
400  int32_t offset = ptr2[e];
401 
402  int32_t count = ptr3[e];
403 
404  decltype(DecodedJoinHashBufferEntry::payload) payload;
405  for (size_t j = 0; j < static_cast<size_t>(count); ++j) {
406  payload.insert(ptr4[offset + j]);
407  }
408 
409  s.insert({std::move(key), std::move(payload)});
410  }
411 }
std::set< int32_t > payload
+ Here is the caller graph for this function:

◆ to_set_one_to_one()

template<typename T >
void anonymous_namespace{JoinHashTableInterface.cpp}::keyed_hash::to_set_one_to_one ( const int8_t *  ptr1,
size_t  entry_count,
size_t  key_component_count,
DecodedJoinHashBufferSet s 
)

Definition at line 355 of file JoinHashTableInterface.cpp.

Referenced by JoinHashTableInterface::toSet().

358  {
359  auto empty = get_empty_key<T>();
360  auto ptr = reinterpret_cast<const T*>(ptr1);
361  for (size_t e = 0; e < entry_count; ++e, ptr += key_component_count) {
362  if (*ptr == empty) {
363  continue;
364  }
365 
366  std::vector<int64_t> key;
367  size_t j = 0;
368  for (; j < key_component_count - 1; ++j) {
369  key.push_back(ptr[j]);
370  }
371 
372  std::set<int32_t> payload;
373  payload.insert(ptr[j]);
374 
375  s.insert({std::move(key), std::move(payload)});
376  }
377 }
+ Here is the caller graph for this function: