From 8c35441f18e4b3c0e8c17450ebfc33e96333290b Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen <4643818-rmlarsen1@users.noreply.gitlab.com> Date: Sun, 22 Feb 2026 10:04:40 -0800 Subject: [PATCH] Fix typos: misspellings, French variable names, and hyphenation libeigen/eigen!2185 Co-authored-by: Rasmus Munk Larsen --- bench/README.txt | 2 +- bench/btl/generic_bench/timers/x86_timer.hh | 4 +- bench/btl/libs/STL/STL_interface.hh | 60 +++++++++---------- .../libs/blitz/blitz_LU_solve_interface.hh | 14 ++--- bench/btl/libs/gmm/gmm_LU_solve_interface.hh | 14 ++--- .../btl/libs/mtl4/mtl4_LU_solve_interface.hh | 14 ++--- doc/TutorialMapClass.dox | 2 +- doc/snippets/EigenSolver_compute.cpp | 2 +- .../HessenbergDecomposition_compute.cpp | 2 +- ...ointEigenSolver_SelfAdjointEigenSolver.cpp | 2 +- ...fAdjointEigenSolver_compute_MatrixType.cpp | 2 +- doc/snippets/Tridiagonalization_compute.cpp | 2 +- test/gpu_test_helper.h | 2 +- test/random_without_cast_overflow.h | 2 +- .../src/Tensor/TensorContractionThreadPool.h | 2 +- 15 files changed, 63 insertions(+), 63 deletions(-) diff --git a/bench/README.txt b/bench/README.txt index 49c278f58..047f22422 100644 --- a/bench/README.txt +++ b/bench/README.txt @@ -83,7 +83,7 @@ different compiler flags without reconfiguring CMake: ``` cd bench && make # builds with -O3 -march=znver5 by default -make clean && make CXX="clang++" ## For differnt compiler apart from g++ +make clean && make CXX="clang++" ## For different compiler apart from g++ make clean && make MARCH="" CXXFLAGS="-O2" # example of custom flags make AOCL_ROOT=/opt/aocl # use AOCL from a custom location diff --git a/bench/btl/generic_bench/timers/x86_timer.hh b/bench/btl/generic_bench/timers/x86_timer.hh index b54485bc9..4c896243b 100644 --- a/bench/btl/generic_bench/timers/x86_timer.hh +++ b/bench/btl/generic_bench/timers/x86_timer.hh @@ -33,7 +33,7 @@ #include #include -// frequence de la becanne en Hz +// CPU frequency in Hz // #define FREQUENCY 648000000 // #define FREQUENCY 1400000000 #define FREQUENCY 1695000000 @@ -63,7 +63,7 @@ class X86_Timer { do { dummy += 2; } while (time(0) == initial); - // On est au debut d'un cycle d'une seconde !!! + // We are at the start of a one-second cycle initial = time(0); start(); do { diff --git a/bench/btl/libs/STL/STL_interface.hh b/bench/btl/libs/STL/STL_interface.hh index 4a59253f7..92617f501 100644 --- a/bench/btl/libs/STL/STL_interface.hh +++ b/bench/btl/libs/STL/STL_interface.hh @@ -63,50 +63,50 @@ class STL_interface { } static inline void ata_product(const gene_matrix& A, gene_matrix& X, int N) { - real somme; + real sum; for (int j = 0; j < N; j++) { for (int i = 0; i < N; i++) { - somme = 0.0; + sum = 0.0; if (i >= j) { - for (int k = 0; k < N; k++) somme += A[i][k] * A[j][k]; - X[j][i] = somme; + for (int k = 0; k < N; k++) sum += A[i][k] * A[j][k]; + X[j][i] = sum; } } } } static inline void aat_product(const gene_matrix& A, gene_matrix& X, int N) { - real somme; + real sum; for (int j = 0; j < N; j++) { for (int i = 0; i < N; i++) { - somme = 0.0; + sum = 0.0; if (i >= j) { for (int k = 0; k < N; k++) { - somme += A[k][i] * A[k][j]; + sum += A[k][i] * A[k][j]; } - X[j][i] = somme; + X[j][i] = sum; } } } } static inline void matrix_matrix_product(const gene_matrix& A, const gene_matrix& B, gene_matrix& X, int N) { - real somme; + real sum; for (int j = 0; j < N; j++) { for (int i = 0; i < N; i++) { - somme = 0.0; - for (int k = 0; k < N; k++) somme += A[k][i] * B[j][k]; - X[j][i] = somme; + sum = 0.0; + for (int k = 0; k < N; k++) sum += A[k][i] * B[j][k]; + X[j][i] = sum; } } } static inline void matrix_vector_product(gene_matrix& A, gene_vector& B, gene_vector& X, int N) { - real somme; + real sum; for (int i = 0; i < N; i++) { - somme = 0.0; - for (int j = 0; j < N; j++) somme += A[j][i] * B[j]; - X[i] = somme; + sum = 0.0; + for (int j = 0; j < N; j++) sum += A[j][i] * B[j]; + X[i] = sum; } } @@ -137,11 +137,11 @@ class STL_interface { } static inline void atv_product(gene_matrix& A, gene_vector& B, gene_vector& X, int N) { - real somme; + real sum; for (int i = 0; i < N; i++) { - somme = 0.0; - for (int j = 0; j < N; j++) somme += A[i][j] * B[j]; - X[i] = somme; + sum = 0.0; + for (int j = 0; j < N; j++) sum += A[i][j] * B[j]; + X[i] = sum; } } @@ -164,31 +164,31 @@ class STL_interface { static inline real norm_diff(const stl_vector& A, const stl_vector& B) { int N = A.size(); - real somme = 0.0; - real somme2 = 0.0; + real sum = 0.0; + real sum2 = 0.0; for (int i = 0; i < N; i++) { real diff = A[i] - B[i]; - somme += diff * diff; - somme2 += A[i] * A[i]; + sum += diff * diff; + sum2 += A[i] * A[i]; } - return somme / somme2; + return sum / sum2; } static inline real norm_diff(const stl_matrix& A, const stl_matrix& B) { int N = A[0].size(); - real somme = 0.0; - real somme2 = 0.0; + real sum = 0.0; + real sum2 = 0.0; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { real diff = A[i][j] - B[i][j]; - somme += diff * diff; - somme2 += A[i][j] * A[i][j]; + sum += diff * diff; + sum2 += A[i][j] * A[i][j]; } } - return somme / somme2; + return sum / sum2; } static inline void display_vector(const stl_vector& A) { diff --git a/bench/btl/libs/blitz/blitz_LU_solve_interface.hh b/bench/btl/libs/blitz/blitz_LU_solve_interface.hh index 955c81678..4bc67dfce 100644 --- a/bench/btl/libs/blitz/blitz_LU_solve_interface.hh +++ b/bench/btl/libs/blitz/blitz_LU_solve_interface.hh @@ -39,24 +39,24 @@ class blitz_LU_solve_interface : public blitz_interface { static inline real matrix_vector_product_sliced(const gene_matrix &A, gene_vector B, int row, int col_start, int col_end) { - real somme = 0.; + real sum = 0.; for (int j = col_start; j < col_end + 1; j++) { - somme += A(row, j) * B(j); + sum += A(row, j) * B(j); } - return somme; + return sum; } static inline real matrix_matrix_product_sliced(gene_matrix &A, int row, int col_start, int col_end, gene_matrix &B, int row_shift, int col) { - real somme = 0.; + real sum = 0.; for (int j = col_start; j < col_end + 1; j++) { - somme += A(row, j) * B(j + row_shift, col); + sum += A(row, j) * B(j + row_shift, col); } - return somme; + return sum; } inline static void LU_factor(gene_matrix &LU, Pivot_Vector &pivot, int N) { @@ -120,7 +120,7 @@ class blitz_LU_solve_interface : public blitz_interface { } inline static void LU_solve(const gene_matrix &LU, const Pivot_Vector pivot, gene_vector &B, gene_vector X, int N) { - // Pour conserver le meme header, on travaille sur X, copie du second-membre B + // To keep the same header, we work on X, a copy of the right-hand side B X = B.copy(); ASSERT(LU.rows() == LU.cols()); firstIndex indI; diff --git a/bench/btl/libs/gmm/gmm_LU_solve_interface.hh b/bench/btl/libs/gmm/gmm_LU_solve_interface.hh index 955c81678..4bc67dfce 100644 --- a/bench/btl/libs/gmm/gmm_LU_solve_interface.hh +++ b/bench/btl/libs/gmm/gmm_LU_solve_interface.hh @@ -39,24 +39,24 @@ class blitz_LU_solve_interface : public blitz_interface { static inline real matrix_vector_product_sliced(const gene_matrix &A, gene_vector B, int row, int col_start, int col_end) { - real somme = 0.; + real sum = 0.; for (int j = col_start; j < col_end + 1; j++) { - somme += A(row, j) * B(j); + sum += A(row, j) * B(j); } - return somme; + return sum; } static inline real matrix_matrix_product_sliced(gene_matrix &A, int row, int col_start, int col_end, gene_matrix &B, int row_shift, int col) { - real somme = 0.; + real sum = 0.; for (int j = col_start; j < col_end + 1; j++) { - somme += A(row, j) * B(j + row_shift, col); + sum += A(row, j) * B(j + row_shift, col); } - return somme; + return sum; } inline static void LU_factor(gene_matrix &LU, Pivot_Vector &pivot, int N) { @@ -120,7 +120,7 @@ class blitz_LU_solve_interface : public blitz_interface { } inline static void LU_solve(const gene_matrix &LU, const Pivot_Vector pivot, gene_vector &B, gene_vector X, int N) { - // Pour conserver le meme header, on travaille sur X, copie du second-membre B + // To keep the same header, we work on X, a copy of the right-hand side B X = B.copy(); ASSERT(LU.rows() == LU.cols()); firstIndex indI; diff --git a/bench/btl/libs/mtl4/mtl4_LU_solve_interface.hh b/bench/btl/libs/mtl4/mtl4_LU_solve_interface.hh index 955c81678..4bc67dfce 100644 --- a/bench/btl/libs/mtl4/mtl4_LU_solve_interface.hh +++ b/bench/btl/libs/mtl4/mtl4_LU_solve_interface.hh @@ -39,24 +39,24 @@ class blitz_LU_solve_interface : public blitz_interface { static inline real matrix_vector_product_sliced(const gene_matrix &A, gene_vector B, int row, int col_start, int col_end) { - real somme = 0.; + real sum = 0.; for (int j = col_start; j < col_end + 1; j++) { - somme += A(row, j) * B(j); + sum += A(row, j) * B(j); } - return somme; + return sum; } static inline real matrix_matrix_product_sliced(gene_matrix &A, int row, int col_start, int col_end, gene_matrix &B, int row_shift, int col) { - real somme = 0.; + real sum = 0.; for (int j = col_start; j < col_end + 1; j++) { - somme += A(row, j) * B(j + row_shift, col); + sum += A(row, j) * B(j + row_shift, col); } - return somme; + return sum; } inline static void LU_factor(gene_matrix &LU, Pivot_Vector &pivot, int N) { @@ -120,7 +120,7 @@ class blitz_LU_solve_interface : public blitz_interface { } inline static void LU_solve(const gene_matrix &LU, const Pivot_Vector pivot, gene_vector &B, gene_vector X, int N) { - // Pour conserver le meme header, on travaille sur X, copie du second-membre B + // To keep the same header, we work on X, a copy of the right-hand side B X = B.copy(); ASSERT(LU.rows() == LU.cols()); firstIndex indI; diff --git a/doc/TutorialMapClass.dox b/doc/TutorialMapClass.dox index caa2539d8..64f0a0e21 100644 --- a/doc/TutorialMapClass.dox +++ b/doc/TutorialMapClass.dox @@ -9,7 +9,7 @@ This can be useful in a variety of contexts, particularly when "importing" vecto \section TutorialMapIntroduction Introduction -Occasionally you may have a pre-defined array of numbers that you want to use within %Eigen as a vector or matrix. While one option is to make a copy of the data, most commonly you probably want to re-use this memory as an %Eigen type. Fortunately, this is very easy with the Map class. +Occasionally you may have a pre-defined array of numbers that you want to use within %Eigen as a vector or matrix. While one option is to make a copy of the data, most commonly you probably want to reuse this memory as an %Eigen type. Fortunately, this is very easy with the Map class. \section TutorialMapTypes Map types and declaring Map variables diff --git a/doc/snippets/EigenSolver_compute.cpp b/doc/snippets/EigenSolver_compute.cpp index 1652463f9..6f794ee2c 100644 --- a/doc/snippets/EigenSolver_compute.cpp +++ b/doc/snippets/EigenSolver_compute.cpp @@ -2,5 +2,5 @@ EigenSolver es; MatrixXf A = MatrixXf::Random(4, 4); es.compute(A, /* computeEigenvectors = */ false); cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; -es.compute(A + MatrixXf::Identity(4, 4), false); // re-use es to compute eigenvalues of A+I +es.compute(A + MatrixXf::Identity(4, 4), false); // reuse es to compute eigenvalues of A+I cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; diff --git a/doc/snippets/HessenbergDecomposition_compute.cpp b/doc/snippets/HessenbergDecomposition_compute.cpp index 298b40b93..91c015a6f 100644 --- a/doc/snippets/HessenbergDecomposition_compute.cpp +++ b/doc/snippets/HessenbergDecomposition_compute.cpp @@ -2,5 +2,5 @@ MatrixXcf A = MatrixXcf::Random(4, 4); HessenbergDecomposition hd(4); hd.compute(A); cout << "The matrix H in the decomposition of A is:" << endl << hd.matrixH() << endl; -hd.compute(2 * A); // re-use hd to compute and store decomposition of 2A +hd.compute(2 * A); // reuse hd to compute and store decomposition of 2A cout << "The matrix H in the decomposition of 2A is:" << endl << hd.matrixH() << endl; diff --git a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp index 16f4b231f..0a26e9c5f 100644 --- a/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp +++ b/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp @@ -3,5 +3,5 @@ Matrix4f X = Matrix4f::Random(4, 4); Matrix4f A = X + X.transpose(); es.compute(A); cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; -es.compute(A + Matrix4f::Identity(4, 4)); // re-use es to compute eigenvalues of A+I +es.compute(A + Matrix4f::Identity(4, 4)); // reuse es to compute eigenvalues of A+I cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; diff --git a/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp b/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp index 9075db77c..1548562a8 100644 --- a/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp +++ b/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp @@ -3,5 +3,5 @@ MatrixXf X = MatrixXf::Random(4, 4); MatrixXf A = X + X.transpose(); es.compute(A); cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; -es.compute(A + MatrixXf::Identity(4, 4)); // re-use es to compute eigenvalues of A+I +es.compute(A + MatrixXf::Identity(4, 4)); // reuse es to compute eigenvalues of A+I cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; diff --git a/doc/snippets/Tridiagonalization_compute.cpp b/doc/snippets/Tridiagonalization_compute.cpp index ecaee1546..1bb9d2889 100644 --- a/doc/snippets/Tridiagonalization_compute.cpp +++ b/doc/snippets/Tridiagonalization_compute.cpp @@ -4,6 +4,6 @@ MatrixXf A = X + X.transpose(); tri.compute(A); cout << "The matrix T in the tridiagonal decomposition of A is: " << endl; cout << tri.matrixT() << endl; -tri.compute(2 * A); // re-use tri to compute eigenvalues of 2A +tri.compute(2 * A); // reuse tri to compute eigenvalues of 2A cout << "The matrix T in the tridiagonal decomposition of 2A is: " << endl; cout << tri.matrixT() << endl; diff --git a/test/gpu_test_helper.h b/test/gpu_test_helper.h index ca3eae216..ee6c70bbf 100644 --- a/test/gpu_test_helper.h +++ b/test/gpu_test_helper.h @@ -24,7 +24,7 @@ namespace Eigen { namespace internal { -// Note: cannot re-use tuple_impl, since that will cause havoc for +// Note: cannot reuse tuple_impl, since that will cause havoc for // tuple_test. namespace test_detail { // Use std::tuple on CPU, otherwise use the GPU-specific versions. diff --git a/test/random_without_cast_overflow.h b/test/random_without_cast_overflow.h index 418f21cdc..c176c0700 100644 --- a/test/random_without_cast_overflow.h +++ b/test/random_without_cast_overflow.h @@ -138,7 +138,7 @@ struct random_without_cast_overflow< } }; -// Integer to floating-point, re-use above logic. +// Integer to floating-point, reuse above logic. template struct random_without_cast_overflow< SrcScalar, TgtScalar, diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index 59b798f00..16c084ff9 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -222,7 +222,7 @@ struct TensorEvaluator