fixed working version of matrix multiplcation

This commit is contained in:
2026-04-20 13:35:58 +01:00
parent 12ce7e7ade
commit 263efec2a5
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ void *malloc(size_t size);
void init_seq(double *a, const unsigned n_rows_a, const unsigned n_cols_a) { void init_seq(double *a, const unsigned n_rows_a, const unsigned n_cols_a) {
for (size_t i = 0; i < n_rows_a; i++) { for (size_t i = 0; i < n_rows_a; i++) {
for (size_t j = 0; j < n_cols_a; j++) { for (size_t j = 0; j < n_cols_a; j++) {
a[i*n_cols_a + j] = i*n_cols_a + j; a[i*n_cols_a + j] = 2.0;
} }
} }
} }
@@ -148,7 +148,7 @@ int main(void) {
/* For measuring time */ /* For measuring time */
double t0, t1; double t0, t1;
const unsigned scale = 1; const unsigned scale = 3;
const unsigned n_rows_a = 4 * scale; const unsigned n_rows_a = 4 * scale;
const unsigned n_cols_a = 3 * scale; const unsigned n_cols_a = 3 * scale;
const unsigned n_rows_b = 3 * scale; const unsigned n_rows_b = 3 * scale;

Binary file not shown.