remove unnecessary specialize template of pexp for scale float/double

This commit is contained in:
guoqiangqi 2020-10-15 11:34:17 +08:00 committed by Guoqiang QI
parent d9f0d9eb76
commit 4a77eda1fd

View File

@ -361,10 +361,6 @@ Packet pexp_float(const Packet _x)
return pmax(pldexp(y,m), _x);
}
// make it the default path for scalar float
template<>
EIGEN_DEVICE_FUNC inline float pexp(const float& a) { return pexp_float(a); }
template <typename Packet>
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
EIGEN_UNUSED
@ -433,10 +429,6 @@ Packet pexp_double(const Packet _x)
return pmax(pldexp(x,fx), _x);
}
// make it the default path for scalar double
template<>
EIGEN_DEVICE_FUNC 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: