mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
more sun studio fixes
This commit is contained in:
parent
ec5c608aa3
commit
ab17f92728
@ -45,7 +45,7 @@ struct ei_traits<CwiseUnaryView<ViewOp, MatrixType> >
|
||||
ViewOp(typename ei_traits<MatrixType>::Scalar)
|
||||
>::type Scalar;
|
||||
typedef typename MatrixType::Nested MatrixTypeNested;
|
||||
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
|
||||
typedef typename ei_cleantype<MatrixTypeNested>::type _MatrixTypeNested;
|
||||
enum {
|
||||
Flags = (ei_traits<_MatrixTypeNested>::Flags & (HereditaryBits | LinearAccessBit | AlignedBit)),
|
||||
CoeffReadCost = ei_traits<_MatrixTypeNested>::CoeffReadCost + ei_functor_traits<ViewOp>::Cost
|
||||
|
@ -83,13 +83,15 @@ struct ProductReturnType<Lhs,Rhs,CacheFriendlyProduct>
|
||||
template<typename Lhs, typename Rhs> struct ei_product_mode
|
||||
{
|
||||
enum{
|
||||
// workaround sun studio:
|
||||
LhsIsVectorAtCompileTime = ei_traits<Lhs>::ColsAtCompileTime==1 || ei_traits<Rhs>::ColsAtCompileTime==1,
|
||||
value = ei_is_diagonal<Rhs>::ret || ei_is_diagonal<Lhs>::ret
|
||||
? DiagonalProduct
|
||||
: ei_traits<Lhs>::MaxColsAtCompileTime == Dynamic
|
||||
&& ( ei_traits<Lhs>::MaxRowsAtCompileTime == Dynamic
|
||||
|| ei_traits<Rhs>::MaxColsAtCompileTime == Dynamic )
|
||||
&& (!(ei_traits<Rhs>::IsVectorAtCompileTime && (ei_traits<Lhs>::Flags&RowMajorBit) && (!(ei_traits<Lhs>::Flags&DirectAccessBit))))
|
||||
&& (!(ei_traits<Lhs>::IsVectorAtCompileTime && (!(ei_traits<Rhs>::Flags&RowMajorBit)) && (!(ei_traits<Rhs>::Flags&DirectAccessBit))))
|
||||
&& (!(Rhs::IsVectorAtCompileTime && (ei_traits<Lhs>::Flags&RowMajorBit) && (!(ei_traits<Lhs>::Flags&DirectAccessBit))))
|
||||
&& (!(LhsIsVectorAtCompileTime && (!(ei_traits<Rhs>::Flags&RowMajorBit)) && (!(ei_traits<Rhs>::Flags&DirectAccessBit))))
|
||||
&& (ei_is_same_type<typename ei_traits<Lhs>::Scalar, typename ei_traits<Rhs>::Scalar>::ret)
|
||||
? CacheFriendlyProduct
|
||||
: NormalProduct };
|
||||
|
@ -198,13 +198,6 @@ const unsigned int SelfAdjoint = SelfAdjointBit;
|
||||
const unsigned int UnitUpperTriangular = UpperTriangularBit | UnitDiagBit;
|
||||
const unsigned int UnitLowerTriangular = LowerTriangularBit | UnitDiagBit;
|
||||
|
||||
template<typename T> struct ei_is_diagonal
|
||||
{
|
||||
enum {
|
||||
ret = ( int(ei_traits<T>::Flags) & DiagonalBits ) == DiagonalBits
|
||||
};
|
||||
};
|
||||
|
||||
enum { Aligned, Unaligned };
|
||||
enum { ForceAligned, AsRequested };
|
||||
enum { ConditionalJumpCost = 5 };
|
||||
|
@ -217,7 +217,7 @@ template<typename Derived,typename Scalar,typename OtherScalar,
|
||||
bool EnableIt = !ei_is_same_type<Scalar,OtherScalar>::ret >
|
||||
struct ei_special_scalar_op_base
|
||||
{
|
||||
// dummy operator* so that the
|
||||
// dummy operator* so that the
|
||||
// "using ei_special_scalar_op_base::operator*" compiles
|
||||
void operator*() const;
|
||||
};
|
||||
@ -249,7 +249,7 @@ template<typename ExpressionType> struct HNormalizedReturnType {
|
||||
typedef Block<ExpressionType,
|
||||
ei_traits<ExpressionType>::ColsAtCompileTime==1 ? SizeMinusOne : 1,
|
||||
ei_traits<ExpressionType>::ColsAtCompileTime==1 ? 1 : SizeMinusOne> StartMinusOne;
|
||||
typedef CwiseUnaryOp<ei_scalar_quotient1_op<typename ei_traits<ExpressionType>::Scalar>,
|
||||
typedef CwiseUnaryOp<ei_scalar_quotient1_op<typename ei_traits<ExpressionType>::Scalar>,
|
||||
NestByValue<StartMinusOne> > Type;
|
||||
};
|
||||
|
||||
@ -262,4 +262,11 @@ template<typename XprType, typename CastType> struct ei_cast_return_type
|
||||
const XprType&,CastType>::ret type;
|
||||
};
|
||||
|
||||
template<typename T> struct ei_is_diagonal
|
||||
{
|
||||
enum {
|
||||
ret = ( int(ei_traits<T>::Flags) & DiagonalBits ) == DiagonalBits
|
||||
};
|
||||
};
|
||||
|
||||
#endif // EIGEN_XPRHELPER_H
|
||||
|
Loading…
Reference in New Issue
Block a user