TensorPrimitives.ShiftRightArithmetic<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
計算指定張量中數字的元素(帶符號)右移數,除以指定移位量。
public:
generic <typename T>
where T : System::Numerics::IShiftOperators<T, int, T> static void ShiftRightArithmetic(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination);
public static void ShiftRightArithmetic<T>(ReadOnlySpan<T> x, int shiftAmount, Span<T> destination) where T : System.Numerics.IShiftOperators<T,int,T>;
static member ShiftRightArithmetic : ReadOnlySpan<'T (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)> * int * Span<'T (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)> -> unit (requires 'T :> System.Numerics.IShiftOperators<'T, int, 'T>)
Public Shared Sub ShiftRightArithmetic(Of T As IShiftOperators(Of T, Integer, T)) (x As ReadOnlySpan(Of T), shiftAmount As Integer, destination As Span(Of T))
類型參數
- T
參數
張量以跨度表示。
- shiftAmount
- Int32
需要移動的位元數,以標量表示。
- destination
- Span<T>
目的地張量,以範圍表示。
例外狀況
x 並 destination 參考重疊的記憶體位置,且不從相同位置開始。
備註
此方法有效計算 。destination[i] = x[i] >> shiftAmount