Jaa


TensorPrimitives.ProductOfSums Method

Definition

Overloads

ProductOfSums(ReadOnlySpan<Single>, ReadOnlySpan<Single>)

Computes the product of the element-wise sums of the single-precision floating-point numbers in the specified non-empty tensors.

ProductOfSums<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Computes the product of the element-wise sums of the numbers in the specified non-empty tensors.

ProductOfSums(ReadOnlySpan<Single>, ReadOnlySpan<Single>)

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

Computes the product of the element-wise sums of the single-precision floating-point numbers in the specified non-empty tensors.

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

Parameters

x
ReadOnlySpan<Single>

The first tensor, represented as a span.

y
ReadOnlySpan<Single>

The second tensor, represented as a span.

Returns

The result of multiplying the element-wise additions of the elements in each tensor.

Exceptions

x and y must have the same length.

Remarks

This method effectively computes: Span<float> sums = ...; TensorPrimitives.Add(x, y, sums); float result = TensorPrimitives.Product(sums); but without requiring additional temporary storage for the intermediate sums.

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

ProductOfSums<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

Source:
TensorPrimitives.Product.cs
Source:
TensorPrimitives.Product.cs

Computes the product of the element-wise sums of the numbers in the specified non-empty tensors.

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

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The first tensor, represented as a span.

y
ReadOnlySpan<T>

The second tensor, represented as a span.

Returns

T

The result of multiplying the element-wise additions of the elements in each tensor.

Exceptions

x and y must have the same length.

Remarks

This method effectively computes: Span<T> sums = ...; TensorPrimitives.Add(x, y, sums); T result = TensorPrimitives.Product(sums); but without requiring additional temporary storage for the intermediate sums.

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