docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
tensor_expansion_utils.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
9#include "sdfg/types/type.h"
10
11namespace sdfg::math::tensor {
12
13// Helper structure for input access node information
15 std::string name;
16 bool is_const = false;
19
21 if (memlet) {
22 builder.remove_memlet(block, *memlet);
23 }
24 if (access_to_remove) {
25 builder.remove_node(block, *access_to_remove);
26 }
27 }
28};
29
30// Helper structure for map dimensions
36
37// Find a usable input access node for a given connector
42 data_flow::DataFlowGraph& dataflow, data_flow::LibraryNode& node, const std::string& input_conn
43);
44
45// Create a temporary variable with a given prefix and type
46std::string
47create_temp_var(builder::StructuredSDFGBuilder& builder, const std::string& prefix, int gen, const types::IType& type);
48
49// Create nested maps for each dimension in the shape
50std::vector<MapDimension> create_maps(
52 const std::vector<symbolic::Expression>& shape,
54);
55
56} // namespace sdfg::math::tensor
Access nodes for reading/writing data in the dataflow graph.
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Node representing access to a data container in the dataflow graph.
Definition access_node.h:84
Definition data_flow_graph.h:29
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106
Edge in the dataflow graph representing data movement.
Definition memlet.h:131
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
Represents a parallel map loop with configurable scheduling.
Definition map.h:47
A sequential container of control flow nodes.
Definition sequence.h:52
Abstract base interface for all types in the sdfglib type system.
Definition type.h:625
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
Library node definitions for calling functions beyond simple instructions.
Edges in the dataflow graph representing data movement.
Definition function_builder.h:10
Definition arange_node.h:8
std::vector< MapDimension > create_maps(builder::StructuredSDFGBuilder &builder, const std::vector< symbolic::Expression > &shape, structured_control_flow::Sequence &parent_seq)
std::string create_temp_var(builder::StructuredSDFGBuilder &builder, const std::string &prefix, int gen, const types::IType &type)
InputContainerInfo find_usable_input_access_node(data_flow::DataFlowGraph &dataflow, data_flow::LibraryNode &node, const std::string &input_conn)
Definition tensor_expansion_utils.h:14
void remove_old(builder::StructuredSDFGBuilder &builder, structured_control_flow::Block &block) const
Definition tensor_expansion_utils.h:20
bool is_const
Definition tensor_expansion_utils.h:16
std::string name
Definition tensor_expansion_utils.h:15
const data_flow::Memlet * memlet
Definition tensor_expansion_utils.h:17
const data_flow::AccessNode * access_to_remove
Definition tensor_expansion_utils.h:18
Definition tensor_expansion_utils.h:31
symbolic::Expression indvar
Definition tensor_expansion_utils.h:32
structured_control_flow::Sequence & seq
Definition tensor_expansion_utils.h:33
structured_control_flow::Map & loop
Definition tensor_expansion_utils.h:34
Symbolic system for integer-based symbol analysis.
Core type system definitions for sdfglib.