mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 01:59:38 +08:00
Fix GPU build for ptanh_float.
This commit is contained in:
parent
b14c5d0fa1
commit
6b365e74d6
@ -980,7 +980,7 @@ EIGEN_DEVICE_FUNC bool isnan_impl(const std::complex<T>& x);
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
EIGEN_DEVICE_FUNC bool isinf_impl(const std::complex<T>& x);
|
EIGEN_DEVICE_FUNC bool isinf_impl(const std::complex<T>& x);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T ptanh_float(const T& a_x);
|
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS T ptanh_float(const T& a_x);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Implementation of sign *
|
* Implementation of sign *
|
||||||
|
@ -939,7 +939,7 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet patan_double(const Pa
|
|||||||
This implementation works on both scalars and packets.
|
This implementation works on both scalars and packets.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T ptanh_float(const T& a_x) {
|
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS T ptanh_float(const T& a_x) {
|
||||||
// Clamp the inputs to the range [-c, c]
|
// Clamp the inputs to the range [-c, c]
|
||||||
#ifdef EIGEN_VECTORIZE_FMA
|
#ifdef EIGEN_VECTORIZE_FMA
|
||||||
const T plus_clamp = pset1<T>(7.99881172180175781f);
|
const T plus_clamp = pset1<T>(7.99881172180175781f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user