Bagikan melalui


TensorPrimitives.PopCount Metode

Definisi

Overload

PopCount<T>(ReadOnlySpan<T>, Span<T>)

Menghitung jumlah populasi angka yang bijaksana dalam tensor yang ditentukan.

PopCount<T>(ReadOnlySpan<T>)

Menghitung jumlah populasi semua elemen dalam tensor yang ditentukan.

PopCount<T>(ReadOnlySpan<T>, Span<T>)

Sumber:
TensorPrimitives.PopCount.cs
Sumber:
TensorPrimitives.PopCount.cs

Menghitung jumlah populasi angka yang bijaksana dalam tensor yang ditentukan.

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

Jenis parameter

T

Parameter

x
ReadOnlySpan<T>

Tensor, direpresentasikan sebagai rentang.

destination
Span<T>

Tensor tujuan, diwakili sebagai rentang.

Pengecualian

x dan referensi destination lokasi memori yang tumpang tindih dan tidak dimulai di lokasi yang sama.

Keterangan

Metode ini secara efektif menghitung destination[i] = T.PopCount(x[i]).

Berlaku untuk

PopCount<T>(ReadOnlySpan<T>)

Sumber:
TensorPrimitives.PopCount.cs

Menghitung jumlah populasi semua elemen dalam tensor yang ditentukan.

public:
generic <typename T>
 where T : System::Numerics::IBinaryInteger<T> static long PopCount(ReadOnlySpan<T> x);
public static long PopCount<T> (ReadOnlySpan<T> x) where T : System.Numerics.IBinaryInteger<T>;
static member PopCount : ReadOnlySpan<'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)> -> int64 (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Shared Function PopCount(Of T As IBinaryInteger(Of T)) (x As ReadOnlySpan(Of T)) As Long

Jenis parameter

T

Parameter

x
ReadOnlySpan<T>

Tensor, direpresentasikan sebagai rentang.

Mengembalikan

Jumlah jumlah bit yang ditetapkan di setiap elemen dalam x.

Berlaku untuk