TensorPrimitives.ReciprocalSqrtEstimate<T> 方法

定义

计算指定张量中数字平方根的按元素对等。

public:
generic <typename T>
 where T : System::Numerics::IFloatingPointIeee754<T> static void ReciprocalSqrtEstimate(ReadOnlySpan<T> x, Span<T> destination);
public static void ReciprocalSqrtEstimate<T> (ReadOnlySpan<T> x, Span<T> destination) where T : System.Numerics.IFloatingPointIeee754<T>;
static member ReciprocalSqrtEstimate : 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 ReciprocalSqrtEstimate(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 中的元素等于零。

注解

此方法有效地计算 destination[i] = 1 / x[i]

适用于