8{
11
12 double *a, *x, *y;
13 double alpha, beta;
15
18
19 m = 4;
20 n = 4;
21 lda = 4;
22 incx = 1;
23 incy = 1;
24 alpha = 1;
25 beta = 0;
26
27 a = (double *)malloc(sizeof(double)*m*n);
28 x = (double *)malloc(sizeof(double)*n);
29 y = (double *)malloc(sizeof(double)*n);
30
31 a[0] = 1;
32 a[1] = 2;
33 a[2] = 3;
34 a[3] = 4;
35
36 a[m] = 1;
37 a[m+1] = 1;
38 a[m+2] = 1;
39 a[m+3] = 1;
40
41 a[m*2] = 3;
42 a[m*2+1] = 4;
43 a[m*2+2] = 5;
44 a[m*2+3] = 6;
45
46 a[m*3] = 5;
47 a[m*3+1] = 6;
48 a[m*3+2] = 7;
49 a[m*3+3] = 8;
50
51 x[0] = 1;
52 x[1] = 2;
53 x[2] = 1;
54 x[3] = 1;
55 y[0] = 0;
56 y[1] = 0;
57 y[2] = 0;
58 y[3] = 0;
59
60 cblas_dgemv( Layout, transa, m, n, alpha, a, lda, x, incx, beta,
61 y, incy );
62
63 for( i = 0; i < n; i++ )
65 free(a);
66 free(x);
67 free(y);
68 return 0;
69}
void cblas_dgemv(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA, const CBLAS_INT M, const CBLAS_INT N, const double alpha, const double *A, const CBLAS_INT lda, const double *X, const CBLAS_INT incX, const double beta, double *Y, const CBLAS_INT incY)