@@ -214,7 +214,7 @@ where
214214 assert_eq ! ( src. alpha, self . alpha) ;
215215 assert_eq ! ( src. p, self . p) ;
216216 assert_eq ! ( src. m. len( ) , self . m. len( ) ) ;
217- #[ cfg( feature = "packed_simd" ) ]
217+ #[ cfg( all ( feature = "packed_simd" , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
218218 {
219219 assert_eq ! ( self . m. len( ) % u8s:: lanes( ) , 0 ) ; // TODO: high error rate can trigger this
220220 assert_eq ! ( u8s:: lanes( ) , f32s:: lanes( ) * 4 ) ;
@@ -246,7 +246,7 @@ where
246246 // https://github.com/AdamNiederer/faster/issues/37
247247 // (src.m.simd_iter(faster::u8s(0)),self.m.simd_iter_mut(faster::u8s(0))).zip()
248248 }
249- #[ cfg( not( feature = "packed_simd" ) ) ]
249+ #[ cfg( not( all ( feature = "packed_simd" , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
250250 {
251251 let mut zero = 0 ;
252252 let mut sum = 0.0 ;
@@ -267,7 +267,7 @@ where
267267 assert_eq ! ( src. alpha, self . alpha) ;
268268 assert_eq ! ( src. p, self . p) ;
269269 assert_eq ! ( src. m. len( ) , self . m. len( ) ) ;
270- #[ cfg( feature = "packed_simd" ) ]
270+ #[ cfg( all ( feature = "packed_simd" , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
271271 {
272272 assert_eq ! ( self . m. len( ) % u8s:: lanes( ) , 0 ) ;
273273 assert_eq ! ( u8s:: lanes( ) , f32s:: lanes( ) * 4 ) ;
@@ -297,7 +297,7 @@ where
297297 self . zero = usize:: try_from ( zero. wrapping_sum ( ) ) . unwrap ( ) ;
298298 self . sum = f64:: from ( sum. sum ( ) ) ;
299299 }
300- #[ cfg( not( feature = "packed_simd" ) ) ]
300+ #[ cfg( not( all ( feature = "packed_simd" , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ) ]
301301 {
302302 let mut zero = 0 ;
303303 let mut sum = 0.0 ;
@@ -457,7 +457,7 @@ impl<V: ?Sized> IntersectPlusUnionIsPlus for HyperLogLog<V> {
457457 const VAL : bool = true ;
458458}
459459
460- #[ cfg( feature = "packed_simd" ) ]
460+ #[ cfg( all ( feature = "packed_simd" , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
461461mod simd {
462462 pub use packed_simd:: { self , Cast , FromBits , IntoBits } ;
463463 use std:: marker:: PhantomData ;
@@ -560,7 +560,7 @@ mod simd {
560560 }
561561 }
562562}
563- #[ cfg( feature = "packed_simd" ) ]
563+ #[ cfg( all ( feature = "packed_simd" , any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
564564use simd:: { f32s, u32s, u8s, u8s_sad_out, u8sq, Cast , FromBits , IntoBits , Sad } ;
565565
566566#[ cfg( test) ]
0 commit comments