|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Builds the dataflow of one block from expressions. More...
#include <sdfg/fp_math/contractions/kernel_builder.h>
Public Member Functions | |
| BlockBuilder (builder::StructuredSDFGBuilder &builder, structured_control_flow::Block &block, DebugInfo debug_info) | |
| structured_control_flow::Block & | block () |
| 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. | |
| KernelValue | constant (double value, types::PrimitiveType type) |
| KernelValue | convert (const KernelValue &value, types::PrimitiveType type) |
Converts value to type; a value already of that type is returned as is. | |
| KernelValue | op (data_flow::TaskletCode code, const std::vector< KernelValue > &inputs, types::PrimitiveType type) |
| KernelValue | cmath (math::cmath::CMathFunction function, const std::vector< KernelValue > &inputs, 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. | |
| 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. | |
Builds the dataflow of one block from expressions.
Every operation writes its result to a new transient scalar, so values combine freely, e.g. store(op(fp_mul, {read("x", {i}), constant(2.0, Double)}, Double), "y", {i}).
| sdfg::fp_math::BlockBuilder::BlockBuilder | ( | builder::StructuredSDFGBuilder & | builder, |
| structured_control_flow::Block & | block, | ||
| DebugInfo | debug_info ) |
|
inline |
| KernelValue sdfg::fp_math::BlockBuilder::cmath | ( | math::cmath::CMathFunction | function, |
| const std::vector< KernelValue > & | inputs, | ||
| types::PrimitiveType | type ) |
| KernelValue sdfg::fp_math::BlockBuilder::constant | ( | double | value, |
| types::PrimitiveType | type ) |
| KernelValue sdfg::fp_math::BlockBuilder::convert | ( | const KernelValue & | value, |
| types::PrimitiveType | type ) |
Converts value to type; a value already of that type is returned as is.
| KernelValue sdfg::fp_math::BlockBuilder::op | ( | data_flow::TaskletCode | code, |
| const std::vector< KernelValue > & | inputs, | ||
| types::PrimitiveType | type ) |
| KernelValue sdfg::fp_math::BlockBuilder::read | ( | const std::string & | container, |
| const data_flow::Subset & | subset = {} ) |
Reads a scalar container, or the element at subset of a pointer container.
| KernelValue sdfg::fp_math::BlockBuilder::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.
| void sdfg::fp_math::BlockBuilder::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.
| void sdfg::fp_math::BlockBuilder::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.