docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
reduction_analysis.h File Reference

Reduction-ownership queries for localization: which Reduce nodes accumulate into a container relative to a loop scope, and whether that reduction can be privatized into a local buffer. More...

#include <string>
#include <vector>
#include "sdfg/analysis/analysis.h"
#include "sdfg/structured_control_flow/reduce.h"
#include "sdfg/structured_control_flow/structured_loop.h"

Go to the source code of this file.

Namespaces

namespace  sdfg
namespace  sdfg::tiles

Functions

bool sdfg::tiles::is_reduction_accumulator (structured_control_flow::StructuredLoop &loop, const std::string &container, analysis::AnalysisManager &analysis_manager)
 Whether container is the accumulator of a Reduce enclosing, nested within, or equal to loop.
bool sdfg::tiles::collect_reduction_owners (structured_control_flow::StructuredLoop &loop, const std::string &container, analysis::AnalysisManager &analysis_manager, std::vector< structured_control_flow::Reduce * > &out)
 Collect the non-cooperative Reduce nodes (loop or a descendant) that reduce into container, for accumulator privatization.
std::vector< structured_control_flow::Reduce * > sdfg::tiles::collect_grid_reduction_owners (structured_control_flow::StructuredLoop &loop, const std::string &container, analysis::AnalysisManager &analysis_manager)
 Collect grid-parallel (GPU-offloaded) ancestor Reduce nodes reducing into container.

Detailed Description

Reduction-ownership queries for localization: which Reduce nodes accumulate into a container relative to a loop scope, and whether that reduction can be privatized into a local buffer.

A reduction accumulator is combined either sequentially (safe to privatize + writeback) or cooperatively across threads (owned by the reduce dispatcher — not localizable). These queries encode that distinction; see the module README.