docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::fp_math::BlockBuilder Class 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.

Detailed Description

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}).

Constructor & Destructor Documentation

◆ BlockBuilder()

sdfg::fp_math::BlockBuilder::BlockBuilder ( builder::StructuredSDFGBuilder & builder,
structured_control_flow::Block & block,
DebugInfo debug_info )

Member Function Documentation

◆ block()

structured_control_flow::Block & sdfg::fp_math::BlockBuilder::block ( )
inline

◆ cmath()

KernelValue sdfg::fp_math::BlockBuilder::cmath ( math::cmath::CMathFunction function,
const std::vector< KernelValue > & inputs,
types::PrimitiveType type )

◆ constant()

KernelValue sdfg::fp_math::BlockBuilder::constant ( double value,
types::PrimitiveType type )

◆ convert()

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.

◆ op()

KernelValue sdfg::fp_math::BlockBuilder::op ( data_flow::TaskletCode code,
const std::vector< KernelValue > & inputs,
types::PrimitiveType type )

◆ read() [1/2]

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.

◆ read() [2/2]

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.

◆ store() [1/2]

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.

◆ store() [2/2]

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.


The documentation for this class was generated from the following file: