11//! Masks that take up full SIMD vector registers.
22
33use super :: MaskElement ;
4- use crate :: { LaneCount , Simd , SupportedLaneCount } ;
4+ use crate :: simd:: intrinsics;
5+ use crate :: simd:: { LaneCount , Simd , SupportedLaneCount } ;
56
67#[ repr( transparent) ]
78pub struct Mask < T , const LANES : usize > ( Simd < T , LANES > )
9899 where
99100 U : MaskElement ,
100101 {
101- unsafe { Mask ( crate :: intrinsics:: simd_cast ( self . 0 ) ) }
102+ unsafe { Mask ( intrinsics:: simd_cast ( self . 0 ) ) }
102103 }
103104
104105 #[ cfg( feature = "generic_const_exprs" ) ]
@@ -111,7 +112,7 @@ where
111112 LaneCount :: <LANES >:: BITMASK_LEN ,
112113 ) ;
113114 let bitmask: <LaneCount < LANES > as SupportedLaneCount >:: IntBitMask =
114- crate :: intrinsics:: simd_bitmask ( self . 0 ) ;
115+ intrinsics:: simd_bitmask ( self . 0 ) ;
115116 let mut bitmask: [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] =
116117 core:: mem:: transmute_copy ( & bitmask) ;
117118
@@ -149,7 +150,7 @@ where
149150 let bitmask: <LaneCount < LANES > as SupportedLaneCount >:: IntBitMask =
150151 core:: mem:: transmute_copy ( & bitmask) ;
151152
152- Self :: from_int_unchecked ( crate :: intrinsics:: simd_select_bitmask (
153+ Self :: from_int_unchecked ( intrinsics:: simd_select_bitmask (
153154 bitmask,
154155 Self :: splat ( true ) . to_int ( ) ,
155156 Self :: splat ( false ) . to_int ( ) ,
@@ -159,12 +160,12 @@ where
159160
160161 #[ inline]
161162 pub fn any ( self ) -> bool {
162- unsafe { crate :: intrinsics:: simd_reduce_any ( self . to_int ( ) ) }
163+ unsafe { intrinsics:: simd_reduce_any ( self . to_int ( ) ) }
163164 }
164165
165166 #[ inline]
166167 pub fn all ( self ) -> bool {
167- unsafe { crate :: intrinsics:: simd_reduce_all ( self . to_int ( ) ) }
168+ unsafe { intrinsics:: simd_reduce_all ( self . to_int ( ) ) }
168169 }
169170}
170171
@@ -186,7 +187,7 @@ where
186187 type Output = Self ;
187188 #[ inline]
188189 fn bitand ( self , rhs : Self ) -> Self {
189- unsafe { Self ( crate :: intrinsics:: simd_and ( self . 0 , rhs. 0 ) ) }
190+ unsafe { Self ( intrinsics:: simd_and ( self . 0 , rhs. 0 ) ) }
190191 }
191192}
192193
@@ -198,7 +199,7 @@ where
198199 type Output = Self ;
199200 #[ inline]
200201 fn bitor ( self , rhs : Self ) -> Self {
201- unsafe { Self ( crate :: intrinsics:: simd_or ( self . 0 , rhs. 0 ) ) }
202+ unsafe { Self ( intrinsics:: simd_or ( self . 0 , rhs. 0 ) ) }
202203 }
203204}
204205
@@ -210,7 +211,7 @@ where
210211 type Output = Self ;
211212 #[ inline]
212213 fn bitxor ( self , rhs : Self ) -> Self {
213- unsafe { Self ( crate :: intrinsics:: simd_xor ( self . 0 , rhs. 0 ) ) }
214+ unsafe { Self ( intrinsics:: simd_xor ( self . 0 , rhs. 0 ) ) }
214215 }
215216}
216217
0 commit comments