aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-01-29 21:28:23 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-01-29 21:28:23 +0100
commitb6521b799f6d14761ff8e0000a1911d560a79a0e (patch)
tree53864887da5f656c7d50ad33f0a091a5120df2f2
parent6dee5440e4971781077769913586e9748b1d6dbf (diff)
add specialization of ei_ref_selector for Array (fix a big perf issue \!)
-rw-r--r--Eigen/src/Core/util/XprHelper.h7
1 files changed, 7 insertions, 0 deletions
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<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
+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