aboutsummaryrefslogtreecommitdiff
path: root/Eigen
diff options
context:
space:
mode:
authorAmi Patel <ampatel@google.com>2014-01-08 18:03:53 -0800
committerAmi Patel <ampatel@google.com>2014-01-09 02:06:01 +0000
commit810535bb0c575a003b32076e5352ab8fd3f23a1c (patch)
tree031716f05015ac78f8d4eac45a83985cd9a2a0fd /Eigen
parent065eab35a57ae1766db5bf457b81c7f9aaecae3a (diff)
downloadeigen-810535bb0c575a003b32076e5352ab8fd3f23a1c.tar.gz
Partially syncs eigen with the google3 version.
Needed to build https://googleplex-android-review.git.corp.google.com/#/c/401377/ Change-Id: I7b1d3a8c6eec4c919edd08c87b7a5f8410bb12bb
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/ArrayWrapper.h2
-rw-r--r--Eigen/src/Core/CwiseUnaryView.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h
index 87af7fda9..98f677d74 100644
--- a/Eigen/src/Core/ArrayWrapper.h
+++ b/Eigen/src/Core/ArrayWrapper.h
@@ -168,7 +168,7 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
inline Index outerStride() const { return m_expression.outerStride(); }
inline Index innerStride() const { return m_expression.innerStride(); }
- inline ScalarWithConstIfNotLvalue* data() { return m_expression.data(); }
+ inline ScalarWithConstIfNotLvalue* data() { return m_expression.const_cast_derived().data(); }
inline const Scalar* data() const { return m_expression.data(); }
inline CoeffReturnType coeff(Index row, Index col) const
diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h
index 66f73a950..9a56debaf 100644
--- a/Eigen/src/Core/CwiseUnaryView.h
+++ b/Eigen/src/Core/CwiseUnaryView.h
@@ -99,6 +99,9 @@ class CwiseUnaryViewImpl<ViewOp,MatrixType,Dense>
EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
+ inline Scalar* data() { return &coeffRef(0); }
+ inline const Scalar* data() const { return &coeff(0); }
+
inline Index innerStride() const
{
return derived().nestedExpression().innerStride() * sizeof(typename internal::traits<MatrixType>::Scalar) / sizeof(Scalar);