Share via


TensorPrimitives.DivRem Method

Definition

Overloads

DivRem<T>(ReadOnlySpan<T>, T, Span<T>, Span<T>)

Computes the element-wise quotient and remainder of numbers in the specified tensors.

DivRem<T>(T, ReadOnlySpan<T>, Span<T>, Span<T>)

Computes the element-wise quotient and remainder of numbers in the specified tensors.

DivRem<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>, Span<T>)

Computes the element-wise quotient and remainder of numbers in the specified tensors.

DivRem<T>(ReadOnlySpan<T>, T, Span<T>, Span<T>)

Source:
TensorPrimitives.DivRem.cs

Computes the element-wise quotient and remainder of numbers in the specified tensors.

public:
generic <typename T>
 where T : System::Numerics::IBinaryInteger<T> static void DivRem(ReadOnlySpan<T> x, T y, Span<T> quotientDestination, Span<T> remainderDestination);
public static void DivRem<T>(ReadOnlySpan<T> x, T y, Span<T> quotientDestination, Span<T> remainderDestination) where T : System.Numerics.IBinaryInteger<T>;
static member DivRem : ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * 'T * Span<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * Span<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> -> unit (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Shared Sub DivRem(Of T As IBinaryInteger(Of T)) (x As ReadOnlySpan(Of T), y As T, quotientDestination As Span(Of T), remainderDestination As Span(Of T))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The first tensor, represented as a span.

y
T

The second tensor, represented as a scalar.

quotientDestination
Span<T>

The quotient destination tensor, represented as a span.

remainderDestination
Span<T>

The remainder destination tensor, represented as a span.

Exceptions

x and remainderDestination reference overlapping memory locations and do not begin at the same location.

T is an integer type and y is equal to zero.

Remarks

This method effectively computes (quotientDestination[i], remainderDestination[i]) = T.DivRem(x[i], y).

If either of the element-wise input values is equal to NaN, the resulting element-wise values are also NaN.

Applies to

DivRem<T>(T, ReadOnlySpan<T>, Span<T>, Span<T>)

Source:
TensorPrimitives.DivRem.cs

Computes the element-wise quotient and remainder of numbers in the specified tensors.

public:
generic <typename T>
 where T : System::Numerics::IBinaryInteger<T> static void DivRem(T x, ReadOnlySpan<T> y, Span<T> quotientDestination, Span<T> remainderDestination);
public static void DivRem<T>(T x, ReadOnlySpan<T> y, Span<T> quotientDestination, Span<T> remainderDestination) where T : System.Numerics.IBinaryInteger<T>;
static member DivRem : 'T * ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * Span<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * Span<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> -> unit (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Shared Sub DivRem(Of T As IBinaryInteger(Of T)) (x As T, y As ReadOnlySpan(Of T), quotientDestination As Span(Of T), remainderDestination As Span(Of T))

Type Parameters

T

Parameters

x
T

The first tensor, represented as a scalar.

y
ReadOnlySpan<T>

The second tensor, represented as a span.

quotientDestination
Span<T>

The quotient destination tensor, represented as a span.

remainderDestination
Span<T>

The remainder destination tensor, represented as a span.

Exceptions

y and remainderDestination reference overlapping memory locations and do not begin at the same location.

T is an integer type and an element in y is equal to zero.

Remarks

This method effectively computes (quotientDestination[i], remainderDestination[i]) = T.DivRem(x, y[i]).

If either of the element-wise input values is equal to NaN, the resulting element-wise values are also NaN.

Applies to

DivRem<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>, Span<T>)

Source:
TensorPrimitives.DivRem.cs

Computes the element-wise quotient and remainder of numbers in the specified tensors.

public:
generic <typename T>
 where T : System::Numerics::IBinaryInteger<T> static void DivRem(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> quotientDestination, Span<T> remainderDestination);
public static void DivRem<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> quotientDestination, Span<T> remainderDestination) where T : System.Numerics.IBinaryInteger<T>;
static member DivRem : ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * Span<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> * Span<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> -> unit (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Shared Sub DivRem(Of T As IBinaryInteger(Of T)) (x As ReadOnlySpan(Of T), y As ReadOnlySpan(Of T), quotientDestination As Span(Of T), remainderDestination As Span(Of 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.

quotientDestination
Span<T>

The quotient destination tensor, represented as a span.

remainderDestination
Span<T>

The remainder destination tensor, represented as a span.

Exceptions

x or y and remainderDestination reference overlapping memory locations and do not begin at the same location.

T is an integer type and an element in y is equal to zero.

Remarks

This method effectively computes (quotientDestination[i], remainderDestination[i]) = T.DivRem(x[i], y[i]).

If either of the element-wise input values is equal to NaN, the resulting element-wise values are also NaN.

Applies to