Add EIGEN_DEVICE_FUNC to DenseBase::hasNaN() and DenseBase::allFinite().

This commit is contained in:
Ali Can Demiralp 2021-11-27 11:27:52 +00:00 committed by David Tellenbach
parent b8b6566f0f
commit 96e537d6fd

View File

@ -136,7 +136,7 @@ EIGEN_DEVICE_FUNC inline Eigen::Index DenseBase<Derived>::count() const
* \sa allFinite() * \sa allFinite()
*/ */
template<typename Derived> template<typename Derived>
inline bool DenseBase<Derived>::hasNaN() const EIGEN_DEVICE_FUNC inline bool DenseBase<Derived>::hasNaN() const
{ {
#if EIGEN_COMP_MSVC || (defined __FAST_MATH__) #if EIGEN_COMP_MSVC || (defined __FAST_MATH__)
return derived().array().isNaN().any(); return derived().array().isNaN().any();
@ -150,7 +150,7 @@ inline bool DenseBase<Derived>::hasNaN() const
* \sa hasNaN() * \sa hasNaN()
*/ */
template<typename Derived> template<typename Derived>
inline bool DenseBase<Derived>::allFinite() const EIGEN_DEVICE_FUNC inline bool DenseBase<Derived>::allFinite() const
{ {
#if EIGEN_COMP_MSVC || (defined __FAST_MATH__) #if EIGEN_COMP_MSVC || (defined __FAST_MATH__)
return derived().array().isFinite().all(); return derived().array().isFinite().all();