aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Product.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-10-13 17:18:26 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-10-13 17:18:26 +0200
commitd3f52debc6c45d1f26bb9406207ebc5a8638a429 (patch)
tree13d7f11f39832cc6a0937128193dc97c52276b97 /Eigen/src/Core/Product.h
parenta80e17cfe86c5803965dd002c8bd9c5b80591135 (diff)
Make cuda_basic test compile again by adding lots of EIGEN_DEVICE_FUNC.
Although the test passes now, there might still be some missing.
Diffstat (limited to 'Eigen/src/Core/Product.h')
-rw-r--r--Eigen/src/Core/Product.h16
1 files changed, 8 insertions, 8 deletions
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<Product<Lhs, Rhs, Option> >
typename RhsTraits::StorageKind,
internal::product_type<Lhs,Rhs>::ret>::ret StorageKind;
typedef typename promote_index_type<typename LhsTraits::Index,
- typename RhsTraits::Index>::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<LhsNested>::type LhsNestedCleaned;
typedef typename internal::remove_all<RhsNested>::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<Lhs,Rhs,Option,Dense>
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<Lhs,Rhs,Option,Dense>
return typename internal::evaluator<Derived>::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) );