File tree 2 files changed +13
-0
lines changed 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,16 @@ extern "platform-intrinsic" {
130
130
pub ( crate ) fn simd_reduce_xor < T , U > ( x : T ) -> U ;
131
131
132
132
// truncate integer vector to bitmask
133
+ // `fn simd_bitmask(vector) -> unsigned integer` takes a vector mask and
134
+ // returns the most significant bit (MSB) of each lane in the form
135
+ // of either:
136
+ // * an unsigned integer
137
+ // * an array of `u8`
138
+ // If the vector has less than 8 lanes, a u8 is returned with zeroed trailing bits.
139
+ //
140
+ // The bit order of the result depends on the byte endianness, LSB-first for little
141
+ // endian and MSB-first for big endian.
142
+ // Not intended to be called on a vector with values other than 0 and -1.
133
143
#[ allow( unused) ]
134
144
pub ( crate ) fn simd_bitmask < T , U > ( x : T ) -> U ;
135
145
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ macro_rules! impl_integer_intrinsic {
50
50
}
51
51
52
52
impl_integer_intrinsic ! {
53
+ unsafe impl ToBitMask <BitMask =u8 > for Mask <_, 1 >
54
+ unsafe impl ToBitMask <BitMask =u8 > for Mask <_, 2 >
55
+ unsafe impl ToBitMask <BitMask =u8 > for Mask <_, 4 >
53
56
unsafe impl ToBitMask <BitMask =u8 > for Mask <_, 8 >
54
57
unsafe impl ToBitMask <BitMask =u16 > for Mask <_, 16 >
55
58
unsafe impl ToBitMask <BitMask =u32 > for Mask <_, 32 >
You can’t perform that action at this time.
0 commit comments