Response 3

This commit is contained in:
Gundolf Haase 2025-11-12 17:14:29 +01:00
commit 6a3d5f1e51
3 changed files with 25 additions and 4 deletions

View file

@ -35,10 +35,15 @@ double toc() {
}
//CHANGE FLAG BASED ON WHAT YOU WANT TO DO
int main() {
//int main() {
//cout << fixed << setprecision(6);
//int flag = 2; // 1=A2 (dot), 2=B2 (matvec), 3=C2 (matmul)
// GH
int main(const int argc, const char *argv[])
{
const unsigned int flag = (argc > 1) ? atoi(argv[1]) : 2;
// HG
cout << fixed << setprecision(6);
int flag = 2; // 1=A2 (dot), 2=B2 (matvec), 3=C2 (matmul)
if (flag == 1) {// A2) DOT via cBLAS
size_t N = 5000000;
vector<double> x, y;
@ -80,7 +85,7 @@ int main() {
}
else if (flag == 3) { // C2) GEMM via cBLAS
size_t M = 500, L = 500, N = 500;
size_t M = 500, L = 500, N = 500; // GH: Use also different sizes
vector<double> A, B, C;
gen_matrix_A(M, L, A);
gen_matrix_A(L, N, B);