TensorPrimitives.ReciprocalSqrt<T> メソッド

定義

指定したテンソル内の数値の平方根の要素ごとの逆数を計算します。

public:
generic <typename T>
 where T : System::Numerics::IFloatingPointIeee754<T> static void ReciprocalSqrt(ReadOnlySpan<T> x, Span<T> destination);
public static void ReciprocalSqrt<T> (ReadOnlySpan<T> x, Span<T> destination) where T : System.Numerics.IFloatingPointIeee754<T>;
static member ReciprocalSqrt : ReadOnlySpan<'T (requires 'T :> System.Numerics.IFloatingPointIeee754<'T>)> * Span<'T (requires 'T :> System.Numerics.IFloatingPointIeee754<'T>)> -> unit (requires 'T :> System.Numerics.IFloatingPointIeee754<'T>)
Public Shared Sub ReciprocalSqrt(Of T As IFloatingPointIeee754(Of T)) (x As ReadOnlySpan(Of T), destination As Span(Of T))

型パラメーター

T

パラメーター

x
ReadOnlySpan<T>

スパンとして表されるテンソル。

destination
Span<T>

スパンとして表される宛先テンソル。

例外

xdestination は重複するメモリの場所を参照し、同じ場所から開始しないでください。

T は整数型で、x の要素は 0 に等しくなります。

注釈

このメソッドは、destination[i] = 1 / x[i]を効果的に計算します。

適用対象