File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,12 @@ macro_rules! impl_float_reductions {
55
55
where
56
56
Self : crate :: LanesAtMost64
57
57
{
58
+
58
59
/// Produces the sum of the lanes of the vector.
59
60
#[ inline]
60
61
pub fn sum( self ) -> $scalar {
61
62
// f32 SIMD sum is inaccurate on i586
62
- if cfg!( target_arch = "i586" ) && core:: mem:: size_of:: <$scalar>( ) == 4 {
63
+ if cfg!( all ( target_arch = "x86" , not ( target_feature = "sse2" ) ) ) && core:: mem:: size_of:: <$scalar>( ) == 4 {
63
64
self . as_slice( ) . iter( ) . sum( )
64
65
} else {
65
66
unsafe { crate :: intrinsics:: simd_reduce_add_ordered( self , 0. ) }
@@ -70,7 +71,7 @@ macro_rules! impl_float_reductions {
70
71
#[ inline]
71
72
pub fn product( self ) -> $scalar {
72
73
// f32 SIMD product is inaccurate on i586
73
- if cfg!( target_arch = "i586" ) && core:: mem:: size_of:: <$scalar>( ) == 4 {
74
+ if cfg!( all ( target_arch = "x86" , not ( target_feature = "sse2" ) ) ) && core:: mem:: size_of:: <$scalar>( ) == 4 {
74
75
self . as_slice( ) . iter( ) . product( )
75
76
} else {
76
77
unsafe { crate :: intrinsics:: simd_reduce_mul_ordered( self , 1. ) }
You can’t perform that action at this time.
0 commit comments