|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Tensor elementwise operation nodes. More...
#include "sdfg/data_flow/library_nodes/math/tensor/tensor_node.h"#include "sdfg/codegen/dispatchers/block_dispatcher.h"#include "sdfg/serializer/json_serializer.h"#include "sdfg/structured_control_flow/block.h"Go to the source code of this file.
Classes | |
| class | sdfg::math::tensor::ElementWiseDataflowTensorNode |
| Defined by each element of the output tensor (defined by shape) can be defined independently of any other output. More... | |
| struct | sdfg::math::tensor::ElementWiseDataflowTensorNode::ElementOutput |
| struct | sdfg::math::tensor::ElementWiseDataflowTensorNode::ElementInput |
| class | sdfg::math::tensor::BaseElementWiseDataflowTensorNodeSerializer |
| struct | sdfg::math::tensor::BaseElementWiseDataflowTensorNodeSerializer::BaseDeser |
| class | sdfg::math::tensor::SimpleElementWiseDataflowTensorNodeSerializer< T > |
Namespaces | |
| namespace | sdfg |
| namespace | sdfg::math |
| namespace | sdfg::math::tensor |
Tensor elementwise operation nodes.
This file defines base classes for tensor elementwise operations. Elementwise operations are mathematical operations applied independently to each element of a tensor or pair of tensors.
Tensor library nodes expect scalars or flat pointers of scalars as inputs. The tensor operation is performed with linearized indices. This means:
For example, a 2D tensor of shape [M, N] is accessed using index i*N + j where i and j are the row and column indices.
Elementwise operations include:
These operations are expanded into maps that iterate over the tensor shape with linearized indexing.
Creating an elementwise addition: