OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SpeculativeTopNBlacklist Class Reference

#include <SpeculativeTopN.h>

Public Member Functions

void add (const std::shared_ptr< Analyzer::Expr > expr, const bool desc)
 
bool contains (const std::shared_ptr< Analyzer::Expr > expr, const bool desc) const
 

Private Attributes

std::mutex mutex_
 
std::vector< std::pair
< std::shared_ptr
< Analyzer::Expr >, bool > > 
blacklist_
 

Detailed Description

Definition at line 96 of file SpeculativeTopN.h.

Member Function Documentation

void SpeculativeTopNBlacklist::add ( const std::shared_ptr< Analyzer::Expr expr,
const bool  desc 
)

Definition at line 159 of file SpeculativeTopN.cpp.

References blacklist_, CHECK, and mutex_.

Referenced by RelAlgExecutor::executeSort().

160  {
161  std::lock_guard<std::mutex> lock(mutex_);
162  for (const auto& e : blacklist_) {
163  CHECK(!(*e.first == *expr) || e.second != desc);
164  }
165  blacklist_.emplace_back(expr, desc);
166 }
#define CHECK(condition)
Definition: Logger.h:206
std::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_

+ Here is the caller graph for this function:

bool SpeculativeTopNBlacklist::contains ( const std::shared_ptr< Analyzer::Expr expr,
const bool  desc 
) const

Definition at line 168 of file SpeculativeTopN.cpp.

References blacklist_, and mutex_.

Referenced by RelAlgExecutor::createSortInputWorkUnit().

169  {
170  std::lock_guard<std::mutex> lock(mutex_);
171  for (const auto& e : blacklist_) {
172  if (*e.first == *expr && e.second == desc) {
173  return true;
174  }
175  }
176  return false;
177 }
std::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<std::pair<std::shared_ptr<Analyzer::Expr>, bool> > SpeculativeTopNBlacklist::blacklist_
private

Definition at line 103 of file SpeculativeTopN.h.

Referenced by add(), and contains().

std::mutex SpeculativeTopNBlacklist::mutex_
mutableprivate

Definition at line 102 of file SpeculativeTopN.h.

Referenced by add(), and contains().


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