共用方式為


TensorPrimitives.RotateLeft<T> 方法

定義

依指定的旋轉量計算指定張量中數字的元素旋轉左方。

public:
generic <typename T>
 where T : System::Numerics::IBinaryInteger<T> static void RotateLeft(ReadOnlySpan<T> x, int rotateAmount, Span<T> destination);
public static void RotateLeft<T>(ReadOnlySpan<T> x, int rotateAmount, Span<T> destination) where T : System.Numerics.IBinaryInteger<T>;
static member RotateLeft : 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 RotateLeft(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.RotateLeft(x[i], rotateAmount)

適用於