Tannic
A C++ Tensor Library
|
Expression template for tensor transformations. More...
#include <transformations.hpp>
Public Member Functions | |
constexpr | Transformation (Operation operation, typename Trait< Operands >::Reference... operands) |
Constructs a Transformation expression. | |
constexpr type | dtype () const |
Gets the result data type after promotion. | |
constexpr Shape const & | shape () const |
Gets the broadcasted output shape. | |
constexpr Strides const & | strides () const |
Gets the computed strides for the result. | |
std::ptrdiff_t | offset () const |
Gets the data offset (always 0 for new tensors) | |
Tensor | forward () const |
Evaluates the transformation. | |
Public Attributes | |
Operation | operation |
std::tuple< typename Trait< Operands >::Reference... > | operands |
Expression template for tensor transformations.
Represents a lazily evaluated transformation operation between multiple tensors. Handles type promotion, shape broadcasting, and proper stride computation.
Operation | The transformation operation type |
Operands | Variadic template for input expressions |
|
inlineconstexpr |
Constructs a Transformation expression.
operation | The transformation operation |
operands | Input tensor expressions |
|
inlineconstexpr |
Gets the result data type after promotion.
|
inline |
Evaluates the transformation.
|
inline |
Gets the data offset (always 0 for new tensors)
|
inlineconstexpr |
Gets the broadcasted output shape.
|
inlineconstexpr |
Gets the computed strides for the result.
std::tuple<typename Trait<Operands>::Reference...> tannic::transformation::Transformation< Operation, Operands >::operands |
Operation tannic::transformation::Transformation< Operation, Operands >::operation |