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;