From d3f52debc6c45d1f26bb9406207ebc5a8638a429 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Mon, 13 Oct 2014 17:18:26 +0200 Subject: Make cuda_basic test compile again by adding lots of EIGEN_DEVICE_FUNC. Although the test passes now, there might still be some missing. --- Eigen/src/Core/Product.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Eigen/src/Core/Product.h') diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index ae64d5200..cb79543ef 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -68,7 +68,7 @@ struct traits > typename RhsTraits::StorageKind, internal::product_type::ret>::ret StorageKind; typedef typename promote_index_type::type Index; + typename RhsTraits::Index>::type Index; enum { RowsAtCompileTime = LhsTraits::RowsAtCompileTime, @@ -113,18 +113,18 @@ class Product : public ProductImpl<_Lhs,_Rhs,Option, typedef typename internal::remove_all::type LhsNestedCleaned; typedef typename internal::remove_all::type RhsNestedCleaned; - Product(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) + EIGEN_DEVICE_FUNC Product(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) { eigen_assert(lhs.cols() == rhs.rows() && "invalid matrix product" && "if you wanted a coeff-wise or a dot product use the respective explicit functions"); } - inline Index rows() const { return m_lhs.rows(); } - inline Index cols() const { return m_rhs.cols(); } + EIGEN_DEVICE_FUNC inline Index rows() const { return m_lhs.rows(); } + EIGEN_DEVICE_FUNC inline Index cols() const { return m_rhs.cols(); } - const LhsNestedCleaned& lhs() const { return m_lhs; } - const RhsNestedCleaned& rhs() const { return m_rhs; } + EIGEN_DEVICE_FUNC const LhsNestedCleaned& lhs() const { return m_lhs; } + EIGEN_DEVICE_FUNC const RhsNestedCleaned& rhs() const { return m_rhs; } protected: @@ -186,7 +186,7 @@ class ProductImpl public: - Scalar coeff(Index row, Index col) const + EIGEN_DEVICE_FUNC Scalar coeff(Index row, Index col) const { EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS); eigen_assert( (Option==LazyProduct) || (this->rows() == 1 && this->cols() == 1) ); @@ -194,7 +194,7 @@ class ProductImpl return typename internal::evaluator::type(derived()).coeff(row,col); } - Scalar coeff(Index i) const + EIGEN_DEVICE_FUNC Scalar coeff(Index i) const { EIGEN_STATIC_ASSERT(EnableCoeff, THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS); eigen_assert( (Option==LazyProduct) || (this->rows() == 1 && this->cols() == 1) ); -- cgit v1.2.3