OmniSciDB  c07336695a
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::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_
 

Detailed Description

Definition at line 85 of file SpeculativeTopN.h.

Member Function Documentation

◆ add()

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

Definition at line 146 of file SpeculativeTopN.cpp.

References CHECK.

147  {
148  for (const auto e : blacklist_) {
149  CHECK(!(*e.first == *expr) || e.second != desc);
150  }
151  blacklist_.emplace_back(expr, desc);
152 }
#define CHECK(condition)
Definition: Logger.h:187
std::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_

◆ contains()

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

Definition at line 154 of file SpeculativeTopN.cpp.

155  {
156  for (const auto e : blacklist_) {
157  if (*e.first == *expr && e.second == desc) {
158  return true;
159  }
160  }
161  return false;
162 }
std::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_

Member Data Documentation

◆ blacklist_

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

Definition at line 91 of file SpeculativeTopN.h.


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