From 465ede0f20bae4795cd56b6987aaac77c5913bb2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 20 Nov 2016 09:41:37 +0100 Subject: Fix compilation issue in mat = permutation (regression introduced in 8193ffb3d38b56c9295f204dc57dc6bac74f58aa ) --- Eigen/src/Core/AssignEvaluator.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Eigen/src/Core/AssignEvaluator.h') diff --git a/Eigen/src/Core/AssignEvaluator.h b/Eigen/src/Core/AssignEvaluator.h index 6225bd73d..0d0189657 100644 --- a/Eigen/src/Core/AssignEvaluator.h +++ b/Eigen/src/Core/AssignEvaluator.h @@ -877,8 +877,11 @@ struct Assignment src.evalTo(dst); } + // NOTE The following two functions are templated to avoid their instanciation if not needed + // This is needed because some expressions supports evalTo only and/or have 'void' as scalar type. + template EIGEN_DEVICE_FUNC - static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op &/*func*/) + static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op &/*func*/) { Index dstRows = src.rows(); Index dstCols = src.cols(); @@ -889,8 +892,9 @@ struct Assignment src.addTo(dst); } + template EIGEN_DEVICE_FUNC - static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op &/*func*/) + static EIGEN_STRONG_INLINE void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op &/*func*/) { Index dstRows = src.rows(); Index dstCols = src.cols(); -- cgit v1.2.3