aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAuguste Rame <auguste.rame@gmail.com>2021-07-25 20:35:55 -0400
committerAuguste Rame <auguste.rame@gmail.com>2021-07-25 20:35:55 -0400
commitecca829bcbfdcb03bfcefa56f530b180d5c61653 (patch)
tree3a948e1e290a8a96f9d90e8119a1bd5f7001483f /doc
parent653c851e6233a105cb151602517d0222b1128ea7 (diff)
downloadzig-ecca829bcbfdcb03bfcefa56f530b180d5c61653.tar.gz
zig-ecca829bcbfdcb03bfcefa56f530b180d5c61653.zip
Add vector support for @popCount
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in8
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#}