Add log10 array support

This commit is contained in:
Deanna Hood
2015-03-11 08:56:42 +10:00
parent 19a71056ae
commit a5e49976f5
6 changed files with 44 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ struct default_packet_traits
HasSqrt = 0,
HasExp = 0,
HasLog = 0,
HasLog10 = 0,
HasPow = 0,
HasSin = 0,
@@ -359,6 +360,10 @@ Packet pexp(const Packet& a) { using std::exp; return exp(a); }
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet plog(const Packet& a) { using std::log; return log(a); }
/** \internal \returns the log10 of \a a (coeff-wise) */
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet plog10(const Packet& a) { using std::log10; return log10(a); }
/** \internal \returns the square-root of \a a (coeff-wise) */
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet psqrt(const Packet& a) { using std::sqrt; return sqrt(a); }