From 712db6711a32fd52056ffb654dfdb429b12e0387 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 3 Aug 2024 22:17:17 -0700 Subject: [PATCH] [upstream_utils] Upgrade Eigen to fix warning suppression upstream (#6923) --- upstream_utils/eigen.py | 2 +- .../eigen_patches/0001-Disable-warnings.patch | 2 +- .../eigen_patches/0002-Intellisense-fix.patch | 6 +- ...orm-and-has_denorm_loss-deprecation-.patch | 89 ------------------- .../thirdparty/eigen/include/.clang-format | 3 + .../thirdparty/eigen/include/Eigen/Core | 2 +- .../eigen/include/Eigen/OrderingMethods | 2 +- .../include/Eigen/src/Core/CoreEvaluators.h | 8 +- .../include/Eigen/src/Core/DeviceWrapper.h | 4 +- .../Eigen/src/Core/GenericPacketMath.h | 22 +++-- .../Eigen/src/Core/MathFunctionsImpl.h | 6 +- .../Eigen/src/Core/PermutationMatrix.h | 2 +- .../Eigen/src/Core/ProductEvaluators.h | 2 +- .../eigen/include/Eigen/src/Core/StableNorm.h | 2 +- .../include/Eigen/src/Core/StlIterators.h | 6 ++ .../include/Eigen/src/Core/Transpositions.h | 2 +- .../eigen/include/Eigen/src/Core/Visitor.h | 6 +- .../Eigen/src/Core/arch/AVX/PacketMath.h | 2 +- .../arch/Default/GenericPacketMathFunctions.h | 4 +- .../Default/GenericPacketMathFunctionsFwd.h | 2 +- .../Eigen/src/Core/arch/Default/Half.h | 4 +- .../Eigen/src/Core/arch/NEON/MathFunctions.h | 2 +- .../Eigen/src/Core/arch/NEON/PacketMath.h | 6 +- .../Eigen/src/Core/arch/SSE/PacketMath.h | 2 +- .../Eigen/src/Core/functors/UnaryFunctors.h | 49 +++++++--- .../Core/products/GeneralBlockPanelKernel.h | 15 ++-- .../src/Core/products/GeneralMatrixVector.h | 6 +- .../src/Core/util/ConfigureVectorization.h | 9 ++ .../include/Eigen/src/Core/util/Constants.h | 2 +- .../Eigen/src/Core/util/IntegralConstant.h | 4 +- .../include/Eigen/src/Core/util/Macros.h | 4 +- .../eigen/include/Eigen/src/Core/util/Meta.h | 56 +++++++++--- .../src/Eigenvalues/GeneralizedEigenSolver.h | 2 +- .../Eigen/src/Householder/BlockHouseholder.h | 2 +- .../IterativeLinearSolvers/SolveWithGuess.h | 2 +- .../include/Eigen/src/LU/arch/InverseSize4.h | 2 +- .../Eigen/src/OrderingMethods/Eigen_Colamd.h | 2 +- .../eigen/include/Eigen/src/SVD/BDCSVD.h | 19 ++-- .../eigen/include/Eigen/src/SVD/JacobiSVD.h | 5 +- .../src/SparseCore/SparseCwiseBinaryOp.h | 2 +- .../Eigen/src/SparseCore/SparseMatrix.h | 8 +- .../src/SparseCore/SparseSelfAdjointView.h | 2 +- .../Eigen/src/SparseCore/SparseVector.h | 2 +- .../include/Eigen/src/SparseLU/SparseLU.h | 4 +- .../Eigen/src/SparseLU/SparseLU_Structs.h | 2 +- .../Eigen/src/SparseLU/SparseLU_pivotL.h | 2 +- .../Eigen/src/SparseLU/SparseLU_pruneL.h | 2 +- .../src/ThreadPool/CoreThreadPoolDevice.h | 42 ++++----- .../Eigen/src/plugins/ArrayCwiseUnaryOps.inc | 8 +- 49 files changed, 222 insertions(+), 219 deletions(-) delete mode 100644 upstream_utils/eigen_patches/0003-Suppress-has_denorm-and-has_denorm_loss-deprecation-.patch diff --git a/upstream_utils/eigen.py b/upstream_utils/eigen.py index c7b72a81ef..2f0df93ddb 100755 --- a/upstream_utils/eigen.py +++ b/upstream_utils/eigen.py @@ -129,7 +129,7 @@ def copy_upstream_src(wpilib_root): def main(): name = "eigen" url = "https://gitlab.com/libeigen/eigen.git" - tag = "c4d84dfddc9f9edef0fdbe7cf9966d2f4a303198" + tag = "d14b0a4e531760b6aeccf20b666eaec8bd0b8461" eigen = Lib(name, url, tag, copy_upstream_src) eigen.main() diff --git a/upstream_utils/eigen_patches/0001-Disable-warnings.patch b/upstream_utils/eigen_patches/0001-Disable-warnings.patch index ca9aee77ec..8d3c7be798 100644 --- a/upstream_utils/eigen_patches/0001-Disable-warnings.patch +++ b/upstream_utils/eigen_patches/0001-Disable-warnings.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 18 May 2022 09:14:24 -0700 -Subject: [PATCH 1/3] Disable warnings +Subject: [PATCH 1/2] Disable warnings --- Eigen/src/Core/util/DisableStupidWarnings.h | 6 ++++++ diff --git a/upstream_utils/eigen_patches/0002-Intellisense-fix.patch b/upstream_utils/eigen_patches/0002-Intellisense-fix.patch index 2c7d477f29..6c369f26fd 100644 --- a/upstream_utils/eigen_patches/0002-Intellisense-fix.patch +++ b/upstream_utils/eigen_patches/0002-Intellisense-fix.patch @@ -1,17 +1,17 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 20 Jan 2023 23:41:56 -0800 -Subject: [PATCH 2/3] Intellisense fix +Subject: [PATCH 2/2] Intellisense fix --- Eigen/src/Core/util/ConfigureVectorization.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Eigen/src/Core/util/ConfigureVectorization.h b/Eigen/src/Core/util/ConfigureVectorization.h -index 1c7217339bcb2c29366360c56343863126d8aafc..e8f5d2ce0d5917ec7df65800ff115f59e028e14b 100644 +index 47ddd4f8ae33405f2a6600dc33bd3d07a668e63f..d0fd181ecfdeb9a80e065b1d81e8860d6a6ad57c 100644 --- a/Eigen/src/Core/util/ConfigureVectorization.h +++ b/Eigen/src/Core/util/ConfigureVectorization.h -@@ -165,6 +165,13 @@ +@@ -174,6 +174,13 @@ //---------------------------------------------------------------------- diff --git a/upstream_utils/eigen_patches/0003-Suppress-has_denorm-and-has_denorm_loss-deprecation-.patch b/upstream_utils/eigen_patches/0003-Suppress-has_denorm-and-has_denorm_loss-deprecation-.patch deleted file mode 100644 index d89c94f3a5..0000000000 --- a/upstream_utils/eigen_patches/0003-Suppress-has_denorm-and-has_denorm_loss-deprecation-.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Tyler Veness -Date: Sat, 13 Jul 2024 18:51:32 -0700 -Subject: [PATCH 3/3] Suppress has_denorm and has_denorm_loss deprecation - warnings - -MSVC doesn't yet claim C++23 compliance for c++latest, so we have to be -less specific in the preprocessor check. ---- - Eigen/src/Core/arch/Default/BFloat16.h | 8 -------- - Eigen/src/Core/arch/Default/Half.h | 8 -------- - 2 files changed, 16 deletions(-) - -diff --git a/Eigen/src/Core/arch/Default/BFloat16.h b/Eigen/src/Core/arch/Default/BFloat16.h -index 9e79a39a4c81d3c08868e3b70e64d56118a4efe8..14f0524a3b0e4ff836b77092949caafa0949a18c 100644 ---- a/Eigen/src/Core/arch/Default/BFloat16.h -+++ b/Eigen/src/Core/arch/Default/BFloat16.h -@@ -139,15 +139,11 @@ struct numeric_limits_bfloat16_impl { - static EIGEN_CONSTEXPR const bool has_infinity = true; - static EIGEN_CONSTEXPR const bool has_quiet_NaN = true; - static EIGEN_CONSTEXPR const bool has_signaling_NaN = true; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(push) - EIGEN_DISABLE_DEPRECATED_WARNING --#endif - static EIGEN_CONSTEXPR const std::float_denorm_style has_denorm = std::denorm_present; - static EIGEN_CONSTEXPR const bool has_denorm_loss = false; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(pop) --#endif - static EIGEN_CONSTEXPR const std::float_round_style round_style = std::numeric_limits::round_style; - static EIGEN_CONSTEXPR const bool is_iec559 = true; - // The C++ standard defines this as "true if the set of values representable -@@ -194,17 +190,13 @@ template - EIGEN_CONSTEXPR const bool numeric_limits_bfloat16_impl::has_quiet_NaN; - template - EIGEN_CONSTEXPR const bool numeric_limits_bfloat16_impl::has_signaling_NaN; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(push) - EIGEN_DISABLE_DEPRECATED_WARNING --#endif - template - EIGEN_CONSTEXPR const std::float_denorm_style numeric_limits_bfloat16_impl::has_denorm; - template - EIGEN_CONSTEXPR const bool numeric_limits_bfloat16_impl::has_denorm_loss; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(pop) --#endif - template - EIGEN_CONSTEXPR const std::float_round_style numeric_limits_bfloat16_impl::round_style; - template -diff --git a/Eigen/src/Core/arch/Default/Half.h b/Eigen/src/Core/arch/Default/Half.h -index 7754e8f27261f5e10eec8e1125b4869e01e5dde8..90d65c5e3cb099374179223d4b3e50d4991b06cd 100644 ---- a/Eigen/src/Core/arch/Default/Half.h -+++ b/Eigen/src/Core/arch/Default/Half.h -@@ -208,15 +208,11 @@ struct numeric_limits_half_impl { - static EIGEN_CONSTEXPR const bool has_infinity = true; - static EIGEN_CONSTEXPR const bool has_quiet_NaN = true; - static EIGEN_CONSTEXPR const bool has_signaling_NaN = true; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(push) - EIGEN_DISABLE_DEPRECATED_WARNING --#endif - static EIGEN_CONSTEXPR const std::float_denorm_style has_denorm = std::denorm_present; - static EIGEN_CONSTEXPR const bool has_denorm_loss = false; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(pop) --#endif - static EIGEN_CONSTEXPR const std::float_round_style round_style = std::round_to_nearest; - static EIGEN_CONSTEXPR const bool is_iec559 = true; - // The C++ standard defines this as "true if the set of values representable -@@ -263,17 +259,13 @@ template - EIGEN_CONSTEXPR const bool numeric_limits_half_impl::has_quiet_NaN; - template - EIGEN_CONSTEXPR const bool numeric_limits_half_impl::has_signaling_NaN; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(push) - EIGEN_DISABLE_DEPRECATED_WARNING --#endif - template - EIGEN_CONSTEXPR const std::float_denorm_style numeric_limits_half_impl::has_denorm; - template - EIGEN_CONSTEXPR const bool numeric_limits_half_impl::has_denorm_loss; --#if __cplusplus >= 202302L - EIGEN_DIAGNOSTICS(pop) --#endif - template - EIGEN_CONSTEXPR const std::float_round_style numeric_limits_half_impl::round_style; - template diff --git a/wpimath/src/main/native/thirdparty/eigen/include/.clang-format b/wpimath/src/main/native/thirdparty/eigen/include/.clang-format index f3870b820a..b48874efaf 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/.clang-format +++ b/wpimath/src/main/native/thirdparty/eigen/include/.clang-format @@ -1,4 +1,7 @@ --- +BasedOnStyle: Google +ColumnLimit: 120 +--- Language: Cpp BasedOnStyle: Google ColumnLimit: 120 diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/Core b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/Core index 795ff1e131..7475c5a04b 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/Core +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/Core @@ -348,6 +348,7 @@ using std::ptrdiff_t; #include "src/Core/TriangularMatrix.h" #include "src/Core/SelfAdjointView.h" #include "src/Core/products/GeneralBlockPanelKernel.h" +#include "src/Core/DeviceWrapper.h" #ifdef EIGEN_GEMM_THREADPOOL // #include "ThreadPool" #endif @@ -404,7 +405,6 @@ using std::ptrdiff_t; #endif #include "src/Core/GlobalFunctions.h" -#include "src/Core/DeviceWrapper.h" // IWYU pragma: end_exports #include "src/Core/util/ReenableStupidWarnings.h" diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/OrderingMethods b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/OrderingMethods index 921b8a01ae..016741945f 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/OrderingMethods +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/OrderingMethods @@ -54,7 +54,7 @@ * \note Some of these methods (like AMD or METIS), need the sparsity pattern * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. - * If your matrix is already symmetric (at leat in structure), you can avoid that + * If your matrix is already symmetric (at least in structure), you can avoid that * by calling the method with a SelfAdjointView type. * * \code diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/CoreEvaluators.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/CoreEvaluators.h index 5da9c57986..3d78fd8be7 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/CoreEvaluators.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/CoreEvaluators.h @@ -402,7 +402,7 @@ struct nullary_wrapper {}; #if 0 && EIGEN_COMP_MSVC > 0 // Disable this ugly workaround. This is now handled in traits::match, // but this piece of code might still become handly if some other weird compilation -// erros pop up again. +// errors pop up again. // MSVC exhibits a weird compilation error when // compiling: @@ -645,7 +645,7 @@ struct unary_evaluator, ArgType>, In // There is no source packet type with equal or fewer elements than DstPacketType. // This is problematic as the evaluation loop may attempt to access data outside the bounds of the array. // For example, consider the cast utilizing pcast with an array of size 4: {0.0f,1.0f,2.0f,3.0f}. - // The first iteration of the evaulation loop will load 16 bytes: {0.0f,1.0f,2.0f,3.0f} and cast to {0.0,1.0}, which + // The first iteration of the evaluation loop will load 16 bytes: {0.0f,1.0f,2.0f,3.0f} and cast to {0.0,1.0}, which // is acceptable. The second iteration will load 16 bytes: {2.0f,3.0f,?,?}, which is outside the bounds of the array. // Instead, perform runtime check to determine if the load would access data outside the bounds of the array. @@ -701,7 +701,7 @@ struct unary_evaluator, ArgType>, In srcPacket(row, col, 6), srcPacket(row, col, 7)); } - // Analagous routines for linear access. + // Analogous routines for linear access. template = true> EIGEN_STRONG_INLINE DstPacketType packet(Index index) const { constexpr int DstPacketSize = unpacket_traits::size; @@ -838,7 +838,7 @@ struct ternary_evaluator, IndexBased Data m_d; }; -// specialization for expresions like (a < b).select(c, d) to enable full vectorization +// specialization for expressions like (a < b).select(c, d) to enable full vectorization template struct evaluator, Arg1, Arg2, CwiseBinaryOp, CmpLhsType, CmpRhsType>>> diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/DeviceWrapper.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/DeviceWrapper.h index 9fdbe6079d..3ae8256f57 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/DeviceWrapper.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/DeviceWrapper.h @@ -82,7 +82,7 @@ struct AssignmentWithDevice struct dense_assignment_loop_with_device { @@ -152,4 +152,4 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper Eigen return DeviceWrapper(derived(), device); } } // namespace Eigen -#endif \ No newline at end of file +#endif diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/GenericPacketMath.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/GenericPacketMath.h index 8a07d50fe3..1d79b4ab8f 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/GenericPacketMath.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/GenericPacketMath.h @@ -207,7 +207,7 @@ struct type_casting_traits { }; }; -// provides a succint template to define vectorized casting traits with respect to the largest accessible packet types +// provides a succinct template to define vectorized casting traits with respect to the largest accessible packet types template struct vectorized_type_casting_traits { enum : int { @@ -579,12 +579,6 @@ EIGEN_DEVICE_FUNC inline Packet pandnot(const Packet& a, const Packet& b) { return pand(a, pnot(b)); } -/** \internal \returns isnan(a) */ -template -EIGEN_DEVICE_FUNC inline Packet pisnan(const Packet& a) { - return pandnot(ptrue(a), pcmp_eq(a, a)); -} - // In the general case, use bitwise select. template struct pselect_impl { @@ -1002,6 +996,20 @@ EIGEN_DEVICE_FUNC inline Packet pcplxflip(const Packet& a) { * Special math functions ***************************/ +/** \internal \returns isnan(a) */ +template +EIGEN_DEVICE_FUNC inline Packet pisnan(const Packet& a) { + return pandnot(ptrue(a), pcmp_eq(a, a)); +} + +/** \internal \returns isinf(a) */ +template +EIGEN_DEVICE_FUNC inline Packet pisinf(const Packet& a) { + using Scalar = typename unpacket_traits::type; + constexpr Scalar inf = NumTraits::infinity(); + return pcmp_eq(pabs(a), pset1(inf)); +} + /** \internal \returns the sine of \a a (coeff-wise) */ template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psin(const Packet& a) { diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/MathFunctionsImpl.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/MathFunctionsImpl.h index 689c6d8276..10ddabd795 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/MathFunctionsImpl.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/MathFunctionsImpl.h @@ -23,7 +23,7 @@ namespace internal { Preconditions: 1. The starting guess provided in approx_a_recip must have at least half the leading mantissa bits in the correct result, such that a single - Newton-Raphson step is sufficient to get within 1-2 ulps of the currect + Newton-Raphson step is sufficient to get within 1-2 ulps of the correct result. 2. If a is zero, approx_a_recip must be infinite with the same sign as a. 3. If a is infinite, approx_a_recip must be zero with the same sign as a. @@ -61,7 +61,7 @@ struct generic_reciprocal_newton_step { Preconditions: 1. The starting guess provided in approx_a_recip must have at least half the leading mantissa bits in the correct result, such that a single - Newton-Raphson step is sufficient to get within 1-2 ulps of the currect + Newton-Raphson step is sufficient to get within 1-2 ulps of the correct result. 2. If a is zero, approx_a_recip must be infinite with the same sign as a. 3. If a is infinite, approx_a_recip must be zero with the same sign as a. @@ -112,7 +112,7 @@ struct generic_rsqrt_newton_step { 1. The starting guess for the reciprocal sqrt provided in approx_rsqrt must have at least half the leading mantissa bits in the correct result, such that a single Newton-Raphson step is sufficient to get within 1-2 ulps of - the currect result. + the correct result. 2. If a is zero, approx_rsqrt must be infinite. 3. If a is infinite, approx_rsqrt must be zero. diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/PermutationMatrix.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/PermutationMatrix.h index 6945964adf..4748b118a6 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/PermutationMatrix.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/PermutationMatrix.h @@ -170,7 +170,7 @@ class PermutationBase : public EigenBase { * \note \blank \note_try_to_help_rvo */ inline InverseReturnType inverse() const { return InverseReturnType(derived()); } - /** \returns the tranpose permutation matrix. + /** \returns the transpose permutation matrix. * * \note \blank \note_try_to_help_rvo */ diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/ProductEvaluators.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/ProductEvaluators.h index 19c25604d5..fa4d0384b6 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/ProductEvaluators.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/ProductEvaluators.h @@ -810,7 +810,7 @@ struct diagonal_product_evaluator_base : evaluator_base { : (Derived::MaxColsAtCompileTime == 1 && Derived::MaxRowsAtCompileTime != 1) ? ColMajor : MatrixFlags & RowMajorBit ? RowMajor : ColMajor, - SameStorageOrder_ = StorageOrder_ == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor), + SameStorageOrder_ = int(StorageOrder_) == ((MatrixFlags & RowMajorBit) ? RowMajor : ColMajor), ScalarAccessOnDiag_ = !((int(StorageOrder_) == ColMajor && int(ProductOrder) == OnTheLeft) || (int(StorageOrder_) == RowMajor && int(ProductOrder) == OnTheRight)), diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StableNorm.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StableNorm.h index 6513120e0f..de84d81f71 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StableNorm.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StableNorm.h @@ -218,7 +218,7 @@ inline typename NumTraits::Scalar>::Real Matr return internal::blueNorm_impl(*this); } -/** \returns the \em l2 norm of \c *this avoiding undeflow and overflow. +/** \returns the \em l2 norm of \c *this avoiding underflow and overflow. * This version use a concatenation of hypot() calls, and it is very slow. * * \sa norm(), stableNorm() diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StlIterators.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StlIterators.h index 3ab7d21012..bb897f8c68 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StlIterators.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/StlIterators.h @@ -325,7 +325,13 @@ class pointer_based_stl_iterator { public: typedef Index difference_type; typedef typename XprType::Scalar value_type; +#if __cplusplus >= 202002L + typedef std::conditional_t + iterator_category; +#else typedef std::random_access_iterator_tag iterator_category; +#endif typedef std::conditional_t pointer; typedef std::conditional_t reference; diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Transpositions.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Transpositions.h index ad136d3aee..6fbbbd81b1 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Transpositions.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Transpositions.h @@ -91,7 +91,7 @@ class TranspositionsBase { /** \returns the inverse transformation */ inline Transpose inverse() const { return Transpose(derived()); } - /** \returns the tranpose transformation */ + /** \returns the transpose transformation */ inline Transpose transpose() const { return Transpose(derived()); } protected: diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Visitor.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Visitor.h index 037a605195..198ec952ad 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Visitor.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/Visitor.h @@ -38,7 +38,7 @@ struct short_circuit_eval_impl { // unrolled inner-outer traversal template struct visitor_impl { - // don't use short circuit evaulation for unrolled version + // don't use short circuit evaluation for unrolled version using Scalar = typename Derived::Scalar; using Packet = typename packet_traits::type; static constexpr bool RowMajor = Derived::IsRowMajor; @@ -93,7 +93,7 @@ struct visitor_impl struct visitor_impl { - // don't use short circuit evaulation for unrolled version + // don't use short circuit evaluation for unrolled version using Scalar = typename Derived::Scalar; using Packet = typename packet_traits::type; static constexpr int PacketSize = packet_traits::size; @@ -781,7 +781,7 @@ EIGEN_DEVICE_FUNC inline bool DenseBase::hasNaN() const { */ template EIGEN_DEVICE_FUNC inline bool DenseBase::allFinite() const { - return derived().array().isFinite().all(); + return derived().array().isFiniteTyped().all(); } } // end namespace Eigen diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/AVX/PacketMath.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/AVX/PacketMath.h index b05429cfe8..ea58f0ed2f 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/AVX/PacketMath.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/AVX/PacketMath.h @@ -1180,7 +1180,7 @@ EIGEN_STRONG_INLINE Packet8i psign(const Packet8i& a) { } #endif -// Add specializations for min/max with prescribed NaN progation. +// Add specializations for min/max with prescribed NaN propagation. template <> EIGEN_STRONG_INLINE Packet8f pmin(const Packet8f& a, const Packet8f& b) { return pminmax_propagate_numbers(a, b, pmin); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index 1c46ba48d7..d9e6d037d6 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -1655,7 +1655,7 @@ EIGEN_STRONG_INLINE void twoprod(const Packet& x_hi, const Packet& x_lo, const P } // This function implements the division of double word {x_hi, x_lo} -// by float y. This is Algorithm 15 from "Tight and rigourous error bounds +// by float y. This is Algorithm 15 from "Tight and rigorous error bounds // for basic building blocks of double-word arithmetic", Joldes, Muller, & Popescu, // 2017. https://hal.archives-ouvertes.fr/hal-01351529 template @@ -2376,7 +2376,7 @@ template ::type; - // singed integer base, signed integer exponent case + // signed integer base, signed integer exponent case // This routine handles negative exponents. // The return value is either 0, 1, or -1. diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h index 1bf1128163..4d113ca6a1 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h @@ -21,7 +21,7 @@ namespace internal { // This is needed to workaround a circular dependency. /*************************************************************************** - * Some generic implementations to be used by implementors + * Some generic implementations to be used by implementers ***************************************************************************/ /** Default implementation of pfrexp. diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/Half.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/Half.h index 90d65c5e3c..1f314fae25 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/Half.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/Default/Half.h @@ -319,7 +319,7 @@ namespace half_impl { #if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530) || \ (defined(EIGEN_HAS_HIP_FP16) && defined(HIP_DEVICE_COMPILE)) // Note: We deliberately do *not* define this to 1 even if we have Arm's native -// fp16 type since GPU halfs are rather different from native CPU halfs. +// fp16 type since GPU half types are rather different from native CPU half types. // TODO: Rename to something like EIGEN_HAS_NATIVE_GPU_FP16 #define EIGEN_HAS_NATIVE_FP16 #endif @@ -677,7 +677,7 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log(const half& a) { #if (defined(EIGEN_HAS_CUDA_FP16) && EIGEN_CUDA_SDK_VER >= 80000 && defined(EIGEN_CUDA_ARCH) && \ EIGEN_CUDA_ARCH >= 530) || \ (defined(EIGEN_HAS_HIP_FP16) && defined(EIGEN_HIP_DEVICE_COMPILE)) - return half(::hlog(a)); + return half(hlog(a)); #else return half(::logf(float(a))); #endif diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/MathFunctions.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/MathFunctions.h index 3d2e7bd7e4..bebe081a1e 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/MathFunctions.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/MathFunctions.h @@ -27,7 +27,7 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet4hf ptanh(const Packet4hf template <> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet8hf ptanh(const Packet8hf& x) { - // Convert each 4 halfs to float, call the float ptanh, and then convert back. + // Convert each 4 half types to float, call the float ptanh, and then convert back. return vcombine_f16(vcvt_f16_f32(ptanh(vcvt_f32_f16(vget_low_f16(x)))), vcvt_f16_f32(ptanh(vcvt_high_f32_f16(x)))); } diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/PacketMath.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/PacketMath.h index 50cf56f0e8..794d063168 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/PacketMath.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/NEON/PacketMath.h @@ -103,7 +103,7 @@ EIGEN_STRONG_INLINE Packet4f shuffle1(const Packet4f& m, int mask) { return res; } -// fuctionally equivalent to _mm_shuffle_ps in SSE when interleave +// functionally equivalent to _mm_shuffle_ps in SSE when interleave // == false (i.e. shuffle(m, n, mask) equals _mm_shuffle_ps(m, n, mask)), // interleave m and n when interleave == true. Currently used in LU/arch/InverseSize4.h // to enable a shared implementation for fast inversion of matrices of size 4. @@ -5029,7 +5029,7 @@ EIGEN_STRONG_INLINE Packet4bf pnegate(const Packet4bf& a) { //---------- double ---------- -// Clang 3.5 in the iOS toolchain has an ICE triggered by NEON intrisics for double. +// Clang 3.5 in the iOS toolchain has an ICE triggered by NEON intrinsics for double. // Confirmed at least with __apple_build_version__ = 6000054. #if EIGEN_COMP_CLANGAPPLE // Let's hope that by the time __apple_build_version__ hits the 601* range, the bug will be fixed. @@ -5075,7 +5075,7 @@ typedef float64x1_t Packet1d; EIGEN_ALWAYS_INLINE Packet2d make_packet2d(double a, double b) { return Packet2d{a, b}; } #endif -// fuctionally equivalent to _mm_shuffle_pd in SSE (i.e. shuffle(m, n, mask) equals _mm_shuffle_pd(m,n,mask)) +// functionally equivalent to _mm_shuffle_pd in SSE (i.e. shuffle(m, n, mask) equals _mm_shuffle_pd(m,n,mask)) // Currently used in LU/arch/InverseSize4.h to enable a shared implementation // for fast inversion of matrices of size 4. EIGEN_STRONG_INLINE Packet2d shuffle(const Packet2d& m, const Packet2d& n, int mask) { diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/SSE/PacketMath.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/SSE/PacketMath.h index e19e9480a2..e5dce3b49b 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/arch/SSE/PacketMath.h @@ -1127,7 +1127,7 @@ EIGEN_STRONG_INLINE Packet pminmax_propagate_nan(const Packet& a, const Packet& return pselect(not_nan_mask_a, m, a); } -// Add specializations for min/max with prescribed NaN progation. +// Add specializations for min/max with prescribed NaN propagation. template <> EIGEN_STRONG_INLINE Packet4f pmin(const Packet4f& a, const Packet4f& b) { return pminmax_propagate_numbers(a, b, pmin); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/functors/UnaryFunctors.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/functors/UnaryFunctors.h index c1bbc7c28f..5059a54088 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/functors/UnaryFunctors.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/functors/UnaryFunctors.h @@ -989,10 +989,9 @@ struct functor_traits> { * \brief Template functor to check whether a scalar is +/-inf * \sa class CwiseUnaryOp, ArrayBase::isinf() */ -template +template struct scalar_isinf_op { - typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator()(const Scalar& a) const { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const Scalar& a) const { #if defined(SYCL_DEVICE_ONLY) return numext::isinf(a); #else @@ -1000,19 +999,33 @@ struct scalar_isinf_op { #endif } }; + template -struct functor_traits> { - enum { Cost = NumTraits::MulCost, PacketAccess = false }; +struct scalar_isinf_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const Scalar& a) const { +#if defined(SYCL_DEVICE_ONLY) + return (numext::isinf(a) ? ptrue(a) : pzero(a)); +#else + return (numext::isinf EIGEN_NOT_A_MACRO(a) ? ptrue(a) : pzero(a)); +#endif + } + template + EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { + return pisinf(a); + } +}; +template +struct functor_traits> { + enum { Cost = NumTraits::MulCost, PacketAccess = packet_traits::HasCmp && UseTypedPredicate }; }; /** \internal * \brief Template functor to check whether a scalar has a finite value * \sa class CwiseUnaryOp, ArrayBase::isfinite() */ -template +template struct scalar_isfinite_op { - typedef bool result_type; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator()(const Scalar& a) const { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator()(const Scalar& a) const { #if defined(SYCL_DEVICE_ONLY) return numext::isfinite(a); #else @@ -1020,9 +1033,25 @@ struct scalar_isfinite_op { #endif } }; + template -struct functor_traits> { - enum { Cost = NumTraits::MulCost, PacketAccess = false }; +struct scalar_isfinite_op { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const Scalar& a) const { +#if defined(SYCL_DEVICE_ONLY) + return (numext::isfinite(a) ? ptrue(a) : pzero(a)); +#else + return (numext::isfinite EIGEN_NOT_A_MACRO(a) ? ptrue(a) : pzero(a)); +#endif + } + template + EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { + constexpr Scalar inf = NumTraits::infinity(); + return pcmp_lt(pabs(a), pset1(inf)); + } +}; +template +struct functor_traits> { + enum { Cost = NumTraits::MulCost, PacketAccess = packet_traits::HasCmp && UseTypedPredicate }; }; /** \internal diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h index c4fa771e22..b65c246e7d 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -718,10 +718,10 @@ class gebp_traits, std::complex, ConjLhs_, LhsPacketSize = Vectorizable ? unpacket_traits::size : 1, RhsPacketSize = Vectorizable ? unpacket_traits::size : 1, RealPacketSize = Vectorizable ? unpacket_traits::size : 1, + NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS, - // FIXME: should depend on NumberOfRegisters nr = 4, - mr = ResPacketSize, + mr = (plain_enum_min(16, NumberOfRegisters) / 2 / nr) * ResPacketSize, LhsProgress = ResPacketSize, RhsProgress = 1 @@ -795,8 +795,8 @@ class gebp_traits, std::complex, ConjLhs_, DoublePacket& c, TmpType& /*tmp*/, const LaneIdType&) const { - c.first = padd(pmul(a, b.first), c.first); - c.second = padd(pmul(a, b.second), c.second); + c.first = pmadd(a, b.first, c.first); + c.second = pmadd(a, b.second, c.second); } template @@ -1257,7 +1257,7 @@ struct lhs_process_one_packet { traits.initAcc(C3); // To improve instruction pipelining, let's double the accumulation registers: // even k will accumulate in C*, while odd k will accumulate in D*. - // This trick is crutial to get good performance with FMA, otherwise it is + // This trick is crucial to get good performance with FMA, otherwise it is // actually faster to perform separated MUL+ADD because of a naturally // better instruction-level parallelism. AccPacket D0, D1, D2, D3; @@ -3130,9 +3130,8 @@ inline std::ptrdiff_t l2CacheSize() { return l2; } -/** \returns the currently set level 3 cpu cache size (in bytes) used to estimate the ideal blocking size paramete\ -rs. -* \sa setCpuCacheSize */ +/** \returns the currently set level 3 cpu cache size (in bytes) used to estimate the ideal blocking size parameters. + * \sa setCpuCacheSize */ inline std::ptrdiff_t l3CacheSize() { std::ptrdiff_t l1, l2, l3; internal::manage_caching_sizes(GetAction, &l1, &l2, &l3); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralMatrixVector.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralMatrixVector.h index afd815546a..ba72a8a4fb 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/products/GeneralMatrixVector.h @@ -64,7 +64,7 @@ class gemv_traits { /* Optimized col-major matrix * vector product: * This algorithm processes the matrix per vertical panels, - * which are then processed horizontally per chunck of 8*PacketSize x 1 vertical segments. + * which are then processed horizontally per chunk of 8*PacketSize x 1 vertical segments. * * Mixing type logic: C += alpha * A * B * | A | B |alpha| comments @@ -112,7 +112,7 @@ general_matrix_vector_product cj; @@ -302,7 +302,7 @@ general_matrix_vector_product::run(Index rows, Index cols, const LhsMapper& alhs, const RhsMapper& rhs, ResScalar* res, Index resIncr, ResScalar alpha) { // The following copy tells the compiler that lhs's attributes are not modified outside this function - // This helps GCC to generate propoer code. + // This helps GCC to generate proper code. LhsMapper lhs(alhs); eigen_internal_assert(rhs.stride() == 1); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/ConfigureVectorization.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/ConfigureVectorization.h index e8f5d2ce0d..d0fd181ecf 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/ConfigureVectorization.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/ConfigureVectorization.h @@ -38,6 +38,15 @@ #define EIGEN_ALIGNOF(x) alignof(x) #endif +// Align to the boundary that avoids false sharing. +// https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size +#ifdef __cpp_lib_hardware_interference_size +#define EIGEN_ALIGN_TO_AVOID_FALSE_SHARING EIGEN_ALIGN_TO_BOUNDARY(std::hardware_destructive_interference_size) +#else +// Overalign for the cache line size of 128 bytes (Apple M1) +#define EIGEN_ALIGN_TO_AVOID_FALSE_SHARING EIGEN_ALIGN_TO_BOUNDARY(128) +#endif + // If the user explicitly disable vectorization, then we also disable alignment #if defined(EIGEN_DONT_VECTORIZE) #if defined(EIGEN_GPUCC) diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Constants.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Constants.h index 9f4a2d8ef0..4f0b273ce0 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Constants.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Constants.h @@ -152,7 +152,7 @@ const unsigned int LvalueBit = 0x20; * Means that the underlying array of coefficients can be directly accessed as a plain strided array. The memory layout * of the array of coefficients must be exactly the natural one suggested by rows(), cols(), * outerStride(), innerStride(), and the RowMajorBit. This rules out expressions such as Diagonal, whose coefficients, - * though referencable, do not have such a regular memory layout. + * though referenceable, do not have such a regular memory layout. * * See the comment on LvalueBit for an explanation of how LvalueBit and DirectAccessBit are mutually orthogonal. */ diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/IntegralConstant.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/IntegralConstant.h index 2eb5fd9d03..53fabd5951 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/IntegralConstant.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/IntegralConstant.h @@ -263,8 +263,8 @@ static const auto fix(); * } * \endcode * In this example, the function Eigen::seqN knows that the second argument is expected to be a size. - * If the passed compile-time value N equals Eigen::Dynamic, then the proxy object returned by fix will be dissmissed, - * and converted to an Eigen::Index of value \c n. Otherwise, the runtime-value \c n will be dissmissed, and the + * If the passed compile-time value N equals Eigen::Dynamic, then the proxy object returned by fix will be dismissed, + * and converted to an Eigen::Index of value \c n. Otherwise, the runtime-value \c n will be dismissed, and the * returned ArithmeticSequence will be of the exact same type as seqN(0,fix) . * * \sa fix, seqN, class ArithmeticSequence diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h index 4d10eecd05..91c821bd5c 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Macros.h @@ -212,7 +212,7 @@ /// \internal EIGEN_COMP_FCC set to FCC version if the compiler is Fujitsu Compiler (traditional mode) /// \note The Fujitsu C/C++ compiler uses the traditional mode based -/// on EDG g++ 6.1 by default or if envoked with the -Nnoclang flag +/// on EDG g++ 6.1 by default or if invoked with the -Nnoclang flag #if defined(__FUJITSU) #define EIGEN_COMP_FCC (__FCC_major__ * 100 + __FCC_minor__ * 10 + __FCC_patchlevel__) #else @@ -221,7 +221,7 @@ /// \internal EIGEN_COMP_CLANGFCC set to FCC version if the compiler is Fujitsu Compiler (Clang mode) /// \note The Fujitsu C/C++ compiler uses the non-traditional mode -/// based on Clang 7.1.0 if envoked with the -Nclang flag +/// based on Clang 7.1.0 if invoked with the -Nclang flag #if defined(__CLANG_FUJITSU) #define EIGEN_COMP_CLANGFCC (__FCC_major__ * 100 + __FCC_minor__ * 10 + __FCC_patchlevel__) #else diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Meta.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Meta.h index e08e1a3089..de325b7f02 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Meta.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Core/util/Meta.h @@ -638,19 +638,23 @@ EIGEN_STRONG_INLINE bool is_identically_zero(const Scalar& s) { template constexpr bool is_int_or_enum_v = std::is_enum::value || std::is_integral::value; +template +inline constexpr void plain_enum_asserts(A, B) { + static_assert(is_int_or_enum_v, "Argument a must be an integer or enum"); + static_assert(is_int_or_enum_v, "Argument b must be an integer or enum"); +} + /// \internal Gets the minimum of two values which may be integers or enums template inline constexpr int plain_enum_min(A a, B b) { - static_assert(is_int_or_enum_v, "Argument a must be an integer or enum"); - static_assert(is_int_or_enum_v, "Argument b must be an integer or enum"); + plain_enum_asserts(a, b); return ((int)a <= (int)b) ? (int)a : (int)b; } /// \internal Gets the maximum of two values which may be integers or enums template inline constexpr int plain_enum_max(A a, B b) { - static_assert(is_int_or_enum_v, "Argument a must be an integer or enum"); - static_assert(is_int_or_enum_v, "Argument b must be an integer or enum"); + plain_enum_asserts(a, b); return ((int)a >= (int)b) ? (int)a : (int)b; } @@ -662,8 +666,7 @@ inline constexpr int plain_enum_max(A a, B b) { */ template inline constexpr int min_size_prefer_dynamic(A a, B b) { - static_assert(is_int_or_enum_v, "Argument a must be an integer or enum"); - static_assert(is_int_or_enum_v, "Argument b must be an integer or enum"); + plain_enum_asserts(a, b); if ((int)a == 0 || (int)b == 0) return 0; if ((int)a == 1 || (int)b == 1) return 1; if ((int)a == Dynamic || (int)b == Dynamic) return Dynamic; @@ -678,8 +681,7 @@ inline constexpr int min_size_prefer_dynamic(A a, B b) { */ template inline constexpr int min_size_prefer_fixed(A a, B b) { - static_assert(is_int_or_enum_v, "Argument a must be an integer or enum"); - static_assert(is_int_or_enum_v, "Argument b must be an integer or enum"); + plain_enum_asserts(a, b); if ((int)a == 0 || (int)b == 0) return 0; if ((int)a == 1 || (int)b == 1) return 1; if ((int)a == Dynamic && (int)b == Dynamic) return Dynamic; @@ -691,12 +693,46 @@ inline constexpr int min_size_prefer_fixed(A a, B b) { /// \internal see `min_size_prefer_fixed`. No need for a separate variant for MaxSizes here. template inline constexpr int max_size_prefer_dynamic(A a, B b) { - static_assert(is_int_or_enum_v, "Argument a must be an integer or enum"); - static_assert(is_int_or_enum_v, "Argument b must be an integer or enum"); + plain_enum_asserts(a, b); if ((int)a == Dynamic || (int)b == Dynamic) return Dynamic; return plain_enum_max(a, b); } +template +inline constexpr bool enum_eq_not_dynamic(A a, B b) { + plain_enum_asserts(a, b); + if ((int)a == Dynamic || (int)b == Dynamic) return false; + return (int)a == (int)b; +} + +template +inline constexpr bool enum_lt_not_dynamic(A a, B b) { + plain_enum_asserts(a, b); + if ((int)a == Dynamic || (int)b == Dynamic) return false; + return (int)a < (int)b; +} + +template +inline constexpr bool enum_le_not_dynamic(A a, B b) { + plain_enum_asserts(a, b); + if ((int)a == Dynamic || (int)b == Dynamic) return false; + return (int)a <= (int)b; +} + +template +inline constexpr bool enum_gt_not_dynamic(A a, B b) { + plain_enum_asserts(a, b); + if ((int)a == Dynamic || (int)b == Dynamic) return false; + return (int)a > (int)b; +} + +template +inline constexpr bool enum_ge_not_dynamic(A a, B b) { + plain_enum_asserts(a, b); + if ((int)a == Dynamic || (int)b == Dynamic) return false; + return (int)a >= (int)b; +} + /// \internal Calculate logical XOR at compile time inline constexpr bool logical_xor(bool a, bool b) { return a != b; } diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h index 08f1e3453e..ca15e6de59 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h @@ -361,7 +361,7 @@ GeneralizedEigenSolver& GeneralizedEigenSolver::compute( // Compute eigenvector in position (i+1) and then position (i) is just the conjugate cv.setZero(); cv.coeffRef(i + 1) = Scalar(1.0); - // here, the "static_cast" workaound expression template issues. + // here, the "static_cast" workaround expression template issues. cv.coeffRef(i) = -(static_cast(beta * mS.coeffRef(i, i + 1)) - alpha * mT.coeffRef(i, i + 1)) / (static_cast(beta * mS.coeffRef(i, i)) - alpha * mT.coeffRef(i, i)); for (Index j = i - 1; j >= 0; j--) { diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Householder/BlockHouseholder.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Householder/BlockHouseholder.h index 1d6cc1c64b..8b92304912 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Householder/BlockHouseholder.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Householder/BlockHouseholder.h @@ -35,7 +35,7 @@ namespace internal { // // Warning, note that hCoeffs may alias with vectors. // // It is then necessary to copy it before modifying vectors(i,i). // typename CoeffsType::Scalar h = hCoeffs(i); -// // This hack permits to pass trough nested Block<> and Transpose<> expressions. +// // This hack permits to pass through nested Block<> and Transpose<> expressions. // Scalar *Vii_ptr = const_cast(vectors.data() + vectors.outerStride()*i + vectors.innerStride()*i); // Scalar Vii = *Vii_ptr; // *Vii_ptr = Scalar(1); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h index 020241bf7b..2b146b373b 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h @@ -23,7 +23,7 @@ class SolveWithGuess; * * \brief Pseudo expression representing a solving operation * - * \tparam Decomposition the type of the matrix or decomposion object + * \tparam Decomposition the type of the matrix or decomposition object * \tparam Rhstype the type of the right-hand side * * This class represents an expression of A.solve(B) diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/LU/arch/InverseSize4.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/LU/arch/InverseSize4.h index f0ddb2f687..29c9b03674 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/LU/arch/InverseSize4.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/LU/arch/InverseSize4.h @@ -24,7 +24,7 @@ // // Copyright (c) 2001 Intel Corporation. // -// Permition is granted to use, copy, distribute and prepare derivative works +// Permission is granted to use, copy, distribute and prepare derivative works // of this library for any purpose and without fee, provided, that the above // copyright notice and this statement appear in all copies. // Intel makes no representations about the suitability of this software for diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/OrderingMethods/Eigen_Colamd.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/OrderingMethods/Eigen_Colamd.h index 7bce3d5080..f6c5be0718 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/OrderingMethods/Eigen_Colamd.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/OrderingMethods/Eigen_Colamd.h @@ -1374,7 +1374,7 @@ static inline void order_children( /* order this column */ Col[c].shared2.order = order++; - /* collaps tree */ + /* collapse tree */ Col[c].shared1.parent = parent; /* get immediate parent of this column */ diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/BDCSVD.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/BDCSVD.h index 52f3564c08..a49299cbbb 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/BDCSVD.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/BDCSVD.h @@ -52,9 +52,8 @@ struct traits > : svd_traits template struct allocate_small_svd { - static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - (void)computationOptions; - smallSvd = JacobiSVD(rows, cols); + static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int) { + internal::construct_at(&smallSvd, rows, cols); } }; @@ -64,7 +63,7 @@ EIGEN_DISABLE_DEPRECATED_WARNING template struct allocate_small_svd { static void run(JacobiSVD& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - smallSvd = JacobiSVD(rows, cols, computationOptions); + internal::construct_at(&smallSvd, rows, cols, computationOptions); } }; @@ -164,10 +163,10 @@ class BDCSVD : public SVDBase > { * Like the default constructor but with preallocation of the internal data * according to the specified problem size and the \a computationOptions. * - * One \b cannot request unitiaries using both the \a Options template parameter + * One \b cannot request unitaries using both the \a Options template parameter * and the constructor. If possible, prefer using the \a Options template parameter. * - * \param computationOptions specifification for computing Thin/Full unitaries U/V + * \param computationOptions specification for computing Thin/Full unitaries U/V * \sa BDCSVD() * * \deprecated Will be removed in the next major Eigen version. Options should @@ -179,7 +178,7 @@ class BDCSVD : public SVDBase > { } /** \brief Constructor performing the decomposition of given matrix, using the custom options specified - * with the \a Options template paramter. + * with the \a Options template parameter. * * \param matrix the matrix to decompose */ @@ -190,11 +189,11 @@ class BDCSVD : public SVDBase > { /** \brief Constructor performing the decomposition of given matrix using specified options * for computing unitaries. * - * One \b cannot request unitiaries using both the \a Options template parameter + * One \b cannot request unitaries using both the \a Options template parameter * and the constructor. If possible, prefer using the \a Options template parameter. * * \param matrix the matrix to decompose - * \param computationOptions specifification for computing Thin/Full unitaries U/V + * \param computationOptions specification for computing Thin/Full unitaries U/V * * \deprecated Will be removed in the next major Eigen version. Options should * be specified in the \a Options template parameter. @@ -1048,7 +1047,7 @@ void BDCSVD::computeSingVals(const ArrayRef& col0, const Ar } else { // We have a problem as shifting on the left or right give either a positive or negative value // at the middle of [left,right]... - // Instead fo abbording or entering an infinite loop, + // Instead of abbording or entering an infinite loop, // let's just use the middle as the estimated zero-crossing: muCur = (right - left) * RealScalar(0.5); // we can test exact equality here, because shift comes from `... ? left : right` diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/JacobiSVD.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/JacobiSVD.h index 086d750a36..84934db8d1 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/JacobiSVD.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SVD/JacobiSVD.h @@ -553,13 +553,14 @@ class JacobiSVD : public SVDBase > { * \deprecated Will be removed in the next major Eigen version. Options should * be specified in the \a Options template parameter. */ - EIGEN_DEPRECATED JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { + // EIGEN_DEPRECATED // this constructor is used to allocate memory in BDCSVD + JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { internal::check_svd_options_assertions(computationOptions, rows, cols); allocate(rows, cols, computationOptions); } /** \brief Constructor performing the decomposition of given matrix, using the custom options specified - * with the \a Options template paramter. + * with the \a Options template parameter. * * \param matrix the matrix to decompose */ diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseCwiseBinaryOp.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseCwiseBinaryOp.h index 6858263922..7fcf2c219d 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseCwiseBinaryOp.h @@ -834,7 +834,7 @@ struct sparse_disjunction_evaluator : evalua const XprType& m_expr; }; -// when DupFunc is wrapped with scalar_dup_op, use disjunction evaulator +// when DupFunc is wrapped with scalar_dup_op, use disjunction evaluator template struct binary_evaluator, Lhs, Rhs>, IteratorBased, IteratorBased> : sparse_disjunction_evaluator, Lhs, Rhs> > { diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseMatrix.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseMatrix.h index fd92ab0760..24ebb7cac1 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseMatrix.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseMatrix.h @@ -250,7 +250,7 @@ class SparseMatrix : public SparseCompressedBase struct scalar_disjunction_op { using result_type = typename result_of::type; @@ -1633,7 +1633,7 @@ SparseMatrix::insertCompressedAtByOuterInner(I // first, check if there is adequate allocated memory if (m_data.allocatedSize() <= m_data.size()) { // if there is no capacity for a single insertion, double the capacity - // increase capacity by a mininum of 32 + // increase capacity by a minimum of 32 Index minReserve = 32; Index reserveSize = numext::maxi(minReserve, m_data.allocatedSize()); m_data.reserve(reserveSize); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseSelfAdjointView.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseSelfAdjointView.h index 3402baeb6b..05b3de56e4 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseSelfAdjointView.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseSelfAdjointView.h @@ -143,7 +143,7 @@ class SparseSelfAdjointView : public EigenBase diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseVector.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseVector.h index fac162e93e..6b1816b9c3 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseVector.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseCore/SparseVector.h @@ -109,7 +109,7 @@ class SparseVector : public SparseCompressedBase>, /** \brief Give the number of rows. */ inline Index rows() const { return m_mat.rows(); } - /** \brief Give the numver of columns. + /** \brief Give the number of columns. */ inline Index cols() const { return m_mat.cols(); } /** \brief Let you set that the pattern of the input matrix is symmetric @@ -600,7 +600,7 @@ void SparseLU::analyzePattern(const MatrixType& mat) { * This exit was 0 if successful factorization. * > 0 if info = i, and i is been completed, but the factor U is exactly singular, * and division by zero will occur if it is used to solve a system of equation. - * > A->ncol: number of bytes allocated when memory allocation failure occured, plus A->ncol. + * > A->ncol: number of bytes allocated when memory allocation failure occurred, plus A->ncol. * If lwork = -1, it is the estimated amount of space needed, plus A->ncol. * * It seems that A was the name of the matrix in the past. diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_Structs.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_Structs.h index 2afab01b7e..85ba88416e 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_Structs.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_Structs.h @@ -50,7 +50,7 @@ * values. * * The last column structures (for pruning) will be removed - * after the numercial LU factorization phase. + * after the numerical LU factorization phase. * * (xlusup,lusup): lusup[*] contains the numerical values of the * rectangular supernodes; xlusup[j] points to the starting diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pivotL.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pivotL.h index ada511e4f3..10a090b53c 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pivotL.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pivotL.h @@ -37,7 +37,7 @@ namespace Eigen { namespace internal { /** - * \brief Performs the numerical pivotin on the current column of L, and the CDIV operation. + * \brief Performs the numerical pivoting on the current column of L, and the CDIV operation. * * Pivot policy : * (1) Compute thresh = u * max_(i>=j) abs(A_ij); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pruneL.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pruneL.h index 4f51d59559..620f2850c2 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pruneL.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/SparseLU/SparseLU_pruneL.h @@ -101,7 +101,7 @@ void SparseLUImpl::pruneL(const Index jcol, const IndexVec kmin++; else { // kmin below pivrow (not yet pivoted), and kmax - // above pivrow: interchange the two suscripts + // above pivrow: interchange the two subscripts std::swap(glu.lsub(kmin), glu.lsub(kmax)); // If the supernode has only one column, then we diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/ThreadPool/CoreThreadPoolDevice.h b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/ThreadPool/CoreThreadPoolDevice.h index 5611a22bdc..acf1d628b6 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/ThreadPool/CoreThreadPoolDevice.h @@ -15,24 +15,24 @@ namespace Eigen { // CoreThreadPoolDevice provides an easy-to-understand Device for parallelizing Eigen Core expressions with // Threadpool. Expressions are recursively split evenly until the evaluation cost is less than the threshold for // delegating the task to a thread. - -// a -// / \ -// / \ -// / \ -// / \ -// / \ -// / \ -// / \ -// a e -// / \ / \ -// / \ / \ -// / \ / \ -// a c e g -// / \ / \ / \ / \ -// / \ / \ / \ / \ -// a b c d e f g h - +/* + a + / \ + / \ + / \ + / \ + / \ + / \ + / \ + a e + / \ / \ + / \ / \ + / \ / \ + a c e g + / \ / \ / \ / \ + / \ / \ / \ / \ + a b c d e f g h +*/ // Each task descends the binary tree to the left, delegates the right task to a new thread, and continues to the // left. This ensures that work is evenly distributed to the thread pool as quickly as possible and minimizes the number // of tasks created during the evaluation. Consider an expression that is divided into 8 chunks. The @@ -77,7 +77,7 @@ struct CoreThreadPoolDevice { Index size = end - begin; eigen_assert(size % PacketSize == 0 && "this function assumes size is a multiple of PacketSize"); Index mid = begin + numext::round_down(size >> 1, PacketSize); - Task right = [=, this, &f, &barrier]() { + Task right = [this, mid, end, &f, &barrier, level]() { parallelForImpl(mid, end, f, barrier, level); }; m_pool.Schedule(std::move(right)); @@ -96,7 +96,7 @@ struct CoreThreadPoolDevice { Index outerSize = outerEnd - outerBegin; if (outerSize > 1) { Index outerMid = outerBegin + (outerSize >> 1); - Task right = [=, this, &f, &barrier]() { + Task right = [this, &f, &barrier, outerMid, outerEnd, innerBegin, innerEnd, level]() { parallelForImpl(outerMid, outerEnd, innerBegin, innerEnd, f, barrier, level); }; m_pool.Schedule(std::move(right)); @@ -105,7 +105,7 @@ struct CoreThreadPoolDevice { Index innerSize = innerEnd - innerBegin; eigen_assert(innerSize % PacketSize == 0 && "this function assumes innerSize is a multiple of PacketSize"); Index innerMid = innerBegin + numext::round_down(innerSize >> 1, PacketSize); - Task right = [=, this, &f, &barrier]() { + Task right = [this, &f, &barrier, outerBegin, outerEnd, innerMid, innerEnd, level]() { parallelForImpl(outerBegin, outerEnd, innerMid, innerEnd, f, barrier, level); }; m_pool.Schedule(std::move(right)); diff --git a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/plugins/ArrayCwiseUnaryOps.inc b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/plugins/ArrayCwiseUnaryOps.inc index 5e5d45b052..cc708fadde 100644 --- a/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +++ b/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/plugins/ArrayCwiseUnaryOps.inc @@ -1,5 +1,3 @@ - - typedef CwiseUnaryOp, const Derived> AbsReturnType; typedef CwiseUnaryOp, const Derived> ArgReturnType; typedef CwiseUnaryOp, const Derived> CArgReturnType; @@ -41,6 +39,7 @@ typedef CwiseUnaryOp, const Derived> TruncRetu typedef CwiseUnaryOp, const Derived> IsNaNReturnType; typedef CwiseUnaryOp, const Derived> IsInfReturnType; typedef CwiseUnaryOp, const Derived> IsFiniteReturnType; +typedef CwiseUnaryOp, const Derived> IsFiniteTypedReturnType; /** \returns an expression of the coefficient-wise absolute value of \c *this * @@ -417,6 +416,9 @@ EIGEN_DEVICE_FUNC inline const IsInfReturnType isInf() const { return IsInfRetur * \sa isnan(), isinf() */ EIGEN_DEVICE_FUNC inline const IsFiniteReturnType isFinite() const { return IsFiniteReturnType(derived()); } +EIGEN_DEVICE_FUNC inline const IsFiniteTypedReturnType isFiniteTyped() const { + return IsFiniteTypedReturnType(derived()); +} /** \returns an expression of the coefficient-wise ! operator of *this * @@ -516,7 +518,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const UnaryPowReturnType p const ScalarExponent& exponent) const { return UnaryPowReturnType(derived(), internal::scalar_unary_pow_op(exponent)); #else -/** \returns an expression of the coefficients of \c *this rasied to the constant power \a exponent +/** \returns an expression of the coefficients of \c *this raised to the constant power \a exponent * * \tparam T is the scalar type of \a exponent. It must be compatible with the scalar type of the given expression. *