From b6521b799f6d14761ff8e0000a1911d560a79a0e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 29 Jan 2010 21:28:23 +0100 Subject: [PATCH] add specialization of ei_ref_selector for Array (fix a big perf issue \!) --- Eigen/src/Core/util/XprHelper.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index b2496a771..136cc876b 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -228,6 +228,13 @@ struct ei_ref_selector< Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCo typedef MatrixType const& type; }; +template +struct ei_ref_selector< Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > +{ + typedef Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> ArrayType; + typedef ArrayType const& type; +}; + /** \internal Determines how a given expression should be nested into another one. * For example, when you do a * (b+c), Eigen will determine how the expression b+c should be * nested into the bigger product expression. The choice is between nesting the expression b+c as-is, or