|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Tensor reduction operation nodes. More...
#include <optional>#include "sdfg/data_flow/library_nodes/math/tensor/tensor_node.h"#include "sdfg/codegen/dispatchers/block_dispatcher.h"#include "sdfg/serializer/json_serializer.h"Go to the source code of this file.
Classes | |
| class | sdfg::math::tensor::ReduceNode |
| Base class for tensor reduction operations. More... | |
| class | sdfg::math::tensor::ReduceNodeSerializer< T > |
Namespaces | |
| namespace | sdfg |
| namespace | sdfg::math |
| namespace | sdfg::math::tensor |
Tensor reduction operation nodes.
This file defines the base class for tensor reduction operations. Reductions are operations that aggregate values along one or more tensor dimensions.
ReduceNode expects scalars or flat pointers of scalars as inputs. The tensor operation is performed with linearized indices.
Reduction operations include:
Reductions can operate on:
The keepdims parameter controls whether reduced dimensions are kept with size 1 or removed from the output shape.
Creating a sum reduction: