Sdílet prostřednictvím


TensorPrimitives.ReciprocalEstimate<T> Metoda

Definice

Vypočítá reciproční hodnotu prvků v zadaném tensoru.

public:
generic <typename T>
 where T : System::Numerics::IFloatingPointIeee754<T> static void ReciprocalEstimate(ReadOnlySpan<T> x, Span<T> destination);
public static void ReciprocalEstimate<T> (ReadOnlySpan<T> x, Span<T> destination) where T : System.Numerics.IFloatingPointIeee754<T>;
static member ReciprocalEstimate : 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 ReciprocalEstimate(Of T As IFloatingPointIeee754(Of T)) (x As ReadOnlySpan(Of T), destination As Span(Of T))

Parametry typu

T

Parametry

x
ReadOnlySpan<T>

Tenzor, reprezentovaný jako rozpětí.

destination
Span<T>

Cílový tensor, reprezentovaný jako rozpětí.

Výjimky

x a destination odkazují na překrývající se umístění paměti a nezačínají ve stejném umístění.

T je celočíselná hodnota a prvek v x se rovná nule.

Poznámky

Tato metoda efektivně vypočítá destination[i] = 1 / x[i].

Platí pro