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 中的元素等于零。

注解

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

适用于