mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Replace Eigen type metaprogramming with corresponding std types and make use of alias templates
This commit is contained in:
committed by
Antonio Sánchez
parent
514f90c9ff
commit
421cbf0866
@@ -37,7 +37,7 @@ struct traits<Homogeneous<MatrixType,Direction> >
|
||||
{
|
||||
typedef typename traits<MatrixType>::StorageKind StorageKind;
|
||||
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
|
||||
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNested_;
|
||||
typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
enum {
|
||||
RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ?
|
||||
int(MatrixType::RowsAtCompileTime) + 1 : Dynamic,
|
||||
@@ -227,7 +227,7 @@ template<typename Scalar, int Dim, int Mode,int Options>
|
||||
struct take_matrix_for_product<Transform<Scalar, Dim, Mode, Options> >
|
||||
{
|
||||
typedef Transform<Scalar, Dim, Mode, Options> TransformType;
|
||||
typedef typename internal::add_const<typename TransformType::ConstAffinePart>::type type;
|
||||
typedef std::add_const_t<typename TransformType::ConstAffinePart> type;
|
||||
EIGEN_DEVICE_FUNC static type run (const TransformType& x) { return x.affine(); }
|
||||
};
|
||||
|
||||
@@ -243,8 +243,8 @@ template<typename MatrixType,typename Lhs>
|
||||
struct traits<homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >
|
||||
{
|
||||
typedef typename take_matrix_for_product<Lhs>::type LhsMatrixType;
|
||||
typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
|
||||
typedef typename remove_all<LhsMatrixType>::type LhsMatrixTypeCleaned;
|
||||
typedef remove_all_t<MatrixType> MatrixTypeCleaned;
|
||||
typedef remove_all_t<LhsMatrixType> LhsMatrixTypeCleaned;
|
||||
typedef typename make_proper_matrix_type<
|
||||
typename traits<MatrixTypeCleaned>::Scalar,
|
||||
LhsMatrixTypeCleaned::RowsAtCompileTime,
|
||||
@@ -259,8 +259,8 @@ struct homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>
|
||||
: public ReturnByValue<homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >
|
||||
{
|
||||
typedef typename traits<homogeneous_left_product_impl>::LhsMatrixType LhsMatrixType;
|
||||
typedef typename remove_all<LhsMatrixType>::type LhsMatrixTypeCleaned;
|
||||
typedef typename remove_all<typename LhsMatrixTypeCleaned::Nested>::type LhsMatrixTypeNested;
|
||||
typedef remove_all_t<LhsMatrixType> LhsMatrixTypeCleaned;
|
||||
typedef remove_all_t<typename LhsMatrixTypeCleaned::Nested> LhsMatrixTypeNested;
|
||||
EIGEN_DEVICE_FUNC homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs)
|
||||
: m_lhs(take_matrix_for_product<Lhs>::run(lhs)),
|
||||
m_rhs(rhs)
|
||||
@@ -301,7 +301,7 @@ template<typename MatrixType,typename Rhs>
|
||||
struct homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs>
|
||||
: public ReturnByValue<homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> >
|
||||
{
|
||||
typedef typename remove_all<typename Rhs::Nested>::type RhsNested;
|
||||
typedef remove_all_t<typename Rhs::Nested> RhsNested;
|
||||
EIGEN_DEVICE_FUNC homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs)
|
||||
: m_lhs(lhs), m_rhs(rhs)
|
||||
{}
|
||||
@@ -404,7 +404,7 @@ struct homogeneous_right_product_refactoring_helper
|
||||
Rows = Lhs::RowsAtCompileTime
|
||||
};
|
||||
typedef typename Rhs::template ConstNRowsBlockXpr<Dim>::Type LinearBlockConst;
|
||||
typedef typename remove_const<LinearBlockConst>::type LinearBlock;
|
||||
typedef std::remove_const_t<LinearBlockConst> LinearBlock;
|
||||
typedef typename Rhs::ConstRowXpr ConstantColumn;
|
||||
typedef Replicate<const ConstantColumn,Rows,1> ConstantBlock;
|
||||
typedef Product<Lhs,LinearBlock,LazyProduct> LinearProduct;
|
||||
@@ -457,7 +457,7 @@ struct homogeneous_left_product_refactoring_helper
|
||||
Cols = Rhs::ColsAtCompileTime
|
||||
};
|
||||
typedef typename Lhs::template ConstNColsBlockXpr<Dim>::Type LinearBlockConst;
|
||||
typedef typename remove_const<LinearBlockConst>::type LinearBlock;
|
||||
typedef std::remove_const_t<LinearBlockConst> LinearBlock;
|
||||
typedef typename Lhs::ConstColXpr ConstantColumn;
|
||||
typedef Replicate<const ConstantColumn,1,Cols> ConstantBlock;
|
||||
typedef Product<LinearBlock,Rhs,LazyProduct> LinearProduct;
|
||||
|
||||
Reference in New Issue
Block a user