语言

Tensor.ShiftRightArithmetic 方法

定义

重载

名称 说明
ShiftRightArithmetic<T>(ReadOnlyTensorSpan<T>, Int32)

对张量执行按元素算术右移。

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

对张量执行按元素算术右移。

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

Source:
Tensor.op_RightShift.cs
Source:
Tensor.op_RightShift.cs

对张量执行按元素算术右移。

public:
generic <typename T>
 where T : System::Numerics::IShiftOperators<T, int, T> static System::Numerics::Tensors::Tensor<T> ^ ShiftRightArithmetic(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x, int shiftAmount);
public static System.Numerics.Tensors.Tensor<T> ShiftRightArithmetic<T>(in System.Numerics.Tensors.ReadOnlyTensorSpan<T> x, int shiftAmount) where T : System.Numerics.IShiftOperators<T,int,T>;
static member ShiftRightArithmetic : 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 ShiftRightArithmetic(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的新张量。

适用于

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

Source:
Tensor.op_RightShift.cs
Source:
Tensor.op_RightShift.cs

对张量执行按元素算术右移。

public:
generic <typename T>
 where T : System::Numerics::IShiftOperators<T, int, T> static System::Numerics::Tensors::TensorSpan<T> ^ ShiftRightArithmetic(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % x, int shiftAmount, System::Numerics::Tensors::TensorSpan<T> % destination);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> ShiftRightArithmetic<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 ShiftRightArithmetic : ReadOnlyTensorSpan * int * TensorSpan -> TensorSpan (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)
Public Function ShiftRightArithmetic(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 的引用。

例外

x形状和destination形状不兼容。

适用于