語言

Tensor.ShiftLeft 方法

定義

多載

名稱 Description
ShiftLeft<T>(ReadOnlyTensorSpan<T>, Int32)

對張量進行元素層次左移。

ShiftLeft<T>(ReadOnlyTensorSpan<T>, Int32, TensorSpan<T>)

對張量進行元素層次左移。

ShiftLeft<T>(ReadOnlyTensorSpan<T>, Int32)

來源:
Tensor.op_LeftShift.cs
來源:
Tensor.op_LeftShift.cs

對張量進行元素層次左移。

public:
generic <typename T>
 where T : System::Numerics::IShiftOperators<T, int, T> static System::Numerics::Tensors::Tensor<T> ^ ShiftLeft(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x, int shiftAmount);
public static System.Numerics.Tensors.Tensor<T> ShiftLeft<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, int shiftAmount) where T : System.Numerics.IShiftOperators<T,int,T>;
static member ShiftLeft : ReadOnlyTensorSpan * int -> System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)> (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)
Public Function ShiftLeft(Of T As IShiftOperators(Of T, Integer, T)) (ByRef x As ReadOnlyTensorSpan(Of T), shiftAmount As Integer) As Tensor(Of T)

類型參數

T

張量中元素的類型。

參數

x
ReadOnlyTensorSpan<T>

張量向左移動。

shiftAmount
Int32

將每個元素移入 x的量。

傳回

一個包含結果的新 x<<shiftAmount張量。

適用於

ShiftLeft<T>(ReadOnlyTensorSpan<T>, Int32, TensorSpan<T>)

來源:
Tensor.op_LeftShift.cs
來源:
Tensor.op_LeftShift.cs

對張量進行元素層次左移。

public:
generic <typename T>
 where T : System::Numerics::IShiftOperators<T, int, T> static System::Numerics::Tensors::TensorSpan<T> ^ ShiftLeft(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x, int shiftAmount, System::Numerics::Tensors::TensorSpan<T> % destination);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> ShiftLeft<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, int shiftAmount, in System.Numerics.Tensors.TensorSpan<T> destination) where T : System.Numerics.IShiftOperators<T,int,T>;
static member ShiftLeft : ReadOnlyTensorSpan * int * TensorSpan -> TensorSpan (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)
Public Function ShiftLeft(Of T As IShiftOperators(Of T, Integer, T)) (ByRef x As ReadOnlyTensorSpan(Of T), shiftAmount As Integer, ByRef destination As TensorSpan(Of T)) As TensorSpan(Of T)

類型參數

T

張量中元素的類型。

參數

x
ReadOnlyTensorSpan<T>

張量向左移動。

shiftAmount
Int32

將每個元素移入 x的量。

destination
TensorSpan<T>

結果寫入的目的地 x<<shiftAmount 。

傳回

的 destination參考。

例外狀況

和 destination 的x形狀不相容。

適用於