From 883168ed94ca2559231861957558a9ded13e4831 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 30 Oct 2014 20:16:16 +0100 Subject: [PATCH] Make select CUDA compatible (comparison operators aren't yet, so no test case yet) --- Eigen/src/Core/CoreEvaluators.h | 6 +++--- Eigen/src/Core/Select.h | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 836d25b3b..a0dc72c4d 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -859,7 +859,7 @@ struct evaluator > Flags = (unsigned int)evaluator::Flags & evaluator::Flags & HereditaryBits }; - EIGEN_DEVICE_FUNC explicit evaluator(const XprType& select) + inline EIGEN_DEVICE_FUNC explicit evaluator(const XprType& select) : m_conditionImpl(select.conditionMatrix()), m_thenImpl(select.thenMatrix()), m_elseImpl(select.elseMatrix()) @@ -868,7 +868,7 @@ struct evaluator > typedef typename XprType::Index Index; typedef typename XprType::CoeffReturnType CoeffReturnType; - EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index col) const + inline EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index col) const { if (m_conditionImpl.coeff(row, col)) return m_thenImpl.coeff(row, col); @@ -876,7 +876,7 @@ struct evaluator > return m_elseImpl.coeff(row, col); } - EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const + inline EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const { if (m_conditionImpl.coeff(index)) return m_thenImpl.coeff(index); diff --git a/Eigen/src/Core/Select.h b/Eigen/src/Core/Select.h index 0cb85a4ad..0c09a4ff4 100644 --- a/Eigen/src/Core/Select.h +++ b/Eigen/src/Core/Select.h @@ -57,6 +57,7 @@ class Select : internal::no_assignment_operator, typedef typename internal::dense_xpr_base