docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::einsum::EinsumExpansion Class Reference

Visitor that expands the EinsumNode with the legacy expand() method. More...

#include <sdfg/einsum/passes/einsum_passes.h>

Inheritance diagram for sdfg::einsum::EinsumExpansion:
[legend]

Public Member Functions

 EinsumExpansion (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager)
 Construct the expansion visitor.
bool accept (structured_control_flow::Block &node) override
 Visit a block and attempt to expand its library nodes.
Public Member Functions inherited from sdfg::visitor::StructuredSDFGVisitor
 StructuredSDFGVisitor (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager)
virtual ~StructuredSDFGVisitor ()=default
virtual bool visit ()
virtual bool accept (structured_control_flow::AssignmentBlock &node)
virtual bool accept (structured_control_flow::Sequence &node)
virtual bool accept (structured_control_flow::Return &node)
virtual bool accept (structured_control_flow::IfElse &node)
virtual bool accept (structured_control_flow::For &node)
virtual bool accept (structured_control_flow::While &node)
virtual bool accept (structured_control_flow::Continue &node)
virtual bool accept (structured_control_flow::Break &node)
virtual bool accept (structured_control_flow::Map &node)
virtual bool accept (structured_control_flow::Reduce &node)

Static Public Member Functions

static std::string name ()
 Get the pass name.

Additional Inherited Members

Protected Member Functions inherited from sdfg::visitor::StructuredSDFGVisitor
virtual bool visit_internal (structured_control_flow::Sequence &parent)
Protected Attributes inherited from sdfg::visitor::StructuredSDFGVisitor
builder::StructuredSDFGBuilder & builder_
analysis::AnalysisManager & analysis_manager_

Detailed Description

Visitor that expands the EinsumNode with the legacy expand() method.

The Expansion visitor traverses the SDFG and expands library nodes that have ImplementationType_NONE. After the first expand, it cuts its traversal, requiring another run to get to further relevant nodes in the same block.

This is a workaround for Einsum. The other MathNode.expand() impls have been migrated to a new pass with an API that would allow splitting Blocks up as part of replacement, but in a generic way. Once the logic of EinsumNode to do this has been integrated into that generic pass, EinsumNode can also be migrated and all expansions will have access to the same logic.

Constructor & Destructor Documentation

◆ EinsumExpansion()

sdfg::einsum::EinsumExpansion::EinsumExpansion ( builder::StructuredSDFGBuilder & builder,
analysis::AnalysisManager & analysis_manager )

Construct the expansion visitor.

Parameters
builderSDFG builder for creating new nodes
analysis_managerAnalysis manager for querying properties

Member Function Documentation

◆ accept()

bool sdfg::einsum::EinsumExpansion::accept ( structured_control_flow::Block & node)
overridevirtual

Visit a block and attempt to expand its library nodes.

Parameters
nodeBlock to visit
Returns
True if any expansion occurred

Reimplemented from sdfg::visitor::StructuredSDFGVisitor.

◆ name()

std::string sdfg::einsum::EinsumExpansion::name ( )
inlinestatic

Get the pass name.

Returns
Name of the pass

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