/*********************************************************** * mv_blas_phc.c * * -- sequential matrix - vector multiplication * * * * Compute y = A * x by means of the * * Basic Linear Algebra Subroutines (BLAS) * * * ***********************************************************/ #include #include int m=16, n=20; void dgemv_(...); main(int argc, char* argv[]) { double A[n][m], x[n], y[m], alpha=1, beta=0; int i,j,inc=1,lda=m; char c='N'; /* Initialize matrix A with A(i,j) = |i-j|. But, use the Fortran transposed matrix */ .... .... /* Initialize vector x[j] = j */ .... /* Multiply y = alpha*A*x + beta*y (alpha=1, beta=0) */ dgemv_(....); /* Print result */ for (i=0; i