Tensor.Sum<T>(ReadOnlyTensorSpan<T>) Method

Definition

Sums the elements of the specified tensor.

public:
generic <typename T>
 where T : System::Numerics::IAdditionOperators<T, T, T>, System::Numerics::IAdditiveIdentity<T, T> static T Sum(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x);
public static T Sum<T> (scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x) where T : System.Numerics.IAdditionOperators<T,T,T>, System.Numerics.IAdditiveIdentity<T,T>;
static member Sum : ReadOnlyTensorSpan -> 'T (requires 'T :> System.Numerics.IAdditionOperators<'T, 'T, 'T> and 'T :> System.Numerics.IAdditiveIdentity<'T, 'T>)
Public Function Sum(Of T As {IAdditionOperators(Of T, T, T), IAdditiveIdentity(Of T, T)}) (ByRef x As ReadOnlyTensorSpan(Of T)) As T

Type Parameters

T

Parameters

x
ReadOnlyTensorSpan<T>

Tensor to sum

Returns

T

Applies to