prod#
Reduce an input by the product of all elements in the reduction set
-
template<typename InType, int D>
__MATX_INLINE__ auto matx::prod(const InType &in, const int (&dims)[D])# Compute product of numbers along axes
Returns a tensor representing the product of all items in the reduction
- Template Parameters:
InType – Input data type
D – Num of dimensions to reduce over
- Parameters:
in – Input data to reduce
dims – Array containing dimensions to reduce over
- Returns:
Operator with reduced values of prod-reduce computed
-
template<typename InType>
__MATX_INLINE__ auto matx::prod(const InType &in)# Compute product of numbers
Returns a tensor representing the product of all items in the reduction
- Template Parameters:
InType – Input data type
- Parameters:
in – Input data to reduce
- Returns:
Operator with reduced values of prod-reduce computed
Examples#
// Compute the product of all elements in "t2" and store into "t0"
(t0 = prod(t2)).run(exec);