Binary element-wise multiplication of two tensor expressions.
Used to build a lazily evaluated Binary<Multiplication, Multiplicand, Multiplier>
expression. Computation is deferred until forward()
is called or assigned to a Tensor
. Supports broadcasting and type promotion.
Example: Multiplication
A[0, 0] = 1; A[0, 1] = 2;
A[1, 0] = 3; A[1, 1] = 4;
B[0, 0] = 10; B[0, 1] = 20;
B[1, 0] = 30; B[1, 1] = 40;
auto C = A * B;
std::cout << C.forward();
A multidimensional, strided tensor data structure.
Definition: tensor.hpp:105
void initialize(Environment environment=Host{}) const
Allocates the memory buffer for the tensor.