TensorPrimitives.LeadingZeroCount<T> 方法

定义

计算指定张量中的元素前导数字零计数。

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

类型参数

T

参数

x
ReadOnlySpan<T>

张量,表示为范围。

destination
Span<T>

目标张量,表示为范围。

例外

xdestination 引用重叠的内存位置,并且不在同一位置开始。

注解

此方法有效地计算 destination[i] = T.LeadingZeroCount(x[i])

适用于