87 std::vector<std::string> buffers_;
121 const std::string& prefix,
124 const std::string& accumulator
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
Base class for computational nodes with inputs and outputs.
Definition code_node.h:88
Builds the dataflow of one block from expressions.
Definition kernel_builder.h:33
KernelValue convert(const KernelValue &value, types::PrimitiveType type)
Converts value to type; a value already of that type is returned as is.
KernelValue constant(double value, types::PrimitiveType type)
void store(const KernelValue &value, data_flow::AccessNode &node, const data_flow::Subset &subset, const types::IType &base_type)
Assigns value, converted to the target's element type, to node at subset.
KernelValue op(data_flow::TaskletCode code, const std::vector< KernelValue > &inputs, types::PrimitiveType type)
BlockBuilder(builder::StructuredSDFGBuilder &builder, structured_control_flow::Block &block, DebugInfo debug_info)
structured_control_flow::Block & block()
Definition kernel_builder.h:45
KernelValue cmath(math::cmath::CMathFunction function, const std::vector< KernelValue > &inputs, types::PrimitiveType type)
KernelValue read(data_flow::AccessNode &node, const data_flow::Subset &subset, const types::IType &base_type)
Reads node at subset through a memlet of base_type.
KernelValue read(const std::string &container, const data_flow::Subset &subset={})
Reads a scalar container, or the element at subset of a pointer container.
void store(const KernelValue &value, const std::string &container, const data_flow::Subset &subset={})
Assigns value to a scalar container, or to the element at subset of a pointer container.
structured_control_flow::StructuredLoop & map(structured_control_flow::Sequence &scope, const std::string &prefix, const symbolic::Expression &bound)
A sequential map counting from zero up to bound in scope.
const DebugInfo & debug_info() const
Definition kernel_builder.h:100
structured_control_flow::StructuredLoop & reduce(structured_control_flow::Sequence &scope, const std::string &prefix, const symbolic::Expression &bound, structured_control_flow::ReductionOperation operation, const std::string &accumulator)
A reduction counting from zero up to bound in scope, combining into accumulator with operation.
structured_control_flow::Sequence & scope()
Definition kernel_builder.h:96
builder::StructuredSDFGBuilder & builder()
Definition kernel_builder.h:92
void finish()
Frees all buffers at the end of the scope.
KernelBuilder(builder::StructuredSDFGBuilder &builder, structured_control_flow::Sequence &scope, DebugInfo debug_info)
std::string scalar(const std::string &prefix, types::PrimitiveType type)
A new transient scalar.
structured_control_flow::StructuredLoop & for_loop(structured_control_flow::Sequence &scope, const std::string &prefix, const symbolic::Expression &bound)
A for loop counting from zero up to bound in scope.
BlockBuilder block(structured_control_flow::Sequence &scope)
std::string buffer(const std::string &prefix, types::PrimitiveType type, const symbolic::Expression &count)
A new transient buffer of count elements, allocated in the scope right away.
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
A sequential container of control flow nodes.
Definition sequence.h:52
Base class for structured loop constructs.
Definition structured_loop.h:244
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
Definition function_builder.h:10
symbolic::MultiExpression Subset
Type alias for a subset specification (array of symbolic expressions).
Definition memlet.h:103
TaskletCode
Operation codes for tasklet computations.
Definition tasklet.h:94
Definition kernel_builder.h:18
CMathFunction
Enumeration of C math library functions.
Definition cmath_node.h:21
ReductionOperation
Associative and commutative reduction operators.
Definition reduce.h:29
PrimitiveType
Enumeration of all primitive data types supported by sdfglib.
Definition type.h:35
A value in a block under construction: an access node with the subset and base type of the memlet rea...
Definition kernel_builder.h:21
data_flow::Subset subset
Definition kernel_builder.h:23
data_flow::AccessNode * node
Definition kernel_builder.h:22
std::shared_ptr< types::IType > base_type
Definition kernel_builder.h:24
Simple computational operations in the dataflow graph.
Core type system definitions for sdfglib.