语言

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])。

适用于