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

Classifies parallelizable For loops and lowers them to Map or Reduce. More...

#include <sdfg/parallelization/passes/auto_parallelization.h>

Inheritance diagram for sdfg::parallelization::AutoParallelization:
[legend]

Public Types

enum class  Classification { None , Map , Reduce }

Public Member Functions

Classification classify (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager, structured_control_flow::For &for_stmt, std::vector< structured_control_flow::ReductionInfo > &reductions)
virtual std::string name () override
virtual bool run_pass (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Public Member Functions inherited from sdfg::passes::Pass
 Pass ()=default
 Pass (const Options &options)
virtual ~Pass ()=default
virtual std::vector< OptionSpec > options ()
bool run (builder::SDFGBuilder &builder, bool create_report=false)
bool run (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager, bool create_report=false)
virtual bool run_pass (builder::SDFGBuilder &builder)
virtual void invalidates (analysis::AnalysisManager &analysis_manager, bool applied)

Additional Inherited Members

Protected Member Functions inherited from sdfg::passes::Pass
template<class T>
T option (const OptionKey< T > &key, T fallback=T{}) const

Detailed Description

Classifies parallelizable For loops and lowers them to Map or Reduce.

A For loop is examined against a single shared set of legality criteria (monotonic bound, no side effects, no early Return, induction variable dead after the loop, false dependencies confined to loop-local storage). The only thing that distinguishes the two outcomes is how the loop's loop-carried read-write dependencies are resolved:

  • none -> the iterations are independent -> Map
  • all reductions -> the only carried dependencies are reorderable accumulations (recognized by the loop-carried dependency analysis) -> Reduce
  • otherwise -> a genuine hazard remains; the loop is left as a For.

Member Enumeration Documentation

◆ Classification

Enumerator
None 
Map 
Reduce 

Member Function Documentation

◆ classify()

Classification sdfg::parallelization::AutoParallelization::classify ( builder::StructuredSDFGBuilder & builder,
analysis::AnalysisManager & analysis_manager,
structured_control_flow::For & for_stmt,
std::vector< structured_control_flow::ReductionInfo > & reductions )

◆ name()

virtual std::string sdfg::parallelization::AutoParallelization::name ( )
overridevirtual

Implements sdfg::passes::Pass.

◆ run_pass()

virtual bool sdfg::parallelization::AutoParallelization::run_pass ( builder::StructuredSDFGBuilder & builder,
analysis::AnalysisManager & analysis_manager )
overridevirtual

Reimplemented from sdfg::passes::Pass.


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