aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2020-12-12 09:26:20 -0800
committerGravatar Antonio Sanchez <cantonios@google.com>2020-12-12 09:26:20 -0800
commit5dc2fbabeee17fe023c38756ebde0c1d56472913 (patch)
treec1832339cec047ec350387f7c8a90073f8dcdd2f /Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
parent55967f87d1dc5cf2c33145ddcff73f349e406635 (diff)
Fix implicit cast to double.
Triggers `-Wimplicit-float-conversion`, causing a bunch of build errors in Google due to `-Wall`.
Diffstat (limited to 'Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h')
-rw-r--r--Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
index 34e2cb1e7..a6d2de62b 100644
--- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
+++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h
@@ -253,10 +253,10 @@ Packet plog_impl_double(const Packet _x)
// Add the logarithm of the exponent back to the result of the interpolation.
if (base2) {
- const Packet cst_log2e = pset1<Packet>(EIGEN_LOG2E);
+ const Packet cst_log2e = pset1<Packet>(static_cast<double>(EIGEN_LOG2E));
x = pmadd(x, cst_log2e, e);
} else {
- const Packet cst_ln2 = pset1<Packet>(EIGEN_LN2);
+ const Packet cst_ln2 = pset1<Packet>(static_cast<double>(EIGEN_LN2));
x = pmadd(e, cst_ln2, x);
}