turn some macros intro constexpr functions

This commit is contained in:
Erik Schultheis
2021-12-10 19:27:01 +00:00
committed by Rasmus Munk Larsen
parent 0f36e42169
commit c20e908ebc
46 changed files with 200 additions and 151 deletions

View File

@@ -616,9 +616,9 @@ struct kernel_retval<FullPivLU<MatrixType_> >
{
EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<MatrixType_>)
enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(
MatrixType::MaxColsAtCompileTime,
MatrixType::MaxRowsAtCompileTime)
enum { MaxSmallDimAtCompileTime = min_size_prefer_fixed(
MatrixType::MaxColsAtCompileTime,
MatrixType::MaxRowsAtCompileTime)
};
template<typename Dest> void evalTo(Dest& dst) const
@@ -702,9 +702,9 @@ struct image_retval<FullPivLU<MatrixType_> >
{
EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<MatrixType_>)
enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(
MatrixType::MaxColsAtCompileTime,
MatrixType::MaxRowsAtCompileTime)
enum { MaxSmallDimAtCompileTime = min_size_prefer_fixed(
MatrixType::MaxColsAtCompileTime,
MatrixType::MaxRowsAtCompileTime)
};
template<typename Dest> void evalTo(Dest& dst) const

View File

@@ -311,7 +311,7 @@ struct Assignment<DstXprType, Inverse<XprType>, internal::assign_op<typename Dst
if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
dst.resize(dstRows, dstCols);
const int Size = EIGEN_PLAIN_ENUM_MIN(XprType::ColsAtCompileTime,DstXprType::ColsAtCompileTime);
const int Size = plain_enum_min(XprType::ColsAtCompileTime, DstXprType::ColsAtCompileTime);
EIGEN_ONLY_USED_FOR_DEBUG(Size);
eigen_assert(( (Size<=1) || (Size>4) || (extract_data(src.nestedExpression())!=extract_data(dst)))
&& "Aliasing problem detected in inverse(), you need to do inverse().eval() here.");

View File

@@ -514,7 +514,7 @@ void partial_lu_inplace(MatrixType& lu, TranspositionType& row_transpositions, t
partial_lu_impl
< typename MatrixType::Scalar, MatrixType::Flags&RowMajorBit?RowMajor:ColMajor,
typename TranspositionType::StorageIndex,
EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime)>
internal::min_size_prefer_fixed(MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime)>
::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpositions.coeffRef(0), nb_transpositions);
}