Set of fixes and workaround to make sun studio more happy.

Still remains the problem of alignment and vectorization.
This commit is contained in:
Gael Guennebaud
2009-07-10 16:10:03 +02:00
parent 1c52985aa7
commit ec5c608aa3
15 changed files with 81 additions and 72 deletions

View File

@@ -137,10 +137,14 @@ template<typename Derived> class MatrixBase
* constructed from this one. See the \ref flags "list of flags".
*/
CoeffReadCost = ei_traits<Derived>::CoeffReadCost
CoeffReadCost = ei_traits<Derived>::CoeffReadCost,
/**< This is a rough measure of how expensive it is to read one coefficient from
* this expression.
*/
#ifndef EIGEN_PARSED_BY_DOXYGEN
_HasDirectAccess = (int(Flags)&DirectAccessBit) ? 1 : 0 // workaround sunCC
#endif
};
/** Default constructor. Just checks at compile-time for self-consistency of the flags. */
@@ -204,7 +208,7 @@ template<typename Derived> class MatrixBase
/** \internal the return type of coeff()
*/
typedef typename ei_meta_if<bool(int(Flags)&DirectAccessBit), const Scalar&, Scalar>::ret CoeffReturnType;
typedef typename ei_meta_if<_HasDirectAccess, const Scalar&, Scalar>::ret CoeffReturnType;
/** \internal Represents a matrix with all coefficients equal to one another*/
typedef CwiseNullaryOp<ei_scalar_constant_op<Scalar>,Derived> ConstantReturnType;