|
template<Expression Operand> |
constexpr auto | operator- (Operand &&operand) |
| Element-wise negation of a tensor expression.
|
|
template<Expression Augend, Expression Addend> |
constexpr auto | operator+ (Augend &&augend, Addend &&addend) |
| Element-wise addition of two tensor expressions.
|
|
template<Expression Subtrahend, Expression Minuend> |
constexpr auto | operator- (Subtrahend &&subtrahend, Minuend &&minuend) |
| Element-wise subtraction of two tensor expressions.
|
|
template<Expression Multiplicand, Expression Multiplier> |
constexpr auto | operator* (Multiplicand &&multiplicand, Multiplier &&multiplier) |
| Element-wise multiplication of two tensor expressions.
|
|
template<Expression Base, Expression Exponent> |
constexpr auto | operator^ (Base &&base, Exponent &&exponent) |
| Element-wise exponentiation of two tensor expressions.
|
|
template<Expression Multiplicand, Expression Multiplier>
constexpr auto tannic::operation::operator* |
( |
Multiplicand && |
multiplicand, |
|
|
Multiplier && |
multiplier |
|
) |
| |
|
constexpr |
Element-wise multiplication of two tensor expressions.
Constructs a lazily evaluated Binary<Multiplication, Multiplicand, Multiplier>
expression. As with other binary operations, this uses broadcasting and type promotion internally. The computation on the elements is not performed immediately, but is deferred until forward() is called or the expression is assigned to a Tensor object.
- Template Parameters
-
Multiplicand | Left-hand-side operand (expression). |
Multiplier | Right-hand-side operand (expression). |
- Parameters
-
multiplicand | First operand. |
multiplier | Second operand. |
- Returns
- A binary expression representing element-wise multiplication.
template<Expression Augend, Expression Addend>
constexpr auto tannic::operation::operator+ |
( |
Augend && |
augend, |
|
|
Addend && |
addend |
|
) |
| |
|
constexpr |
Element-wise addition of two tensor expressions.
Constructs a lazily evaluated Binary<Addition, Augend, Addend>
expression. The result's shape is determined via broadcasting rules, and the resulting data type is the promoted type of the two operands. The computation on the elements is not performed immediately, but is deferred until forward() is called or the expression is assigned to a Tensor object.
- Template Parameters
-
Augend | Left-hand-side operand (expression). |
Addend | Right-hand-side operand (expression). |
- Parameters
-
augend | First operand. |
addend | Second operand. |
- Returns
- A binary expression representing element-wise addition.
template<Expression Subtrahend, Expression Minuend>
constexpr auto tannic::operation::operator- |
( |
Subtrahend && |
subtrahend, |
|
|
Minuend && |
minuend |
|
) |
| |
|
constexpr |
Element-wise subtraction of two tensor expressions.
Constructs a lazily evaluated Binary<Subtraction, Subtrahend, Minuend>
expression. Shapes are broadcasted from the operands, and the type is promoted accordingly. The computation on the elements is not performed immediately, but is deferred until forward() is called or the expression is assigned to a Tensor object.
- Template Parameters
-
Subtrahend | Left-hand-side operand (expression). |
Minuend | Right-hand-side operand (expression). |
- Parameters
-
subtrahend | First operand. |
minuend | Second operand. |
- Returns
- A binary expression representing element-wise subtraction.
template<Expression Base, Expression Exponent>
constexpr auto tannic::operation::operator^ |
( |
Base && |
base, |
|
|
Exponent && |
exponent |
|
) |
| |
|
constexpr |
Element-wise exponentiation of two tensor expressions.
Constructs a lazily evaluated Binary<Exponentiation, Base, Exponent>
expression. Supports broadcasting across dimensions and type promotion between the base and exponent types.
- Template Parameters
-
Base | Left-hand-side operand (expression). |
Exponent | Right-hand-side operand (expression). |
- Parameters
-
base | The base tensor expression. |
exponent | The exponent tensor expression. |
- Returns
- A binary expression representing element-wise exponentiation.
Example: