Guard use of long double on GPU device.

(cherry picked from commit bc5cdc7a67)
This commit is contained in:
Antonio Sánchez
2023-02-24 21:49:59 +00:00
committed by Antonio Sanchez
parent 8f1b6198c2
commit 2ce5dc428f
3 changed files with 20 additions and 1 deletions

View File

@@ -245,6 +245,8 @@ template<> struct NumTraits<double> : GenericNumTraits<double>
static inline double dummy_precision() { return 1e-12; }
};
// GPU devices treat `long double` as `double`.
#ifndef EIGEN_GPU_COMPILE_PHASE
template<> struct NumTraits<long double>
: GenericNumTraits<long double>
{
@@ -261,6 +263,7 @@ template<> struct NumTraits<long double>
}
#endif
};
#endif
template<typename _Real> struct NumTraits<std::complex<_Real> >
: GenericNumTraits<std::complex<_Real> >