diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-11-20 17:23:19 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-11-20 17:23:19 +0100 |
commit | e5778b87b928b54a9f108f15ad0e56fdbbfec2f3 (patch) | |
tree | 8f21662e7e201a2259da971a6bd46c3c87ff2b01 /Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | |
parent | 8c8cab1afdc325dfe0a3c1ad805014ea4010e208 (diff) |
Fix duplicate symbol linking error.
Diffstat (limited to 'Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h')
-rw-r--r-- | Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index d3a2f4ed5..8054e537a 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -233,6 +233,10 @@ Packet pexp_float(const Packet _x) return pmax(pldexp(y,m), _x); } +// make it the default path for scalar float +template<> +inline float pexp(const float& a) { return pexp_float(a); } + template <typename Packet> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED @@ -301,6 +305,10 @@ Packet pexp_double(const Packet _x) return pmax(pldexp(x,fx), _x); } +// make it the default path for scalar double +template<> +inline double pexp(const double& a) { return pexp_double(a); } + // The following code is inspired by the following stack-overflow answer: // https://stackoverflow.com/questions/30463616/payne-hanek-algorithm-implementation-in-c/30465751#30465751 // It has been largely optimized: |