OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HashTypeCache Class Reference

#include <BaselineJoinHashTable.h>

Static Public Member Functions

static void set (const std::vector< ChunkKey > &key, const JoinHashTableInterface::HashType hash_type)
 
static std::pair
< JoinHashTableInterface::HashType,
bool > 
get (const std::vector< ChunkKey > &key)
 

Static Private Attributes

static std::map< std::vector
< ChunkKey >
, JoinHashTableInterface::HashType
hash_type_cache_
 
static std::mutex hash_type_cache_mutex_
 

Detailed Description

Definition at line 300 of file BaselineJoinHashTable.h.

Member Function Documentation

std::pair< JoinHashTableInterface::HashType, bool > HashTypeCache::get ( const std::vector< ChunkKey > &  key)
static

Definition at line 1368 of file BaselineJoinHashTable.cpp.

References hash_type_cache_, hash_type_cache_mutex_, and JoinHashTableInterface::OneToOne.

Referenced by BaselineJoinHashTable::reify().

1369  {
1370  std::lock_guard<std::mutex> hash_type_cache_lock(hash_type_cache_mutex_);
1371  const auto it = hash_type_cache_.find(key);
1372  if (it == hash_type_cache_.end()) {
1374  }
1375  return {it->second, true};
1376 }
static std::map< std::vector< ChunkKey >, JoinHashTableInterface::HashType > hash_type_cache_
static std::mutex hash_type_cache_mutex_

+ Here is the caller graph for this function:

void HashTypeCache::set ( const std::vector< ChunkKey > &  key,
const JoinHashTableInterface::HashType  hash_type 
)
static

Definition at line 1356 of file BaselineJoinHashTable.cpp.

References CHECK_GE, hash_type_cache_, and hash_type_cache_mutex_.

Referenced by BaselineJoinHashTable::reify().

1357  {
1358  for (auto chunk_key : key) {
1359  CHECK_GE(chunk_key.size(), size_t(2));
1360  if (chunk_key[1] < 0) {
1361  return;
1362  }
1363  }
1364  std::lock_guard<std::mutex> hash_type_cache_lock(hash_type_cache_mutex_);
1365  hash_type_cache_[key] = hash_type;
1366 }
static std::map< std::vector< ChunkKey >, JoinHashTableInterface::HashType > hash_type_cache_
static std::mutex hash_type_cache_mutex_
#define CHECK_GE(x, y)
Definition: Logger.h:210

+ Here is the caller graph for this function:

Member Data Documentation

std::map< std::vector< ChunkKey >, JoinHashTableInterface::HashType > HashTypeCache::hash_type_cache_
staticprivate

Definition at line 310 of file BaselineJoinHashTable.h.

Referenced by get(), and set().

std::mutex HashTypeCache::hash_type_cache_mutex_
staticprivate

Definition at line 311 of file BaselineJoinHashTable.h.

Referenced by get(), and set().


The documentation for this class was generated from the following files: