TensorPrimitives.ShiftRightLogical<T> 方法

定义

计算按指定移位量计算指定张量中数字右移的元素逻辑(无符号)。

public:
generic <typename T>
 where T : System::Numerics::IShiftOperators<T, int, T> static void ShiftRightLogical(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination);
public static void ShiftRightLogical<T> (ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : System.Numerics.IShiftOperators<T,int,T>;
static member ShiftRightLogical : 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 ShiftRightLogical(Of T As IShiftOperators(Of T, Integer, T)) (x As ReadOnlySpan(Of T), shiftAmount As Integer, destination As Span(Of T))

类型参数

T

参数

x
ReadOnlySpan<T>

张量,表示为范围。

shiftAmount
Int32

要移动的位数,表示为标量。

destination
Span<T>

目标张量,表示为范围。

例外

xdestination 引用重叠的内存位置,并且不在同一位置开始。

注解

此方法有效地计算 destination[i] = x[i] >>> shiftAmount

适用于