TensorPrimitives.MaxNumber Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MaxNumber<T>(ReadOnlySpan<T>) |
Searches for the largest number in the specified tensor. |
MaxNumber<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>) |
Computes the element-wise maximum of the numbers in the specified tensors. |
MaxNumber<T>(ReadOnlySpan<T>, T, Span<T>) |
Computes the element-wise maximum of the numbers in the specified tensors. |
MaxNumber<T>(ReadOnlySpan<T>)
Searches for the largest number in the specified tensor.
public:
generic <typename T>
where T : System::Numerics::INumber<T> static T MaxNumber(ReadOnlySpan<T> x);
public static T MaxNumber<T> (ReadOnlySpan<T> x) where T : System.Numerics.INumber<T>;
static member MaxNumber : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> -> 'T (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Function MaxNumber(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T)) As T
Type Parameters
- T
Parameters
The tensor, represented as a span.
Returns
The maximum element in x
.
Exceptions
Length of x
must be greater than zero.
Remarks
The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. Positive 0 is considered greater than negative 0.
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
MaxNumber<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>)
Computes the element-wise maximum of the numbers in the specified tensors.
public:
generic <typename T>
where T : System::Numerics::INumber<T> static void MaxNumber(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
public static void MaxNumber<T> (ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : System.Numerics.INumber<T>;
static member MaxNumber : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> * ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> * Span<'T (requires 'T :> System.Numerics.INumber<'T>)> -> unit (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Sub MaxNumber(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T), y As ReadOnlySpan(Of T), destination As Span(Of T))
Type Parameters
- T
Parameters
The first tensor, represented as a span.
The second tensor, represented as a span.
- destination
- Span<T>
The destination tensor, represented as a span.
Exceptions
y
and destination
reference overlapping memory locations and do not begin at the same location.
Remarks
This method effectively computes
.destination
[i] = T
.MaxNumber(x
[i], y
[i])
The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. If either value is NaN the other is returned. Positive 0 is considered greater than negative 0.
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
MaxNumber<T>(ReadOnlySpan<T>, T, Span<T>)
Computes the element-wise maximum of the numbers in the specified tensors.
public:
generic <typename T>
where T : System::Numerics::INumber<T> static void MaxNumber(ReadOnlySpan<T> x, T y, Span<T> destination);
public static void MaxNumber<T> (ReadOnlySpan<T> x, T y, Span<T> destination) where T : System.Numerics.INumber<T>;
static member MaxNumber : ReadOnlySpan<'T (requires 'T :> System.Numerics.INumber<'T>)> * 'T * Span<'T (requires 'T :> System.Numerics.INumber<'T>)> -> unit (requires 'T :> System.Numerics.INumber<'T>)
Public Shared Sub MaxNumber(Of T As INumber(Of T)) (x As ReadOnlySpan(Of T), y As T, destination As Span(Of T))
Type Parameters
- T
Parameters
The first tensor, represented as a span.
- y
- T
The second tensor, represented as a scalar.
- destination
- Span<T>
The destination tensor, represented as a span.
Exceptions
x
and destination
reference overlapping memory locations and do not begin at the same location.
Remarks
This method effectively computes
.destination
[i] = T
.MaxNumber(x
[i], y
)
The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. If either value is NaN the other is returned. Positive 0 is considered greater than negative 0.
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
.NET