Share via


TensorPrimitives.Product Method

Definition

Overloads

Product(ReadOnlySpan<Single>)

Computes the product of all elements in the specified non-empty tensor of single-precision floating-point numbers.

Product<T>(ReadOnlySpan<T>)

Computes the product of all elements in the specified non-empty tensor of numbers.

Product(ReadOnlySpan<Single>)

Source:
TensorPrimitives.cs
Source:
TensorPrimitives.Single.cs

Computes the product of all elements in the specified non-empty tensor of single-precision floating-point numbers.

public:
 static float Product(ReadOnlySpan<float> x);
public static float Product (ReadOnlySpan<float> x);
static member Product : ReadOnlySpan<single> -> single
Public Shared Function Product (x As ReadOnlySpan(Of Single)) As Single

Parameters

x
ReadOnlySpan<Single>

The tensor, represented as a span.

Returns

The result of multiplying all elements in x.

Exceptions

Length of x must be greater than zero.

Remarks

If any of the input values is equal to NaN, the result value is also NaN.

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to

Product<T>(ReadOnlySpan<T>)

Source:
TensorPrimitives.Product.cs

Computes the product of all elements in the specified non-empty tensor of numbers.

public:
generic <typename T>
 where T : System::Numerics::IMultiplyOperators<T, T, T>, System::Numerics::IMultiplicativeIdentity<T, T> static T Product(ReadOnlySpan<T> x);
public static T Product<T> (ReadOnlySpan<T> x) where T : System.Numerics.IMultiplyOperators<T,T,T>, System.Numerics.IMultiplicativeIdentity<T,T>;
static member Product : ReadOnlySpan<'T (requires 'T :> System.Numerics.IMultiplyOperators<'T, 'T, 'T> and 'T :> System.Numerics.IMultiplicativeIdentity<'T, 'T>)> -> 'T (requires 'T :> System.Numerics.IMultiplyOperators<'T, 'T, 'T> and 'T :> System.Numerics.IMultiplicativeIdentity<'T, 'T>)
Public Shared Function Product(Of T As {IMultiplyOperators(Of T, T, T), IMultiplicativeIdentity(Of T, T)}) (x As ReadOnlySpan(Of T)) As T

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The tensor, represented as a span.

Returns

T

The result of multiplying all elements in x.

Exceptions

Length of x must be greater than zero.

Remarks

If any of the input values is equal to NaN, the result value is also NaN.

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to