Added several missing EIGEN_DEVICE_FUNC qualifiers

This commit is contained in:
Benoit Steiner 2016-09-14 14:06:21 -07:00
parent 488ad7dd1b
commit c0d56a543e
6 changed files with 11 additions and 10 deletions

View File

@ -50,7 +50,7 @@ public:
typedef typename internal::ref_selector<Inverse>::type Nested; typedef typename internal::ref_selector<Inverse>::type Nested;
typedef typename internal::remove_all<XprType>::type NestedExpression; typedef typename internal::remove_all<XprType>::type NestedExpression;
explicit Inverse(const XprType &xpr) explicit EIGEN_DEVICE_FUNC Inverse(const XprType &xpr)
: m_xpr(xpr) : m_xpr(xpr)
{} {}

View File

@ -1312,11 +1312,12 @@ template<typename Scalar>
struct scalar_fuzzy_default_impl<Scalar, true, false> struct scalar_fuzzy_default_impl<Scalar, true, false>
{ {
typedef typename NumTraits<Scalar>::Real RealScalar; typedef typename NumTraits<Scalar>::Real RealScalar;
template<typename OtherScalar> template<typename OtherScalar> EIGEN_DEVICE_FUNC
static inline bool isMuchSmallerThan(const Scalar& x, const OtherScalar& y, const RealScalar& prec) static inline bool isMuchSmallerThan(const Scalar& x, const OtherScalar& y, const RealScalar& prec)
{ {
return numext::abs2(x) <= numext::abs2(y) * prec * prec; return numext::abs2(x) <= numext::abs2(y) * prec * prec;
} }
EIGEN_DEVICE_FUNC
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec) static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
{ {
return numext::abs2(x - y) <= numext::mini(numext::abs2(x), numext::abs2(y)) * prec * prec; return numext::abs2(x - y) <= numext::mini(numext::abs2(x), numext::abs2(y)) * prec * prec;

View File

@ -98,7 +98,7 @@ template<typename Derived> class MatrixBase
/** \returns the size of the main diagonal, which is min(rows(),cols()). /** \returns the size of the main diagonal, which is min(rows(),cols()).
* \sa rows(), cols(), SizeAtCompileTime. */ * \sa rows(), cols(), SizeAtCompileTime. */
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC
inline Index diagonalSize() const { return (std::min)(rows(),cols()); } inline Index diagonalSize() const { return (numext::mini)(rows(),cols()); }
typedef typename Base::PlainObject PlainObject; typedef typename Base::PlainObject PlainObject;

View File

@ -156,7 +156,7 @@ template<typename _MatrixType> class FullPivLU
* *
* \sa permutationQ() * \sa permutationQ()
*/ */
inline const PermutationPType& permutationP() const EIGEN_DEVICE_FUNC inline const PermutationPType& permutationP() const
{ {
eigen_assert(m_isInitialized && "LU is not initialized."); eigen_assert(m_isInitialized && "LU is not initialized.");
return m_p; return m_p;
@ -406,8 +406,8 @@ template<typename _MatrixType> class FullPivLU
MatrixType reconstructedMatrix() const; MatrixType reconstructedMatrix() const;
inline Index rows() const { return m_lu.rows(); } EIGEN_DEVICE_FUNC inline Index rows() const { return m_lu.rows(); }
inline Index cols() const { return m_lu.cols(); } EIGEN_DEVICE_FUNC inline Index cols() const { return m_lu.cols(); }
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename RhsType, typename DstType> template<typename RhsType, typename DstType>
@ -879,7 +879,7 @@ struct Assignment<DstXprType, Inverse<FullPivLU<MatrixType> >, internal::assign_
* *
* \sa class FullPivLU * \sa class FullPivLU
*/ */
template<typename Derived> template<typename Derived> EIGEN_DEVICE_FUNC
inline const FullPivLU<typename MatrixBase<Derived>::PlainObject> inline const FullPivLU<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::fullPivLu() const MatrixBase<Derived>::fullPivLu() const
{ {

View File

@ -327,7 +327,7 @@ struct Assignment<DstXprType, Inverse<XprType>, internal::assign_op<typename Dst
* *
* \sa computeInverseAndDetWithCheck() * \sa computeInverseAndDetWithCheck()
*/ */
template<typename Derived> template<typename Derived> EIGEN_DEVICE_FUNC
inline const Inverse<Derived> MatrixBase<Derived>::inverse() const inline const Inverse<Derived> MatrixBase<Derived>::inverse() const
{ {
EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsInteger,THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES) EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsInteger,THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)

View File

@ -584,7 +584,7 @@ struct Assignment<DstXprType, Inverse<PartialPivLU<MatrixType> >, internal::assi
* *
* \sa class PartialPivLU * \sa class PartialPivLU
*/ */
template<typename Derived> template<typename Derived> EIGEN_DEVICE_FUNC
inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject> inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::partialPivLu() const MatrixBase<Derived>::partialPivLu() const
{ {
@ -599,7 +599,7 @@ MatrixBase<Derived>::partialPivLu() const
* *
* \sa class PartialPivLU * \sa class PartialPivLU
*/ */
template<typename Derived> template<typename Derived> EIGEN_DEVICE_FUNC
inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject> inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::lu() const MatrixBase<Derived>::lu() const
{ {