From 6d8b1dce06e5d3d670f510e88071afaf4458b458 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 10 Feb 2016 18:07:11 -0800 Subject: Avoid implicit cast from double to float. --- Eigen/src/Core/arch/AVX/MathFunctions.h | 22 +++++++++++----------- Eigen/src/Core/arch/SSE/MathFunctions.h | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'Eigen/src/Core/arch') diff --git a/Eigen/src/Core/arch/AVX/MathFunctions.h b/Eigen/src/Core/arch/AVX/MathFunctions.h index 3ea38ae07..a24bf6e26 100644 --- a/Eigen/src/Core/arch/AVX/MathFunctions.h +++ b/Eigen/src/Core/arch/AVX/MathFunctions.h @@ -276,19 +276,19 @@ ptanh(const Packet8f& _x) { const Packet8f x = _mm256_mul_ps(_x, _mm256_set1_ps(0.125f)); // The monomial coefficients of the numerator polynomial (odd). - _EIGEN_DECLARE_CONST_Packet8f(alpha_1, -2.47030171958948e-03); - _EIGEN_DECLARE_CONST_Packet8f(alpha_3, -2.06804010015822e-02); - _EIGEN_DECLARE_CONST_Packet8f(alpha_5, -3.13693994587418e-02); - _EIGEN_DECLARE_CONST_Packet8f(alpha_7, -7.19851201683627e-03); - _EIGEN_DECLARE_CONST_Packet8f(alpha_9, 8.31561269687160e-04); - _EIGEN_DECLARE_CONST_Packet8f(alpha_11, -1.37626659546502e-04); - _EIGEN_DECLARE_CONST_Packet8f(alpha_13, 1.39116714700458e-05); + _EIGEN_DECLARE_CONST_Packet8f(alpha_1, -2.47030171958948e-03f); + _EIGEN_DECLARE_CONST_Packet8f(alpha_3, -2.06804010015822e-02f); + _EIGEN_DECLARE_CONST_Packet8f(alpha_5, -3.13693994587418e-02f); + _EIGEN_DECLARE_CONST_Packet8f(alpha_7, -7.19851201683627e-03f); + _EIGEN_DECLARE_CONST_Packet8f(alpha_9, 8.31561269687160e-04f); + _EIGEN_DECLARE_CONST_Packet8f(alpha_11, -1.37626659546502e-04f); + _EIGEN_DECLARE_CONST_Packet8f(alpha_13, 1.39116714700458e-05f); // The monomial coefficients of the denominator polynomial (even). - _EIGEN_DECLARE_CONST_Packet8f(beta_0, -3.08787724141615e-04); - _EIGEN_DECLARE_CONST_Packet8f(beta_2, -9.17251911622436e-03); - _EIGEN_DECLARE_CONST_Packet8f(beta_4, -3.09625062090444e-02); - _EIGEN_DECLARE_CONST_Packet8f(beta_6, -2.05669680763032e-02); + _EIGEN_DECLARE_CONST_Packet8f(beta_0, -3.08787724141615e-04f); + _EIGEN_DECLARE_CONST_Packet8f(beta_2, -9.17251911622436e-03f); + _EIGEN_DECLARE_CONST_Packet8f(beta_4, -3.09625062090444e-02f); + _EIGEN_DECLARE_CONST_Packet8f(beta_6, -2.05669680763032e-02f); // Since the polynomials are odd/even, we need x^2. const Packet8f x2 = _mm256_mul_ps(x, x); diff --git a/Eigen/src/Core/arch/SSE/MathFunctions.h b/Eigen/src/Core/arch/SSE/MathFunctions.h index 31035c3bf..a7a0d906f 100644 --- a/Eigen/src/Core/arch/SSE/MathFunctions.h +++ b/Eigen/src/Core/arch/SSE/MathFunctions.h @@ -529,19 +529,19 @@ ptanh(const Packet4f& _x) { pmin(pset1(1.0f), pmul(_x, pset1(0.125f)))); // The monomial coefficients of the numerator polynomial (odd). - _EIGEN_DECLARE_CONST_Packet4f(alpha_1, -2.47030171958948e-03); - _EIGEN_DECLARE_CONST_Packet4f(alpha_3, -2.06804010015822e-02); - _EIGEN_DECLARE_CONST_Packet4f(alpha_5, -3.13693994587418e-02); - _EIGEN_DECLARE_CONST_Packet4f(alpha_7, -7.19851201683627e-03); - _EIGEN_DECLARE_CONST_Packet4f(alpha_9, 8.31561269687160e-04); - _EIGEN_DECLARE_CONST_Packet4f(alpha_11, -1.37626659546502e-04); - _EIGEN_DECLARE_CONST_Packet4f(alpha_13, 1.39116714700458e-05); + _EIGEN_DECLARE_CONST_Packet4f(alpha_1, -2.47030171958948e-03f); + _EIGEN_DECLARE_CONST_Packet4f(alpha_3, -2.06804010015822e-02f); + _EIGEN_DECLARE_CONST_Packet4f(alpha_5, -3.13693994587418e-02f); + _EIGEN_DECLARE_CONST_Packet4f(alpha_7, -7.19851201683627e-03f); + _EIGEN_DECLARE_CONST_Packet4f(alpha_9, 8.31561269687160e-04f); + _EIGEN_DECLARE_CONST_Packet4f(alpha_11, -1.37626659546502e-04f); + _EIGEN_DECLARE_CONST_Packet4f(alpha_13, 1.39116714700458e-05f); // The monomial coefficients of the denominator polynomial (even). - _EIGEN_DECLARE_CONST_Packet4f(beta_0, -3.08787724141615e-04); - _EIGEN_DECLARE_CONST_Packet4f(beta_2, -9.17251911622436e-03); - _EIGEN_DECLARE_CONST_Packet4f(beta_4, -3.09625062090444e-02); - _EIGEN_DECLARE_CONST_Packet4f(beta_6, -2.05669680763032e-02); + _EIGEN_DECLARE_CONST_Packet4f(beta_0, -3.08787724141615e-04f); + _EIGEN_DECLARE_CONST_Packet4f(beta_2, -9.17251911622436e-03f); + _EIGEN_DECLARE_CONST_Packet4f(beta_4, -3.09625062090444e-02f); + _EIGEN_DECLARE_CONST_Packet4f(beta_6, -2.05669680763032e-02f); // Since the polynomials are odd/even, we need x^2. const Packet4f x2 = pmul(x, x); -- cgit v1.2.3