OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker Class Reference

Public Member Functions

 AvailabilityChecker (const std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t >> &liveouts, const std::unordered_set< const RelAlgNode * > &intact_nodes)
 
bool hasAllSrcReady (const RelAlgNode *node) const
 

Private Attributes

const std::unordered_map
< const RelAlgNode
*, std::unordered_map< size_t,
size_t > > & 
liveouts_
 
const std::unordered_set
< const RelAlgNode * > & 
intact_nodes_
 

Detailed Description

Definition at line 773 of file RelAlgOptimizer.cpp.

Constructor & Destructor Documentation

anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::AvailabilityChecker ( const std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t >> &  liveouts,
const std::unordered_set< const RelAlgNode * > &  intact_nodes 
)
inline

Definition at line 775 of file RelAlgOptimizer.cpp.

779  : liveouts_(liveouts), intact_nodes_(intact_nodes) {}
const std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t > > & liveouts_
const std::unordered_set< const RelAlgNode * > & intact_nodes_

Member Function Documentation

bool anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady ( const RelAlgNode node) const
inline

Definition at line 781 of file RelAlgOptimizer.cpp.

References RelAlgNode::getInput(), and RelAlgNode::inputCount().

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::propagate_input_renumbering(), and anonymous_namespace{RelAlgOptimizer.cpp}::sweep_dead_columns().

781  {
782  for (size_t i = 0; i < node->inputCount(); ++i) {
783  auto src = node->getInput(i);
784  if (!dynamic_cast<const RelScan*>(src) && liveouts_.find(src) == liveouts_.end() &&
785  !intact_nodes_.count(src)) {
786  return false;
787  }
788  }
789  return true;
790  }
const std::unordered_map< const RelAlgNode *, std::unordered_map< size_t, size_t > > & liveouts_
const RelAlgNode * getInput(const size_t idx) const
Definition: RelAlgDag.h:877
const std::unordered_set< const RelAlgNode * > & intact_nodes_
const size_t inputCount() const
Definition: RelAlgDag.h:875

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

const std::unordered_set<const RelAlgNode*>& anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::intact_nodes_
private

Definition at line 795 of file RelAlgOptimizer.cpp.

const std::unordered_map<const RelAlgNode*, std::unordered_map<size_t, size_t> >& anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::liveouts_
private

Definition at line 794 of file RelAlgOptimizer.cpp.


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