OmniSciDB  2b310ab3b2
 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 157 of file SpeculativeTopN.cpp.

References blacklist_, CHECK(), and mutex_.

Referenced by RelAlgExecutor::executeSort().

158  {
159  std::lock_guard<std::mutex> lock(mutex_);
160  for (const auto& e : blacklist_) {
161  CHECK(!(*e.first == *expr) || e.second != desc);
162  }
163  blacklist_.emplace_back(expr, desc);
164 }
CHECK(cgen_state)
std::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_

+ Here is the call graph for this function:

+ 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 166 of file SpeculativeTopN.cpp.

References blacklist_, and mutex_.

Referenced by RelAlgExecutor::createSortInputWorkUnit().

167  {
168  std::lock_guard<std::mutex> lock(mutex_);
169  for (const auto& e : blacklist_) {
170  if (*e.first == *expr && e.second == desc) {
171  return true;
172  }
173  }
174  return false;
175 }
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: