Fixes #2735: Component-wise cbrt

This commit is contained in:
Kyle Macfarlan
2023-10-25 03:06:13 +00:00
committed by Charles Schlosser
parent 48b254a4bc
commit 5de0f2f89e
14 changed files with 87 additions and 2 deletions

View File

@@ -1017,6 +1017,10 @@ Packet plog2(const Packet& a) {
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet psqrt(const Packet& a) { return numext::sqrt(a); }
/** \internal \returns the cube-root of \a a (coeff-wise) */
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet pcbrt(const Packet& a) { return numext::cbrt(a); }
/** \internal \returns the rounded value of \a a (coeff-wise) */
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet pround(const Packet& a) { using numext::round; return round(a); }