OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OverlapsHashTableCacheKey Struct Reference

#include <OverlapsJoinHashTable.h>

Public Member Functions

bool operator== (const struct OverlapsHashTableCacheKey &that) const
 
 OverlapsHashTableCacheKey (const size_t num_elements, const std::vector< ChunkKey > &chunk_keys, const SQLOps &optype, const size_t max_hashtable_size, const double bucket_threshold, const std::vector< double > inverse_bucket_sizes={})
 
 OverlapsHashTableCacheKey (const OverlapsHashTableCacheKey &that, const size_t max_hashtable_size, const double bucket_threshold, const std::vector< double > &inverse_bucket_sizes={})
 

Public Attributes

const size_t num_elements
 
const std::vector< ChunkKeychunk_keys
 
const SQLOps optype
 
const size_t max_hashtable_size
 
const double bucket_threshold
 
const std::vector< double > inverse_bucket_sizes
 

Detailed Description

Definition at line 24 of file OverlapsJoinHashTable.h.

Constructor & Destructor Documentation

OverlapsHashTableCacheKey::OverlapsHashTableCacheKey ( const size_t  num_elements,
const std::vector< ChunkKey > &  chunk_keys,
const SQLOps optype,
const size_t  max_hashtable_size,
const double  bucket_threshold,
const std::vector< double >  inverse_bucket_sizes = {} 
)
inline
OverlapsHashTableCacheKey::OverlapsHashTableCacheKey ( const OverlapsHashTableCacheKey that,
const size_t  max_hashtable_size,
const double  bucket_threshold,
const std::vector< double > &  inverse_bucket_sizes = {} 
)
inline

Member Function Documentation

bool OverlapsHashTableCacheKey::operator== ( const struct OverlapsHashTableCacheKey that) const
inline

Definition at line 32 of file OverlapsJoinHashTable.h.

References bucket_threshold, chunk_keys, i, inverse_bucket_sizes, max_hashtable_size, num_elements, and optype.

32  {
33  if (inverse_bucket_sizes.size() != that.inverse_bucket_sizes.size()) {
34  return false;
35  }
36  for (size_t i = 0; i < inverse_bucket_sizes.size(); i++) {
37  // bucket sizes within 10^-4 are considered close enough
38  if (std::abs(inverse_bucket_sizes[i] - that.inverse_bucket_sizes[i]) > 1e-4) {
39  return false;
40  }
41  }
42  return num_elements == that.num_elements && chunk_keys == that.chunk_keys &&
45  }
const std::vector< double > inverse_bucket_sizes
const std::vector< ChunkKey > chunk_keys

Member Data Documentation

const double OverlapsHashTableCacheKey::bucket_threshold

Definition at line 29 of file OverlapsJoinHashTable.h.

Referenced by operator==().

const std::vector<ChunkKey> OverlapsHashTableCacheKey::chunk_keys
const std::vector<double> OverlapsHashTableCacheKey::inverse_bucket_sizes

Definition at line 30 of file OverlapsJoinHashTable.h.

Referenced by operator==().

const size_t OverlapsHashTableCacheKey::max_hashtable_size

Definition at line 28 of file OverlapsJoinHashTable.h.

Referenced by operator==().

const size_t OverlapsHashTableCacheKey::num_elements

Definition at line 25 of file OverlapsJoinHashTable.h.

Referenced by operator==().

const SQLOps OverlapsHashTableCacheKey::optype

Definition at line 27 of file OverlapsJoinHashTable.h.

Referenced by operator==().


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