TensorPrimitives.RotateRight<T> 方法

定义

按指定的旋转量计算指定张量中数字的元素旋转右。

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

类型参数

T

参数

x
ReadOnlySpan<T>

张量,表示为范围。

rotateAmount
Int32

要旋转的位数,表示为标量。

destination
Span<T>

目标张量,表示为范围。

例外

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

注解

此方法有效地计算 destination[i] = T.RotateRight(x[i], rotateAmount)

适用于