Skip to content

Commit 80ff6a5

Browse files
Merge pull request #378 from RalfJung/simd_bitmask
fix simd_bitmask docs
2 parents e0e9a45 + 81af496 commit 80ff6a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/core_simd/src/intrinsics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ extern "platform-intrinsic" {
132132
// `fn simd_bitmask(vector) -> unsigned integer` takes a vector of integers and
133133
// returns either an unsigned integer or array of `u8`.
134134
// Every element in the vector becomes a single bit in the returned bitmask.
135-
// If the vector has less than 8 lanes, a u8 is returned with zeroed trailing bits.
136135
// The bit order of the result depends on the byte endianness. LSB-first for little
137136
// endian and MSB-first for big endian.
137+
// If the vector has less than 8 lanes, the mask lives in the least-significant bits
138+
// (e.g., [true, false] becomes `0b01` on little endian and `0b10` on big endian).
138139
//
139140
// UB if called on a vector with values other than 0 and -1.
140141
#[allow(unused)]

0 commit comments

Comments
 (0)