shithub: opus

Download patch

ref: ae2ae5ead6be8ddbc40ecf7c31aae373c878ea92
parent: c7ba313a674afafcb4963a992e185fcd43b247a8
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Sun Jun 20 21:30:51 EDT 2021

Remove useless multiply by one

See https://github.com/mozilla/LPCNet/commit/bffdcee95#commitcomment-46372726

--- a/dnn/vec_avx.h
+++ b/dnn/vec_avx.h
@@ -155,7 +155,7 @@
         X = _mm256_loadu_ps(&x[i]);
         Y = exp8_approx(X);
         /* Compute as 1-1/(1+e^x) to avoid >1 values caused by the reciprocal approximation. */
-        Y = _mm256_sub_ps(one, _mm256_mul_ps(one,  _mm256_rcp_ps(_mm256_add_ps(Y, one))));
+        Y = _mm256_sub_ps(one, _mm256_rcp_ps(_mm256_add_ps(Y, one)));
         _mm256_storeu_ps(&y[i], Y);
     }
     for (;i<N;i++)
--