From f5aa64086228ca9ccfa27e6086667fd0bdbad22c Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 15 Jul 2015 10:57:55 +0200 Subject: Clean some previous changes and more cuda fixes --- Eigen/src/Core/Visitor.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Eigen/src/Core/Visitor.h') diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h index 06c8bbf11..374972d3e 100644 --- a/Eigen/src/Core/Visitor.h +++ b/Eigen/src/Core/Visitor.h @@ -22,6 +22,7 @@ struct visitor_impl row = (UnrollCount-1) % Derived::RowsAtCompileTime }; + EIGEN_DEVICE_FUNC static inline void run(const Derived &mat, Visitor& visitor) { visitor_impl::run(mat, visitor); @@ -32,6 +33,7 @@ struct visitor_impl template struct visitor_impl { + EIGEN_DEVICE_FUNC static inline void run(const Derived &mat, Visitor& visitor) { return visitor.init(mat.coeff(0, 0), 0, 0); @@ -41,6 +43,7 @@ struct visitor_impl template struct visitor_impl { + EIGEN_DEVICE_FUNC static inline void run(const Derived& mat, Visitor& visitor) { visitor.init(mat.coeff(0,0), 0, 0); @@ -57,6 +60,7 @@ template class visitor_evaluator { public: + EIGEN_DEVICE_FUNC explicit visitor_evaluator(const XprType &xpr) : m_evaluator(xpr), m_xpr(xpr) {} typedef typename XprType::Scalar Scalar; @@ -67,11 +71,11 @@ public: CoeffReadCost = internal::evaluator::CoeffReadCost }; - Index rows() const { return m_xpr.rows(); } - Index cols() const { return m_xpr.cols(); } - Index size() const { return m_xpr.size(); } + EIGEN_DEVICE_FUNC Index rows() const { return m_xpr.rows(); } + EIGEN_DEVICE_FUNC Index cols() const { return m_xpr.cols(); } + EIGEN_DEVICE_FUNC Index size() const { return m_xpr.size(); } - CoeffReturnType coeff(Index row, Index col) const + EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index col) const { return m_evaluator.coeff(row, col); } protected: -- cgit v1.2.3