MatcherPass is a basic block for pattern based transformations. It describes pattern and action that is applied if pattern is matched. More...
#include <graph_rewrite.hpp>


Public Member Functions | |
| MatcherPass (const MatcherPass &)=delete | |
| MatcherPass & | operator= (const MatcherPass &)=delete |
| MatcherPass (const std::string &name, const std::shared_ptr< pattern::Matcher > &m, const handler_callback &handler, const PassPropertyMask &property=PassProperty::CHANGE_DYNAMIC_STATE) | |
| bool | apply (std::shared_ptr< ngraph::Node > node) |
| template<typename T , class... Args> | |
| std::shared_ptr< T > | register_new_node (Args &&... args) |
| const std::vector< std::shared_ptr< ngraph::Node > > & | get_new_nodes () |
| void | clear_new_nodes () |
| std::shared_ptr< pattern::Matcher > | get_matcher () |
Public Member Functions inherited from ngraph::pass::PassBase | |
| bool | get_property (const PassPropertyMask &prop_mask) const |
| Check if this pass has all the pass properties. | |
| void | set_name (const std::string &name) |
| std::string | get_name () const |
| void | set_callback (const param_callback &callback) |
| Set callback for particular transformation type. This method set global callback. For more details see PassConfig class documentation. More... | |
| virtual void | set_pass_config (const std::shared_ptr< PassConfig > &pass_config) |
| Set PassConfig for particular transformation instance. More... | |
| std::shared_ptr< PassConfig > | get_pass_config () |
| Allows to access PassConfig shared instance. More... | |
| bool | m_transformation_callback (const std::shared_ptr< const Node > &node) |
| Applies callback for given node. By default callback returns false. This method remains here only for backward compatibility and will be removed after all transformations are moved to transformation_callback() method. More... | |
| bool | transformation_callback (const std::shared_ptr< const Node > &node) |
| Applies callback for given node. By default callback returns false. More... | |
| virtual const type_info_t & | get_type_info () const =0 |
Data Fields | |
| NGRAPH_RTTI_DECLARATION | |
Protected Member Functions | |
| void | register_matcher (const std::shared_ptr< pattern::Matcher > &m, const ngraph::graph_rewrite_callback &callback, const PassPropertyMask &property=PassProperty::CHANGE_DYNAMIC_STATE) |
Protected Member Functions inherited from ngraph::pass::PassBase | |
| void | set_property (const PassPropertyMask &prop, bool value) |
Additional Inherited Members | |
Public Types inherited from ngraph::pass::PassBase | |
| using | type_info_t = DiscreteTypeInfo |
MatcherPass is a basic block for pattern based transformations. It describes pattern and action that is applied if pattern is matched.
MatcherPass consists of Matcher and matcher_pass_callback that needs to be implemented and finally registered by using