Fix typos: misspellings, French variable names, and hyphenation

libeigen/eigen!2185

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-02-22 10:04:40 -08:00
parent 44c6132163
commit 8c35441f18
15 changed files with 63 additions and 63 deletions

View File

@@ -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

View File

@@ -33,7 +33,7 @@
#include <string>
#include <iostream>
// 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 {

View File

@@ -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) {

View File

@@ -39,24 +39,24 @@ class blitz_LU_solve_interface : public blitz_interface<real> {
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<real> {
}
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;

View File

@@ -39,24 +39,24 @@ class blitz_LU_solve_interface : public blitz_interface<real> {
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<real> {
}
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;

View File

@@ -39,24 +39,24 @@ class blitz_LU_solve_interface : public blitz_interface<real> {
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<real> {
}
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;

View File

@@ -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

View File

@@ -2,5 +2,5 @@ EigenSolver<MatrixXf> 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;

View File

@@ -2,5 +2,5 @@ MatrixXcf A = MatrixXcf::Random(4, 4);
HessenbergDecomposition<MatrixXcf> 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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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.

View File

@@ -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 <typename SrcScalar, typename TgtScalar>
struct random_without_cast_overflow<
SrcScalar, TgtScalar,

View File

@@ -222,7 +222,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
Index nn = numext::div_ceil(nn0, gn);
// If there is enough concurrency in the sharding dimension, we choose not
// to paralellize by the other dimension, and execute all kernels in sync
// to parallelize by the other dimension, and execute all kernels in sync
// mode. This reduces parallelism from the nm x nn down to nn
// (shard_by_col==true) or nm (shard_by_col==false).
const Index sharding_dim_tasks = shard_by_col ? nn : nm;