fix non-fma build
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 7 May 2021 03:16:29 +0000 (20:16 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 7 May 2021 03:16:29 +0000 (20:16 -0700)
src/stdsimd.rs

index 046a3379baa99d7d8cf60226b01c76ceab0d61ba..b691f7c1e0ed7ca30f58fff6faca48d595863614 100644 (file)
@@ -719,6 +719,7 @@ macro_rules! impl_float {
                 self.0.round().into()
             }
 
+            #[cfg(feature = "fma")]
             fn fma(self, a: Self, b: Self) -> Self {
                 self.0.fma(a.0, b.0).into()
             }
@@ -779,6 +780,7 @@ macro_rules! impl_float {
                 self.0.round().into()
             }
 
+            #[cfg(feature = "fma")]
             fn fma(self, _a: Self, _b: Self) -> Self {
                 // FIXME(programmerjake): implement once core_simd gains support:
                 // https://github.com/rust-lang/stdsimd/issues/102