diff options
| author | Auguste Rame <auguste.rame@gmail.com> | 2021-07-25 20:35:55 -0400 |
|---|---|---|
| committer | Auguste Rame <auguste.rame@gmail.com> | 2021-07-25 20:35:55 -0400 |
| commit | ecca829bcbfdcb03bfcefa56f530b180d5c61653 (patch) | |
| tree | 3a948e1e290a8a96f9d90e8119a1bd5f7001483f /doc | |
| parent | 653c851e6233a105cb151602517d0222b1128ea7 (diff) | |
| download | zig-ecca829bcbfdcb03bfcefa56f530b180d5c61653.tar.gz zig-ecca829bcbfdcb03bfcefa56f530b180d5c61653.zip | |
Add vector support for @popCount
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 0e3e32c52a..ebb81884e5 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -8105,12 +8105,14 @@ test "@wasmMemoryGrow" { {#header_close#} {#header_open|@popCount#} - <pre>{#syntax#}@popCount(comptime T: type, integer: T){#endsyntax#}</pre> + <pre>{#syntax#}@popCount(comptime T: type, operand: T){#endsyntax#}</pre> + <p>{#syntax#}T{#endsyntax#} must be an integer type.</p> + <p>{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.</p> <p>Counts the number of bits set in an integer.</p> <p> - If {#syntax#}integer{#endsyntax#} is known at {#link|comptime#}, + If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, the return type is {#syntax#}comptime_int{#endsyntax#}. - Otherwise, the return type is an unsigned integer with the minimum number + Otherwise, the return type is an unsigned integer or vector of unsigned integers with the minimum number of bits that can represent the bit count of the integer type. </p> {#see_also|@ctz|@clz#} |
