TensorPrimitives.PopCount Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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
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
Tensor, direpresentasikan sebagai rentang.
Mengembalikan
Jumlah jumlah bit yang ditetapkan di setiap elemen dalam x
.