TensorPrimitives.Reciprocal<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
計算指定張量中的數字專案對等。
public:
generic <typename T>
where T : System::Numerics::IFloatingPoint<T> static void Reciprocal(ReadOnlySpan<T> x, Span<T> destination);
public static void Reciprocal<T>(ReadOnlySpan<T> x, Span<T> destination) where T : System.Numerics.IFloatingPoint<T>;
static member Reciprocal : ReadOnlySpan<'T (requires 'T :> System.Numerics.IFloatingPoint<'T>)> * Span<'T (requires 'T :> System.Numerics.IFloatingPoint<'T>)> -> unit (requires 'T :> System.Numerics.IFloatingPoint<'T>)
Public Shared Sub Reciprocal(Of T As IFloatingPoint(Of T)) (x As ReadOnlySpan(Of T), destination As Span(Of T))
類型參數
- T
參數
以範圍表示的張量。
- destination
- Span<T>
目的地張量,以範圍表示。
例外狀況
x 和 destination 參考重疊的記憶體位置,而且不會從相同的位置開始。
T 是整數類型,x 中的專案等於零。
備註
這個方法會有效地計算 。destination[i] = 1 / x[i]