Task 6, Sheet 3

This commit is contained in:
Lisa Pizzo 2025-11-05 15:58:10 +01:00
commit 0ff49e29d3
3 changed files with 155 additions and 0 deletions

20
Sheet3/bench_funcs_blas.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef BENCH_FUNCS_BLAS_H
#define BENCH_FUNCS_BLAS_H
#include <vector>
// ===== BLAS-based benchmark functions =====
// (A2) cBLAS dot product
double dot_cblas(const std::vector<double>& x, const std::vector<double>& y);
// (B2) cBLAS matrixvector product
void matvec_cblas(const std::vector<double>& A, std::size_t M, std::size_t N,
const std::vector<double>& x, std::vector<double>& b);
// (C2) cBLAS matrixmatrix product
void matmul_cblas(const std::vector<double>& A, std::size_t M, std::size_t L,
const std::vector<double>& B, std::size_t N,
std::vector<double>& C);
#endif