aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/SelfCwiseBinaryOp.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-01-05 12:46:07 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-01-05 12:46:07 +0100
commit90d2ae7fec1000c244472c94af24126c5f2ca2a2 (patch)
tree36ca8dca7e3a8fc1707f642b491609bbb85b3b06 /Eigen/src/Core/SelfCwiseBinaryOp.h
parent37851cfe11693a84636b350f5c9fb0ccf993e838 (diff)
fix aliasing detection
Diffstat (limited to 'Eigen/src/Core/SelfCwiseBinaryOp.h')
-rw-r--r--Eigen/src/Core/SelfCwiseBinaryOp.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/Core/SelfCwiseBinaryOp.h b/Eigen/src/Core/SelfCwiseBinaryOp.h
index 55bd93f9e..df35d0ee9 100644
--- a/Eigen/src/Core/SelfCwiseBinaryOp.h
+++ b/Eigen/src/Core/SelfCwiseBinaryOp.h
@@ -35,7 +35,7 @@
* method to directly performs a +=/-= operations in an optimal way. In particular,
* this allows to make sure that the input/output data are loaded only once using
* aligned packet loads.
- *
+ *
* \sa class SwapWrapper for a similar trick.
*/
template<typename BinaryOp, typename MatrixType>
@@ -58,6 +58,7 @@ template<typename BinaryOp, typename MatrixType> class SelfCwiseBinaryOp
inline int rows() const { return m_matrix.rows(); }
inline int cols() const { return m_matrix.cols(); }
inline int stride() const { return m_matrix.stride(); }
+ inline const Scalar* data() const { return m_matrix.data(); }
// note that this function is needed by assign to correctly align loads/stores
// TODO make Assign use .data()
@@ -136,5 +137,5 @@ inline Derived& DenseBase<Derived>::operator/=(const Scalar& other)
tmp = PlainMatrixType::Constant(rows(),cols(), NumTraits<Scalar>::HasFloatingPoint ? Scalar(1)/other : other);
return derived();
}
-
+
#endif // EIGEN_SELFCWISEBINARYOP_H