Small fixes
This MR fixes a bunch of smaller issues, making the following changes:
* Template parameters in the documentation are documented with `\tparam` instead
of `\param`
* Superfluous semicolon warnings fixed
* Fixed the type of literals used to initialize float variables
diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h
index 2674405..ef1c11f 100644
--- a/Eigen/src/Cholesky/LDLT.h
+++ b/Eigen/src/Cholesky/LDLT.h
@@ -246,7 +246,7 @@
* This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:
* \code x = decomposition.adjoint().solve(b) \endcode
*/
- const LDLT& adjoint() const { return *this; };
+ const LDLT& adjoint() const { return *this; }
EIGEN_DEVICE_FUNC inline EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); }
EIGEN_DEVICE_FUNC inline EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h
index f22d2a7..c223da2 100644
--- a/Eigen/src/Cholesky/LLT.h
+++ b/Eigen/src/Cholesky/LLT.h
@@ -201,7 +201,7 @@
* This method is provided for compatibility with other matrix decompositions, thus enabling generic code such as:
* \code x = decomposition.adjoint().solve(b) \endcode
*/
- const LLT& adjoint() const EIGEN_NOEXCEPT { return *this; };
+ const LLT& adjoint() const EIGEN_NOEXCEPT { return *this; }
inline EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); }
inline EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h
index d33af54..91c1cfc 100644
--- a/Eigen/src/CholmodSupport/CholmodSupport.h
+++ b/Eigen/src/CholmodSupport/CholmodSupport.h
@@ -438,7 +438,7 @@
if (m_cholmodFactor->is_ll)
logDet *= 2.0;
return logDet;
- };
+ }
template<typename Stream>
void dumpMemory(Stream& /*s*/)
diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h
index 6d8df3d..4dd56db 100644
--- a/Eigen/src/Core/Diagonal.h
+++ b/Eigen/src/Core/Diagonal.h
@@ -20,8 +20,8 @@
*
* \brief Expression of a diagonal/subdiagonal/superdiagonal in a matrix
*
- * \param MatrixType the type of the object in which we are taking a sub/main/super diagonal
- * \param DiagIndex the index of the sub/super diagonal. The default is 0 and it means the main diagonal.
+ * \tparam MatrixType the type of the object in which we are taking a sub/main/super diagonal
+ * \tparam DiagIndex the index of the sub/super diagonal. The default is 0 and it means the main diagonal.
* A positive value means a superdiagonal, a negative value means a subdiagonal.
* You can also use DynamicIndex so the index can be set at runtime.
*
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h
index d5053d6..453f69b 100644
--- a/Eigen/src/Core/DiagonalMatrix.h
+++ b/Eigen/src/Core/DiagonalMatrix.h
@@ -118,9 +118,9 @@
*
* \brief Represents a diagonal matrix with its storage
*
- * \param Scalar_ the type of coefficients
- * \param SizeAtCompileTime the dimension of the matrix, or Dynamic
- * \param MaxSizeAtCompileTime the dimension of the matrix, or Dynamic. This parameter is optional and defaults
+ * \tparam Scalar_ the type of coefficients
+ * \tparam SizeAtCompileTime the dimension of the matrix, or Dynamic
+ * \tparam MaxSizeAtCompileTime the dimension of the matrix, or Dynamic. This parameter is optional and defaults
* to SizeAtCompileTime. Most of the time, you do not need to specify it.
*
* \sa class DiagonalWrapper
@@ -261,7 +261,7 @@
*
* \brief Expression of a diagonal matrix
*
- * \param DiagonalVectorType_ the type of the vector of diagonal coefficients
+ * \tparam DiagonalVectorType_ the type of the vector of diagonal coefficients
*
* This class is an expression of a diagonal matrix, but not storing its own vector of diagonal coefficients,
* instead wrapping an existing vector expression. It is the return type of MatrixBase::asDiagonal()
diff --git a/Eigen/src/Core/Select.h b/Eigen/src/Core/Select.h
index f2a2a03..d9ed2b2 100644
--- a/Eigen/src/Core/Select.h
+++ b/Eigen/src/Core/Select.h
@@ -19,9 +19,9 @@
*
* \brief Expression of a coefficient wise version of the C++ ternary operator ?:
*
- * \param ConditionMatrixType the type of the \em condition expression which must be a boolean matrix
- * \param ThenMatrixType the type of the \em then expression
- * \param ElseMatrixType the type of the \em else expression
+ * \tparam ConditionMatrixType the type of the \em condition expression which must be a boolean matrix
+ * \tparam ThenMatrixType the type of the \em then expression
+ * \tparam ElseMatrixType the type of the \em else expression
*
* This class represents an expression of a coefficient wise version of the C++ ternary operator ?:.
* It is the return type of DenseBase::select() and most of the time this is the only way it is used.
diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h
index 6b11247..7096058 100644
--- a/Eigen/src/Core/SelfAdjointView.h
+++ b/Eigen/src/Core/SelfAdjointView.h
@@ -20,8 +20,8 @@
*
* \brief Expression of a selfadjoint matrix from a triangular part of a dense matrix
*
- * \param MatrixType the type of the dense matrix storing the coefficients
- * \param TriangularPart can be either \c #Lower or \c #Upper
+ * \tparam MatrixType the type of the dense matrix storing the coefficients
+ * \tparam TriangularPart can be either \c #Lower or \c #Upper
*
* This class is an expression of a sefladjoint matrix from a triangular part of a matrix
* with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView()
diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h
index 9376a79..28f515f 100644
--- a/Eigen/src/Core/TriangularMatrix.h
+++ b/Eigen/src/Core/TriangularMatrix.h
@@ -155,8 +155,8 @@
*
* \brief Expression of a triangular part in a matrix
*
- * \param MatrixType the type of the object in which we are taking the triangular part
- * \param Mode the kind of triangular matrix expression to construct. Can be #Upper,
+ * \tparam MatrixType the type of the object in which we are taking the triangular part
+ * \tparam Mode the kind of triangular matrix expression to construct. Can be #Upper,
* #Lower, #UnitUpper, #UnitLower, #StrictlyUpper, or #StrictlyLower.
* This is in fact a bit field; it must have either #Upper or #Lower,
* and additionally it may have #UnitDiag or #ZeroDiag or neither.
diff --git a/Eigen/src/Core/util/Serializer.h b/Eigen/src/Core/util/Serializer.h
index 7ec5eed..4f7e062 100644
--- a/Eigen/src/Core/util/Serializer.h
+++ b/Eigen/src/Core/util/Serializer.h
@@ -46,7 +46,7 @@
/**
* Serializes a value to a byte buffer.
* \param dest the destination buffer.
- * \param T the value to serialize.
+ * \param value the value to serialize.
* \return the next memory address past the end of the serialized data.
*/
EIGEN_DEVICE_FUNC uint8_t* serialize(uint8_t* dest, const T& value) {
diff --git a/Eigen/src/QR/CompleteOrthogonalDecomposition.h b/Eigen/src/QR/CompleteOrthogonalDecomposition.h
index 111d583..585c9ca 100644
--- a/Eigen/src/QR/CompleteOrthogonalDecomposition.h
+++ b/Eigen/src/QR/CompleteOrthogonalDecomposition.h
@@ -32,7 +32,7 @@
*
* \brief Complete orthogonal decomposition (COD) of a matrix.
*
- * \param MatrixType the type of the matrix of which we are computing the COD.
+ * \tparam MatrixType_ the type of the matrix of which we are computing the COD.
*
* This class performs a rank-revealing complete orthogonal decomposition of a
* matrix \b A into matrices \b P, \b Q, \b T, and \b Z such that
diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h
index 1516d26..6fc7d33 100644
--- a/Eigen/src/SparseLU/SparseLU.h
+++ b/Eigen/src/SparseLU/SparseLU.h
@@ -454,8 +454,8 @@
return (m_detPermR * m_detPermC) > 0 ? det : -det;
}
- Index nnzL() const { return m_nnzL; };
- Index nnzU() const { return m_nnzU; };
+ Index nnzL() const { return m_nnzL; }
+ Index nnzU() const { return m_nnzU; }
protected:
// Functions
diff --git a/test/bfloat16_float.cpp b/test/bfloat16_float.cpp
index c3de0b1..b2a22ce 100644
--- a/test/bfloat16_float.cpp
+++ b/test/bfloat16_float.cpp
@@ -209,8 +209,8 @@
void test_arithmetic()
{
- VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(2)), 4);
- VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(-2)), 0);
+ VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(2)), 4.f);
+ VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2) + bfloat16(-2)), 0.f);
VERIFY_IS_APPROX(static_cast<float>(bfloat16(0.33333f) + bfloat16(0.66667f)), 1.0f);
VERIFY_IS_EQUAL(static_cast<float>(bfloat16(2.0f) * bfloat16(-5.5f)), -11.0f);
VERIFY_IS_APPROX(static_cast<float>(bfloat16(1.0f) / bfloat16(3.0f)), 0.3339f);
diff --git a/test/main.h b/test/main.h
index 041233d..0e34137 100644
--- a/test/main.h
+++ b/test/main.h
@@ -22,7 +22,7 @@
// The following includes of STL headers have to be done _before_ the
// definition of macros min() and max(). The reason is that many STL
// implementations will not work properly as the min and max symbols collide
-// with the STL functions std:min() and std::max(). The STL headers may check
+// with the STL functions std::min() and std::max(). The STL headers may check
// for the macro definition of min/max and issue a warning or undefine the
// macros.
//
@@ -420,7 +420,8 @@
inline bool test_isApprox(TYPE a, TYPE b) \
{ return internal::isApprox(a, b, test_precision<TYPE>()); } \
inline bool test_isCwiseApprox(TYPE a, TYPE b, bool exact) \
- { return a == b || ((numext::isnan)(a) && (numext::isnan)(b)) || \
+ { return numext::equal_strict(a, b) || \
+ ((numext::isnan)(a) && (numext::isnan)(b)) || \
(!exact && internal::isApprox(a, b, test_precision<TYPE>())); } \
inline bool test_isMuchSmallerThan(TYPE a, TYPE b) \
{ return internal::isMuchSmallerThan(a, b, test_precision<TYPE>()); } \
@@ -664,7 +665,7 @@
template<typename T, typename U>
bool test_is_equal(const T& actual, const U& expected, bool expect_equal)
{
- if ((actual==expected) == expect_equal)
+ if (numext::equal_strict(actual, expected) == expect_equal)
return true;
// false:
std::cerr
diff --git a/test/rand.cpp b/test/rand.cpp
index 984c01f..b4cc179 100644
--- a/test/rand.cpp
+++ b/test/rand.cpp
@@ -62,9 +62,9 @@
for(int i = 0; i < g_repeat*10000; i++) {
CALL_SUBTEST(check_in_range<float>(10,11));
- CALL_SUBTEST(check_in_range<float>(1.24234523,1.24234523));
+ CALL_SUBTEST(check_in_range<float>(1.24234523f,1.24234523f));
CALL_SUBTEST(check_in_range<float>(-1,1));
- CALL_SUBTEST(check_in_range<float>(-1432.2352,-1432.2352));
+ CALL_SUBTEST(check_in_range<float>(-1432.2352f,-1432.2352f));
CALL_SUBTEST(check_in_range<double>(10,11));
CALL_SUBTEST(check_in_range<double>(1.24234523,1.24234523));