Replace Eigen type metaprogramming with corresponding std types and make use of alias templates

This commit is contained in:
Erik Schultheis
2022-03-16 16:43:40 +00:00
committed by Antonio Sánchez
parent 514f90c9ff
commit 421cbf0866
191 changed files with 1147 additions and 1221 deletions

View File

@@ -111,7 +111,7 @@ inline typename internal::traits<Derived>::Scalar MatrixBase<Derived>::determina
{
eigen_assert(rows() == cols());
typedef typename internal::nested_eval<Derived,Base::RowsAtCompileTime>::type Nested;
return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(derived());
return internal::determinant_impl<internal::remove_all_t<Nested>>::run(derived());
}
} // end namespace Eigen

View File

@@ -317,7 +317,7 @@ struct Assignment<DstXprType, Inverse<XprType>, internal::assign_op<typename Dst
&& "Aliasing problem detected in inverse(), you need to do inverse().eval() here.");
typedef typename internal::nested_eval<XprType,XprType::ColsAtCompileTime>::type ActualXprType;
typedef typename internal::remove_all<ActualXprType>::type ActualXprTypeCleanded;
typedef internal::remove_all_t<ActualXprType> ActualXprTypeCleanded;
ActualXprType actual_xpr(src.nestedExpression());
@@ -387,11 +387,11 @@ inline void MatrixBase<Derived>::computeInverseAndDetWithCheck(
eigen_assert(rows() == cols());
// for 2x2, it's worth giving a chance to avoid evaluating.
// for larger sizes, evaluating has negligible cost and limits code size.
typedef typename internal::conditional<
typedef std::conditional_t<
RowsAtCompileTime == 2,
typename internal::remove_all<typename internal::nested_eval<Derived, 2>::type>::type,
internal::remove_all_t<typename internal::nested_eval<Derived, 2>::type>,
PlainObject
>::type MatrixType;
> MatrixType;
internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run
(derived(), absDeterminantThreshold, inverse, determinant, invertible);
}

View File

@@ -50,7 +50,7 @@ struct compute_inverse_size4<Architecture::Target, float, MatrixType, ResultType
ResultAlignment = traits<ResultType>::Alignment,
StorageOrdersMatch = (MatrixType::Flags & RowMajorBit) == (ResultType::Flags & RowMajorBit)
};
typedef typename conditional<(MatrixType::Flags & LinearAccessBit), MatrixType const &, typename MatrixType::PlainObject>::type ActualMatrixType;
typedef std::conditional_t<(MatrixType::Flags & LinearAccessBit), MatrixType const &, typename MatrixType::PlainObject> ActualMatrixType;
static void run(const MatrixType &mat, ResultType &result)
{
@@ -175,9 +175,9 @@ struct compute_inverse_size4<Architecture::Target, double, MatrixType, ResultTyp
ResultAlignment = traits<ResultType>::Alignment,
StorageOrdersMatch = (MatrixType::Flags & RowMajorBit) == (ResultType::Flags & RowMajorBit)
};
typedef typename conditional<(MatrixType::Flags & LinearAccessBit),
MatrixType const &,
typename MatrixType::PlainObject>::type
typedef std::conditional_t<(MatrixType::Flags & LinearAccessBit),
MatrixType const &,
typename MatrixType::PlainObject>
ActualMatrixType;
static void run(const MatrixType &mat, ResultType &result)