diff options
author | 2015-03-11 13:13:30 +1000 | |
---|---|---|
committer | 2015-03-11 13:13:30 +1000 | |
commit | f89fcefa79382f5a93c38927b79f40973b2e71f2 (patch) | |
tree | cce6240c97665b979ee80b772e1b6b5fe05fab22 /Eigen/src/Core/GenericPacketMath.h | |
parent | a5e49976f5534aa1acd84eb6a375a1fbb0eac87c (diff) |
Add hyperbolic trigonometric functions from std array support
Diffstat (limited to 'Eigen/src/Core/GenericPacketMath.h')
-rw-r--r-- | Eigen/src/Core/GenericPacketMath.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index 0ecd6fc2d..35701cce4 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -70,6 +70,9 @@ struct default_packet_traits HasASin = 0, HasACos = 0, HasATan = 0, + HasSinh = 0, + HasCosh = 0, + HasTanh = 0, HasRound = 0, HasFloor = 0, @@ -348,10 +351,22 @@ Packet pasin(const Packet& a) { using std::asin; return asin(a); } template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pacos(const Packet& a) { using std::acos; return acos(a); } -/** \internal \returns the atan of \a a (coeff-wise) */ +/** \internal \returns the arc tangent of \a a (coeff-wise) */ template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet patan(const Packet& a) { using std::atan; return atan(a); } +/** \internal \returns the hyperbolic sine of \a a (coeff-wise) */ +template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS +Packet psinh(const Packet& a) { using std::sinh; return sinh(a); } + +/** \internal \returns the hyperbolic cosine of \a a (coeff-wise) */ +template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS +Packet pcosh(const Packet& a) { using std::cosh; return cosh(a); } + +/** \internal \returns the hyperbolic tan of \a a (coeff-wise) */ +template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS +Packet ptanh(const Packet& a) { using std::tanh; return tanh(a); } + /** \internal \returns the exp of \a a (coeff-wise) */ template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pexp(const Packet& a) { using std::exp; return exp(a); } |