aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CwiseUnaryView.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-07-10 16:10:03 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-07-10 16:10:03 +0200
commitec5c608aa3caea7f14aa03e4e13041ee9e2664de (patch)
tree378fa9a1859181bfd5ca6161997532cc9a0a87d2 /Eigen/src/Core/CwiseUnaryView.h
parent1c52985aa7673ef925c484969808fe017b71f377 (diff)
Set of fixes and workaround to make sun studio more happy.
Still remains the problem of alignment and vectorization.
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryView.h')
-rw-r--r--Eigen/src/Core/CwiseUnaryView.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h
index c8fd98ea1..8d8b51b4c 100644
--- a/Eigen/src/Core/CwiseUnaryView.h
+++ b/Eigen/src/Core/CwiseUnaryView.h
@@ -42,13 +42,13 @@ struct ei_traits<CwiseUnaryView<ViewOp, MatrixType> >
: ei_traits<MatrixType>
{
typedef typename ei_result_of<
- ViewOp(typename MatrixType::Scalar)
+ ViewOp(typename ei_traits<MatrixType>::Scalar)
>::type Scalar;
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
enum {
- Flags = (_MatrixTypeNested::Flags & (HereditaryBits | LinearAccessBit | AlignedBit)),
- CoeffReadCost = _MatrixTypeNested::CoeffReadCost + ei_functor_traits<ViewOp>::Cost
+ Flags = (ei_traits<_MatrixTypeNested>::Flags & (HereditaryBits | LinearAccessBit | AlignedBit)),
+ CoeffReadCost = ei_traits<_MatrixTypeNested>::CoeffReadCost + ei_functor_traits<ViewOp>::Cost
};
};
@@ -62,7 +62,7 @@ class CwiseUnaryView : ei_no_assignment_operator,
inline CwiseUnaryView(const MatrixType& mat, const ViewOp& func = ViewOp())
: m_matrix(mat), m_functor(func) {}
-
+
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryView)
EIGEN_STRONG_INLINE int rows() const { return m_matrix.rows(); }
@@ -77,7 +77,7 @@ class CwiseUnaryView : ei_no_assignment_operator,
{
return m_functor(m_matrix.coeff(index));
}
-
+
EIGEN_STRONG_INLINE Scalar& coeffRef(int row, int col)
{
return m_functor(m_matrix.const_cast_derived().coeffRef(row, col));
@@ -89,7 +89,8 @@ class CwiseUnaryView : ei_no_assignment_operator,
}
protected:
- const typename MatrixType::Nested m_matrix;
+ // FIXME changed from MatrixType::Nested because of a weird compilation error with sun CC
+ const typename ei_nested<MatrixType>::type m_matrix;
const ViewOp m_functor;
};