mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fixes #2735: Component-wise cbrt
This commit is contained in:
committed by
Charles Schlosser
parent
48b254a4bc
commit
5de0f2f89e
@@ -1394,6 +1394,14 @@ bool sqrt<bool>(const bool &x) { return x; }
|
||||
SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(sqrt, sqrt)
|
||||
#endif
|
||||
|
||||
/** \returns the cube root of \a x. **/
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
T cbrt(const T &x) {
|
||||
EIGEN_USING_STD(cbrt);
|
||||
return static_cast<T>(cbrt(x));
|
||||
}
|
||||
|
||||
/** \returns the reciprocal square root of \a x. **/
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
|
||||
Reference in New Issue
Block a user