Clang-format tests, examples, libraries, benchmarks, etc.

This commit is contained in:
Antonio Sánchez
2023-12-05 21:22:55 +00:00
committed by Rasmus Munk Larsen
parent 3252ecc7a4
commit 46e9cdb7fe
876 changed files with 33453 additions and 37795 deletions

View File

@@ -10,28 +10,27 @@
#include "sparse_solver.h"
#include <Eigen/IterativeLinearSolvers>
template<typename T> void test_lscg_T()
{
template <typename T>
void test_lscg_T() {
LeastSquaresConjugateGradient<SparseMatrix<T> > lscg_colmajor_diag;
LeastSquaresConjugateGradient<SparseMatrix<T>, IdentityPreconditioner> lscg_colmajor_I;
LeastSquaresConjugateGradient<SparseMatrix<T,RowMajor> > lscg_rowmajor_diag;
LeastSquaresConjugateGradient<SparseMatrix<T,RowMajor>, IdentityPreconditioner> lscg_rowmajor_I;
LeastSquaresConjugateGradient<SparseMatrix<T, RowMajor> > lscg_rowmajor_diag;
LeastSquaresConjugateGradient<SparseMatrix<T, RowMajor>, IdentityPreconditioner> lscg_rowmajor_I;
CALL_SUBTEST( check_sparse_square_solving(lscg_colmajor_diag) );
CALL_SUBTEST( check_sparse_square_solving(lscg_colmajor_I) );
CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_colmajor_diag) );
CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_colmajor_I) );
CALL_SUBTEST(check_sparse_square_solving(lscg_colmajor_diag));
CALL_SUBTEST(check_sparse_square_solving(lscg_colmajor_I));
CALL_SUBTEST( check_sparse_square_solving(lscg_rowmajor_diag) );
CALL_SUBTEST( check_sparse_square_solving(lscg_rowmajor_I) );
CALL_SUBTEST(check_sparse_leastsquare_solving(lscg_colmajor_diag));
CALL_SUBTEST(check_sparse_leastsquare_solving(lscg_colmajor_I));
CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_rowmajor_diag) );
CALL_SUBTEST( check_sparse_leastsquare_solving(lscg_rowmajor_I) );
CALL_SUBTEST(check_sparse_square_solving(lscg_rowmajor_diag));
CALL_SUBTEST(check_sparse_square_solving(lscg_rowmajor_I));
CALL_SUBTEST(check_sparse_leastsquare_solving(lscg_rowmajor_diag));
CALL_SUBTEST(check_sparse_leastsquare_solving(lscg_rowmajor_I));
}
EIGEN_DECLARE_TEST(lscg)
{
EIGEN_DECLARE_TEST(lscg) {
CALL_SUBTEST_1(test_lscg_T<double>());
CALL_SUBTEST_2(test_lscg_T<std::complex<double> >());
}