mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Remove deprecated code not used by evaluators
This commit is contained in:
@@ -71,11 +71,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
||||
template<typename Derived>
|
||||
inline explicit AlignedBox(const MatrixBase<Derived>& a_p)
|
||||
{
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
typename internal::nested<Derived,2>::type p(a_p.derived());
|
||||
#else
|
||||
typename internal::nested_eval<Derived,2>::type p(a_p.derived());
|
||||
#endif
|
||||
m_min = p;
|
||||
m_max = p;
|
||||
}
|
||||
|
||||
@@ -49,9 +49,6 @@ struct traits<Homogeneous<MatrixType,Direction> >
|
||||
Flags = ColsAtCompileTime==1 ? (TmpFlags & ~RowMajorBit)
|
||||
: RowsAtCompileTime==1 ? (TmpFlags | RowMajorBit)
|
||||
: TmpFlags
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
, CoeffReadCost = _MatrixTypeNested::CoeffReadCost
|
||||
#endif // EIGEN_TEST_EVALUATORS
|
||||
};
|
||||
};
|
||||
|
||||
@@ -80,39 +77,6 @@ template<typename MatrixType,int _Direction> class Homogeneous
|
||||
|
||||
const NestedExpression& nestedExpression() const { return m_matrix; }
|
||||
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
inline Scalar coeff(Index row, Index col) const
|
||||
{
|
||||
if( (int(Direction)==Vertical && row==m_matrix.rows())
|
||||
|| (int(Direction)==Horizontal && col==m_matrix.cols()))
|
||||
return 1;
|
||||
return m_matrix.coeff(row, col);
|
||||
}
|
||||
|
||||
template<typename Rhs>
|
||||
inline const internal::homogeneous_right_product_impl<Homogeneous,Rhs>
|
||||
operator* (const MatrixBase<Rhs>& rhs) const
|
||||
{
|
||||
eigen_assert(int(Direction)==Horizontal);
|
||||
return internal::homogeneous_right_product_impl<Homogeneous,Rhs>(m_matrix,rhs.derived());
|
||||
}
|
||||
|
||||
template<typename Lhs> friend
|
||||
inline const internal::homogeneous_left_product_impl<Homogeneous,Lhs>
|
||||
operator* (const MatrixBase<Lhs>& lhs, const Homogeneous& rhs)
|
||||
{
|
||||
eigen_assert(int(Direction)==Vertical);
|
||||
return internal::homogeneous_left_product_impl<Homogeneous,Lhs>(lhs.derived(),rhs.m_matrix);
|
||||
}
|
||||
|
||||
template<typename Scalar, int Dim, int Mode, int Options> friend
|
||||
inline const internal::homogeneous_left_product_impl<Homogeneous,Transform<Scalar,Dim,Mode,Options> >
|
||||
operator* (const Transform<Scalar,Dim,Mode,Options>& lhs, const Homogeneous& rhs)
|
||||
{
|
||||
eigen_assert(int(Direction)==Vertical);
|
||||
return internal::homogeneous_left_product_impl<Homogeneous,Transform<Scalar,Dim,Mode,Options> >(lhs,rhs.m_matrix);
|
||||
}
|
||||
#else
|
||||
template<typename Rhs>
|
||||
inline const Product<Homogeneous,Rhs>
|
||||
operator* (const MatrixBase<Rhs>& rhs) const
|
||||
@@ -136,7 +100,6 @@ template<typename MatrixType,int _Direction> class Homogeneous
|
||||
eigen_assert(int(Direction)==Vertical);
|
||||
return Product<Transform<Scalar,Dim,Mode,Options>, Homogeneous>(lhs,rhs);
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename Func>
|
||||
EIGEN_STRONG_INLINE typename internal::result_of<Func(Scalar)>::type
|
||||
@@ -338,8 +301,6 @@ struct homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs>
|
||||
typename Rhs::Nested m_rhs;
|
||||
};
|
||||
|
||||
#ifdef EIGEN_TEST_EVALUATORS
|
||||
|
||||
template<typename ArgType,int Direction>
|
||||
struct evaluator_traits<Homogeneous<ArgType,Direction> >
|
||||
{
|
||||
@@ -427,8 +388,6 @@ struct generic_product_impl<Transform<Scalar,Dim,Mode,Options>, Homogeneous<RhsA
|
||||
}
|
||||
};
|
||||
|
||||
#endif // EIGEN_TEST_EVALUATORS
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
@@ -30,13 +30,8 @@ MatrixBase<Derived>::cross(const MatrixBase<OtherDerived>& other) const
|
||||
|
||||
// Note that there is no need for an expression here since the compiler
|
||||
// optimize such a small temporary very well (even within a complex expression)
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
typename internal::nested<Derived,2>::type lhs(derived());
|
||||
typename internal::nested<OtherDerived,2>::type rhs(other.derived());
|
||||
#else
|
||||
typename internal::nested_eval<Derived,2>::type lhs(derived());
|
||||
typename internal::nested_eval<OtherDerived,2>::type rhs(other.derived());
|
||||
#endif
|
||||
return typename cross_product_return_type<OtherDerived>::type(
|
||||
numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),
|
||||
numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),
|
||||
@@ -81,13 +76,8 @@ MatrixBase<Derived>::cross3(const MatrixBase<OtherDerived>& other) const
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,4)
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,4)
|
||||
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
typedef typename internal::nested<Derived,2>::type DerivedNested;
|
||||
typedef typename internal::nested<OtherDerived,2>::type OtherDerivedNested;
|
||||
#else
|
||||
typedef typename internal::nested_eval<Derived,2>::type DerivedNested;
|
||||
typedef typename internal::nested_eval<OtherDerived,2>::type OtherDerivedNested;
|
||||
#endif
|
||||
DerivedNested lhs(derived());
|
||||
OtherDerivedNested rhs(other.derived());
|
||||
|
||||
@@ -114,13 +104,8 @@ VectorwiseOp<ExpressionType,Direction>::cross(const MatrixBase<OtherDerived>& ot
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),
|
||||
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
|
||||
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
typename internal::nested<ExpressionType,2>::type mat(_expression());
|
||||
typename internal::nested<OtherDerived,2>::type vec(other.derived());
|
||||
#else
|
||||
typename internal::nested_eval<ExpressionType,2>::type mat(_expression());
|
||||
typename internal::nested_eval<OtherDerived,2>::type vec(other.derived());
|
||||
#endif
|
||||
|
||||
CrossReturnType res(_expression().rows(),_expression().cols());
|
||||
if(Direction==Vertical)
|
||||
|
||||
@@ -217,11 +217,7 @@ struct traits<Quaternion<_Scalar,_Options> >
|
||||
typedef _Scalar Scalar;
|
||||
typedef Matrix<_Scalar,4,1,_Options> Coefficients;
|
||||
enum{
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
IsAligned = internal::traits<Coefficients>::Flags & AlignedBit,
|
||||
#else
|
||||
IsAligned = (internal::traits<Coefficients>::EvaluatorFlags & AlignedBit) != 0,
|
||||
#endif
|
||||
Flags = IsAligned ? (AlignedBit | LvalueBit) : LvalueBit
|
||||
};
|
||||
};
|
||||
|
||||
@@ -62,7 +62,6 @@ struct transform_construct_from_matrix;
|
||||
|
||||
template<typename TransformType> struct transform_take_affine_part;
|
||||
|
||||
#ifdef EIGEN_TEST_EVALUATORS
|
||||
template<typename _Scalar, int _Dim, int _Mode, int _Options>
|
||||
struct traits<Transform<_Scalar,_Dim,_Mode,_Options> >
|
||||
{
|
||||
@@ -78,7 +77,6 @@ struct traits<Transform<_Scalar,_Dim,_Mode,_Options> >
|
||||
Flags = 0
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
@@ -374,10 +372,8 @@ public:
|
||||
inline QTransform toQTransform(void) const;
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_EVALUATORS
|
||||
Index rows() const { return int(Mode)==int(Projective) ? m_matrix.cols() : (m_matrix.cols()-1); }
|
||||
Index cols() const { return m_matrix.cols(); }
|
||||
#endif
|
||||
|
||||
/** shortcut for m_matrix(row,col);
|
||||
* \sa MatrixBase::operator(Index,Index) const */
|
||||
|
||||
Reference in New Issue
Block a user