|
Tannic
A C++ Tensor Library
|
Repack operation (makes a tensor contiguous in memory) More...
#include <transformations.hpp>
Public Member Functions | |
| constexpr type | promote (type dtype) const |
| Type promotion for repack. | |
| constexpr Shape | transform (Shape const &shape) const |
| Computes output shape after repack. | |
| void | forward (Tensor const &source, Tensor &result) const |
| Copies the tensor data to a contiguous layout if needed. | |
Repack operation (makes a tensor contiguous in memory)
Ensures the tensor is stored contiguously (row-major order). Does not change shape or dtype.
Copies the tensor data to a contiguous layout if needed.
| source | Input tensor. |
| result | Output tensor with contiguous layout. |
|
inlineconstexpr |
Type promotion for repack.
Repack does not change dtype.
|
inlineconstexpr |
Computes output shape after repack.
Repack does not change the shape.