Tensor.ShiftRightArithmetic Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| ShiftRightArithmetic<T>(ReadOnlyTensorSpan<T>, Int32) |
Performs an element-wise arithmetic right shift on a tensor. |
| ShiftRightArithmetic<T>(ReadOnlyTensorSpan<T>, Int32, TensorSpan<T>) |
Performs an element-wise arithmetic right shift on a tensor. |
ShiftRightArithmetic<T>(ReadOnlyTensorSpan<T>, Int32)
- Source:
- Tensor.op_RightShift.cs
Performs an element-wise arithmetic right shift on a tensor.
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)
Type Parameters
- T
The type of the elements in the tensor.
Parameters
The tensor to arithmetic right shift.
- shiftAmount
- Int32
The amount to shift each element in x.
Returns
A new tensor containing the result of x >> shiftAmount.
Applies to
ShiftRightArithmetic<T>(ReadOnlyTensorSpan<T>, Int32, TensorSpan<T>)
- Source:
- Tensor.op_RightShift.cs
Performs an element-wise arithmetic right shift on a tensor.
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)
Type Parameters
- T
The type of the elements in the tensor.
Parameters
The tensor to arithmetic right shift.
- shiftAmount
- Int32
The amount to shift each element in x.
- destination
- TensorSpan<T>
The destination where the result of x >> shiftAmount is written.
Returns
A reference to destination.
Exceptions
The shapes of x and destination are not compatible.