mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-24 14:45:14 +08:00
Made sure the code compiles when EIGEN_HAS_C99_MATH isn't defined
This commit is contained in:
parent
f933f69021
commit
bcbde37a11
@ -134,7 +134,24 @@ struct lgamma_impl<double> {
|
||||
* Implementation of digamma (psi) *
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template <typename Scalar>
|
||||
struct digamma_retval {
|
||||
typedef Scalar type;
|
||||
};
|
||||
|
||||
#ifndef EIGEN_HAS_C99_MATH
|
||||
|
||||
template <typename Scalar>
|
||||
struct digamma_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
static Scalar run(Scalar x) {
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, Scalar>::value == false),
|
||||
THIS_TYPE_IS_NOT_SUPPORTED);
|
||||
return Scalar(0);
|
||||
}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
*
|
||||
@ -202,14 +219,6 @@ struct digamma_impl_maybe_poly<double> {
|
||||
}
|
||||
};
|
||||
|
||||
#endif // EIGEN_HAS_C99_MATH
|
||||
|
||||
template <typename Scalar>
|
||||
struct digamma_retval {
|
||||
typedef Scalar type;
|
||||
};
|
||||
|
||||
#ifdef EIGEN_HAS_C99_MATH
|
||||
template <typename Scalar>
|
||||
struct digamma_impl {
|
||||
EIGEN_DEVICE_FUNC
|
||||
|
Loading…
Reference in New Issue
Block a user