|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Builds loop nests over transient buffers into a sequence. More...
#include <sdfg/fp_math/contractions/kernel_builder.h>
Public Member Functions | |
| KernelBuilder (builder::StructuredSDFGBuilder &builder, structured_control_flow::Sequence &scope, DebugInfo debug_info) | |
| builder::StructuredSDFGBuilder & | builder () |
| structured_control_flow::Sequence & | scope () |
| const DebugInfo & | debug_info () const |
| std::string | scalar (const std::string &prefix, types::PrimitiveType type) |
| A new transient scalar. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| BlockBuilder | block (structured_control_flow::Sequence &scope) |
| void | finish () |
| Frees all buffers at the end of the scope. | |
Builds loop nests over transient buffers into a sequence.
Buffers are allocated where they are requested, in order, and freed by finish().
| sdfg::fp_math::KernelBuilder::KernelBuilder | ( | builder::StructuredSDFGBuilder & | builder, |
| structured_control_flow::Sequence & | scope, | ||
| DebugInfo | debug_info ) |
| BlockBuilder sdfg::fp_math::KernelBuilder::block | ( | structured_control_flow::Sequence & | scope | ) |
| std::string sdfg::fp_math::KernelBuilder::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.
|
inline |
|
inline |
| void sdfg::fp_math::KernelBuilder::finish | ( | ) |
Frees all buffers at the end of the scope.
| structured_control_flow::StructuredLoop & sdfg::fp_math::KernelBuilder::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.
| structured_control_flow::StructuredLoop & sdfg::fp_math::KernelBuilder::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.
| structured_control_flow::StructuredLoop & sdfg::fp_math::KernelBuilder::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.
| std::string sdfg::fp_math::KernelBuilder::scalar | ( | const std::string & | prefix, |
| types::PrimitiveType | type ) |
A new transient scalar.
|
inline |