diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-09-05 15:26:56 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-09-05 15:26:56 +0200 |
commit | d123717e21d6b0d073b3bf7ef96eae7c0651b3b3 (patch) | |
tree | c899ec4e59e6763dcefbd3d078e31bbe8b719c4a /Eigen/src/Core/CoreEvaluators.h | |
parent | 373c340b71e1944bc4f8a8663ffc67cb112fc689 (diff) |
Fix for msvc 2012 and older
Diffstat (limited to 'Eigen/src/Core/CoreEvaluators.h')
-rw-r--r-- | Eigen/src/Core/CoreEvaluators.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 5766b6f9d..9b90543c3 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -373,11 +373,7 @@ struct nullary_wrapper<Scalar,NullaryOp,false,false,true> // In this case, i==0 and j is used for the actual iteration. template<typename Scalar,typename NullaryOp> struct nullary_wrapper<Scalar,NullaryOp,false,true,false> - : nullary_wrapper<Scalar,NullaryOp,false,true,true> // to get the identity wrapper { - typedef nullary_wrapper<Scalar,NullaryOp,false,true,true> base; - using base::operator(); - using base::packetOp; template <typename Index> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, Index i, Index j) const { eigen_assert(i==0 || j==0); @@ -387,6 +383,11 @@ struct nullary_wrapper<Scalar,NullaryOp,false,true,false> eigen_assert(i==0 || j==0); return op.template packetOp<T>(i+j); } + + template <typename Index> + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, Index i) const { return op(i); } + template <typename T, typename Index> + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, Index i) const { return op.template packetOp<T>(i); } }; template<typename Scalar,typename NullaryOp> |