語言

TensorPrimitives.IsOddInteger<T> 方法

定義

計算指定張量中每個值是否為奇整數。

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

類型參數

T

參數

x
ReadOnlySpan<T>

張量以跨度表示。

destination
Span<Boolean>

目的地張量,以範圍表示。

例外狀況

x 並 destination 參考重疊的記憶體位置,且不從相同位置開始。

備註

此方法有效計算 destination[i] = T.IsOddInteger(x[i])。

適用於