11//! Masks that take up full SIMD vector registers.
22
3- use crate :: simd:: intrinsics;
43use crate :: simd:: { LaneCount , MaskElement , Simd , SupportedLaneCount } ;
54
65#[ repr( transparent) ]
@@ -138,7 +137,7 @@ where
138137 U : MaskElement ,
139138 {
140139 // Safety: masks are simply integer vectors of 0 and -1, and we can cast the element type.
141- unsafe { Mask ( intrinsics:: simd_cast ( self . 0 ) ) }
140+ unsafe { Mask ( core :: intrinsics:: simd :: simd_cast ( self . 0 ) ) }
142141 }
143142
144143 #[ inline]
@@ -150,7 +149,7 @@ where
150149 unsafe {
151150 // Compute the bitmask
152151 let mut bytes: <LaneCount < N > as SupportedLaneCount >:: BitMask =
153- intrinsics:: simd_bitmask ( self . 0 ) ;
152+ core :: intrinsics:: simd :: simd_bitmask ( self . 0 ) ;
154153
155154 // LLVM assumes bit order should match endianness
156155 if cfg ! ( target_endian = "big" ) {
@@ -183,7 +182,7 @@ where
183182 }
184183
185184 // Compute the regular mask
186- Self :: from_int_unchecked ( intrinsics:: simd_select_bitmask (
185+ Self :: from_int_unchecked ( core :: intrinsics:: simd :: simd_select_bitmask (
187186 bytes,
188187 Self :: splat ( true ) . to_int ( ) ,
189188 Self :: splat ( false ) . to_int ( ) ,
@@ -199,7 +198,7 @@ where
199198 let resized = self . to_int ( ) . resize :: < M > ( T :: FALSE ) ;
200199
201200 // Safety: `resized` is an integer vector with length M, which must match T
202- let bitmask: U = unsafe { intrinsics:: simd_bitmask ( resized) } ;
201+ let bitmask: U = unsafe { core :: intrinsics:: simd :: simd_bitmask ( resized) } ;
203202
204203 // LLVM assumes bit order should match endianness
205204 if cfg ! ( target_endian = "big" ) {
@@ -223,7 +222,7 @@ where
223222
224223 // SAFETY: `mask` is the correct bitmask type for a u64 bitmask
225224 let mask: Simd < T , M > = unsafe {
226- intrinsics:: simd_select_bitmask (
225+ core :: intrinsics:: simd :: simd_select_bitmask (
227226 bitmask,
228227 Simd :: < T , M > :: splat ( T :: TRUE ) ,
229228 Simd :: < T , M > :: splat ( T :: FALSE ) ,
@@ -274,14 +273,14 @@ where
274273 #[ must_use = "method returns a new bool and does not mutate the original value" ]
275274 pub fn any ( self ) -> bool {
276275 // Safety: use `self` as an integer vector
277- unsafe { intrinsics:: simd_reduce_any ( self . to_int ( ) ) }
276+ unsafe { core :: intrinsics:: simd :: simd_reduce_any ( self . to_int ( ) ) }
278277 }
279278
280279 #[ inline]
281280 #[ must_use = "method returns a new vector and does not mutate the original value" ]
282281 pub fn all ( self ) -> bool {
283282 // Safety: use `self` as an integer vector
284- unsafe { intrinsics:: simd_reduce_all ( self . to_int ( ) ) }
283+ unsafe { core :: intrinsics:: simd :: simd_reduce_all ( self . to_int ( ) ) }
285284 }
286285}
287286
@@ -306,7 +305,7 @@ where
306305 #[ must_use = "method returns a new mask and does not mutate the original value" ]
307306 fn bitand ( self , rhs : Self ) -> Self {
308307 // Safety: `self` is an integer vector
309- unsafe { Self ( intrinsics:: simd_and ( self . 0 , rhs. 0 ) ) }
308+ unsafe { Self ( core :: intrinsics:: simd :: simd_and ( self . 0 , rhs. 0 ) ) }
310309 }
311310}
312311
@@ -320,7 +319,7 @@ where
320319 #[ must_use = "method returns a new mask and does not mutate the original value" ]
321320 fn bitor ( self , rhs : Self ) -> Self {
322321 // Safety: `self` is an integer vector
323- unsafe { Self ( intrinsics:: simd_or ( self . 0 , rhs. 0 ) ) }
322+ unsafe { Self ( core :: intrinsics:: simd :: simd_or ( self . 0 , rhs. 0 ) ) }
324323 }
325324}
326325
@@ -334,7 +333,7 @@ where
334333 #[ must_use = "method returns a new mask and does not mutate the original value" ]
335334 fn bitxor ( self , rhs : Self ) -> Self {
336335 // Safety: `self` is an integer vector
337- unsafe { Self ( intrinsics:: simd_xor ( self . 0 , rhs. 0 ) ) }
336+ unsafe { Self ( core :: intrinsics:: simd :: simd_xor ( self . 0 , rhs. 0 ) ) }
338337 }
339338}
340339
0 commit comments