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

Widen every cooperative shared-staging copy in a subtree to the widest legal vector transfer. More...

#include <sdfg/tiles/transformations/tile_vectorizer.h>

Inheritance diagram for sdfg::transformations::TileVectorizer:
[legend]

Public Member Functions

 TileVectorizer (structured_control_flow::StructuredLoop &loop)
virtual std::string name () const override
 Get the name of this transformation.
virtual bool can_be_applied (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
 Check if this transformation can be safely applied.
virtual void apply (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
 Apply this transformation to the SDFG.
virtual void to_json (nlohmann::json &j) const override
 Serialize this transformation to JSON.
Public Member Functions inherited from sdfg::transformations::Transformation
virtual ~Transformation ()=default
virtual void set_report (PassReportConsumer *report)
 Set the report consumer for transformation feedback.
virtual bool try_apply (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager)
 Attempt to apply the transformation if possible.

Static Public Member Functions

static TileVectorizer from_json (builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)

Additional Inherited Members

Protected Attributes inherited from sdfg::transformations::Transformation
PassReportConsumer * report_ = nullptr

Detailed Description

Widen every cooperative shared-staging copy in a subtree to the widest legal vector transfer.

Runs after LocalStorage (which emits a scalar tiles::TileCopyNode) and, optionally, after SoftwarePipelining (which flips the node's atom to cp.async). For each tiles::TileCopyNode it widens the transfer — a ScalarSync copy becomes VectorSync, a CpAsync copy keeps its atom — whenever the copied run is provably contiguous and aligned (derived from the plan layouts). Pipelined regions have their tiles::PipelineWaitNode loads_per_group recomputed from the widened cp.async widths so the vmcnt fence stays correct.

This is the single place vectorization happens; it is always safe to run (a no-op when nothing widens).

Constructor & Destructor Documentation

◆ TileVectorizer()

sdfg::transformations::TileVectorizer::TileVectorizer ( structured_control_flow::StructuredLoop & loop)
explicit

Member Function Documentation

◆ apply()

virtual void sdfg::transformations::TileVectorizer::apply ( builder::StructuredSDFGBuilder & builder,
analysis::AnalysisManager & analysis_manager )
overridevirtual

Apply this transformation to the SDFG.

Parameters
builderThe SDFG builder
analysis_managerThe analysis manager (may be invalidated)

Implements sdfg::transformations::Transformation.

◆ can_be_applied()

virtual bool sdfg::transformations::TileVectorizer::can_be_applied ( builder::StructuredSDFGBuilder & builder,
analysis::AnalysisManager & analysis_manager )
overridevirtual

Check if this transformation can be safely applied.

Parameters
builderThe SDFG builder
analysis_managerThe analysis manager providing necessary analyses
Returns
true if all preconditions are met

Implements sdfg::transformations::Transformation.

◆ from_json()

TileVectorizer sdfg::transformations::TileVectorizer::from_json ( builder::StructuredSDFGBuilder & builder,
const nlohmann::json & j )
static

◆ name()

virtual std::string sdfg::transformations::TileVectorizer::name ( ) const
overridevirtual

Get the name of this transformation.

Returns
The transformation name (e.g., "LoopInterchange")

Implements sdfg::transformations::Transformation.

◆ to_json()

virtual void sdfg::transformations::TileVectorizer::to_json ( nlohmann::json & j) const
overridevirtual

Serialize this transformation to JSON.

Parameters
jJSON object to populate with transformation description
Exceptions
std::logic_errorif not implemented

Implements sdfg::transformations::Transformation.


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