outer#
Outer product of two vectors
Inputs A and B may be higher rank than 1, in which case batching will occur on all other dimensions.
-
template<typename TensorTypeA, typename TensorTypeB>
__MATX_INLINE__ auto matx::outer(const TensorTypeA &A, const TensorTypeB &B, float alpha = 1.0, float beta = 0.0)# Run an outer product on two vectors
Performs an outer product where each element of vector A is multiplied by each element of vector B to create a new matrix C. If A is length M and B is length M, C is length NxM. A and B can be batched, where each dimension other than the right-most is a batching dimension.
- Template Parameters:
TensorTypeA – Data type of A tensor or operator
TensorTypeB – Data type of B tensor or operator
- Parameters:
A – A input tensor or operator
B – B input tensor or operator
alpha – Scalar multiplier to apply to operator A
beta – Scalar multiplier to apply to operator C on input
Examples#
(c = outer(a, b)).run(this->exec);