docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::passes::LibNodeExpander Class Referenceabstract

#include <sdfg/passes/expansion/lib_node_expander.h>

Inheritance diagram for sdfg::passes::LibNodeExpander:
[legend]

Classes

struct  ExpandOutcome
class  AccessNodeExpand
class  ExpandContext

Public Types

enum class  InputUse {
  Skip = 0 , Scalar , IndirectRead , IndirectWrite ,
  IndirectReadWrite
}

Public Member Functions

virtual ~LibNodeExpander ()=default
virtual const LibNodeExpander * for_lib_node (const data_flow::LibraryNode &node) const
 Prefiltering of libnodes.
virtual const data_flow::LibraryNodeCode * matched_code () const
 If this expander dispatches on a single, fixed library node code, expose it here.
virtual ExpandOutcome handle_expand (ExpandContext &context, structured_control_flow::Block &block, data_flow::LibraryNode &node) const =0

Member Enumeration Documentation

◆ InputUse

Enumerator
Skip 
Scalar 
IndirectRead 
IndirectWrite 
IndirectReadWrite 

Constructor & Destructor Documentation

◆ ~LibNodeExpander()

virtual sdfg::passes::LibNodeExpander::~LibNodeExpander ( )
virtualdefault

Member Function Documentation

◆ for_lib_node()

◆ handle_expand()

virtual ExpandOutcome sdfg::passes::LibNodeExpander::handle_expand ( ExpandContext & context,
structured_control_flow::Block & block,
data_flow::LibraryNode & node ) const
pure virtual

◆ matched_code()

virtual const data_flow::LibraryNodeCode * sdfg::passes::LibNodeExpander::matched_code ( ) const
inlinevirtual

If this expander dispatches on a single, fixed library node code, expose it here.

This lets aggregating expanders (e.g. SwitchExpander) build an efficient code -> expander map and jump straight to the right expander, instead of testing every expander linearly via for_lib_node.

Returns
the matched code, or nullptr if this expander does not dispatch purely by code.

Reimplemented in sdfg::passes::CodeLibNodeExpander< T >, sdfg::passes::CodeLibNodeExpander< math::tensor::ConvNode >, sdfg::passes::CodeLibNodeExpander< math::tensor::MatMulNode >, sdfg::passes::CodeLibNodeExpander< MatMulNode >, and sdfg::passes::CodeLibNodeExpander< OzakiMatMulNode >.


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