Share via


TensorPrimitives.ShiftRightArithmetic<T> Method

Definition

Computes the element-wise arithmetic (signed) shifting right of numbers in the specified tensor by the specified shift amount.

public:
generic <typename T>
 where T : System::Numerics::IShiftOperators<T, int, T> static void ShiftRightArithmetic(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination);
public static void ShiftRightArithmetic<T> (ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : System.Numerics.IShiftOperators<T,int,T>;
static member ShiftRightArithmetic : ReadOnlySpan<'T (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)> * int * Span<'T (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)> -> unit (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)
Public Shared Sub ShiftRightArithmetic(Of T As IShiftOperators(Of T, Integer, T)) (x As ReadOnlySpan(Of T), shiftAmount As Integer, destination As Span(Of T))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The tensor, represented as a span.

shiftAmount
Int32

The number of bits to shift, 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] = x[i] >> shiftAmount.

Applies to