4#include <unordered_map>
29 std::unordered_set<const Element*>
nodes_;
34 std::vector<const structured_control_flow::ControlFlowNode*>
members;
49 const std::unordered_set<const Element*>& nodes,
50 bool emit_finalize_all =
true,
94 return it ==
logical_region_ids_.end() ? std::nullopt : std::optional<ElementId>(it->second);
103 return result.has_value() ? result->expected_performance : std::nullopt;
108 return result.has_value() ? result->vector_distance : std::nullopt;
122 static std::unique_ptr<InstrumentationPlan>
125 static std::unique_ptr<InstrumentationPlan>
Definition structured_sdfg.h:30
Definition instrumentation_info.h:37
std::optional< ElementId > source_loop_id(const Element &node) const
Definition instrumentation_plan.h:97
bool emit_finalize_all_
Definition instrumentation_plan.h:42
bool sampling() const
Definition instrumentation_plan.h:66
InstrumentationPlan & operator=(const InstrumentationPlan &other)=delete
InstrumentationPlan & operator=(InstrumentationPlan &&other)=delete
InstrumentationPlan(const InstrumentationPlan &other)=delete
InstrumentationPlan(InstrumentationPlan &&other)=delete
std::optional< ElementId > logical_region_id(const Element &node) const
Definition instrumentation_plan.h:92
void begin_instrumentation(const Element &node, PrettyPrinter &stream, LanguageExtension &language_extension, const InstrumentationInfo &info) const
bool should_instrument(const Element &node) const
void end_instrumentation(const Element &node, PrettyPrinter &stream, LanguageExtension &language_extension, const InstrumentationInfo &info) const
void leaving_instrumentation_function(PrettyPrinter &stream, LanguageExtension &language_extension) const
std::unordered_map< const Element *, ElementId > logical_region_ids_
Definition instrumentation_plan.h:30
InstrumentationPlan(StructuredSDFG &sdfg, const std::unordered_set< const Element * > &nodes, bool emit_finalize_all=true, bool sampling=false)
Definition instrumentation_plan.h:47
static std::unique_ptr< InstrumentationPlan > provenance_grouped_outermost_loops_plan(StructuredSDFG &sdfg, bool emit_finalize_all=true, bool sampling=false)
bool is_group_member(const structured_control_flow::ControlFlowNode &node) const
Definition instrumentation_plan.h:116
StructuredSDFG & sdfg_
Definition instrumentation_plan.h:28
void insert(const Element *node)
Definition instrumentation_plan.h:88
static std::unique_ptr< InstrumentationPlan > outermost_loops_plan(StructuredSDFG &sdfg, bool emit_finalize_all=true, bool sampling=false)
bool is_empty() const
Definition instrumentation_plan.h:62
std::optional< nlohmann::json > expected_performance(const Element &node) const
Definition instrumentation_plan.h:101
std::unordered_set< const Element * > nodes_
Definition instrumentation_plan.h:29
std::vector< GroupSpan > group_spans_
Definition instrumentation_plan.h:36
static std::unique_ptr< InstrumentationPlan > none(StructuredSDFG &sdfg)
const GroupSpan * group_span_starting_at(const structured_control_flow::ControlFlowNode &node) const
Definition instrumentation_plan.h:111
std::optional< double > vector_distance(const Element &node) const
Definition instrumentation_plan.h:106
std::unordered_map< const structured_control_flow::ControlFlowNode *, size_t > group_start_by_node_
Definition instrumentation_plan.h:37
bool sampling_
Definition instrumentation_plan.h:44
std::unordered_set< const structured_control_flow::ControlFlowNode * > grouped_members_
Definition instrumentation_plan.h:38
Definition language_extension.h:39
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44
A sequential container of control flow nodes.
Definition sequence.h:52
Library node definitions for calling functions beyond simple instructions.
Definition argument_registry.h:10
constexpr OptionKey< bool > INSTRUMENTATION_ADAPTIVE_SAMPLING
Definition instrumentation_plan.h:24
size_t ElementId
Definition element.h:215
Definition instrumentation_plan.h:31
std::vector< const structured_control_flow::ControlFlowNode * > members
Definition instrumentation_plan.h:34
const structured_control_flow::Sequence * sequence
Definition instrumentation_plan.h:33
ElementId source_loop_id
Definition instrumentation_plan.h:32
Symbolic system for integer-based symbol analysis.