#include <stdio.h>
#include <stdlib.h>
#include "cblas.h"
#include "cblas_f77.h"
Go to the source code of this file.
|
| void | cblas_zgemv (const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA, const CBLAS_INT M, const CBLAS_INT N, const void *alpha, const void *A, const CBLAS_INT lda, const void *X, const CBLAS_INT incX, const void *beta, void *Y, const CBLAS_INT incY) |
◆ F77_incX
◆ F77_incY
◆ F77_lda
◆ F77_M
◆ F77_N
◆ F77_TA
◆ cblas_zgemv()
| void cblas_zgemv |
( |
const CBLAS_LAYOUT | layout, |
|
|
const CBLAS_TRANSPOSE | TransA, |
|
|
const CBLAS_INT | M, |
|
|
const CBLAS_INT | N, |
|
|
const void * | alpha, |
|
|
const void * | A, |
|
|
const CBLAS_INT | lda, |
|
|
const void * | X, |
|
|
const CBLAS_INT | incX, |
|
|
const void * | beta, |
|
|
void * | Y, |
|
|
const CBLAS_INT | incY ) |
Definition at line 12 of file cblas_zgemv.c.
17{
18 char TA;
19#ifdef F77_CHAR
21#else
22 #define F77_TA &TA
23#endif
24#ifdef F77_INT
26#else
27 #define F77_M M
28 #define F77_N N
29 #define F77_lda lda
30 #define F77_incX incx
31 #define F77_incY incY
32#endif
33
35 const double *xx= (
double *)X, *alp= (
double *)
alpha, *bet = (
double *)beta;
36 double ALPHA[2],BETA[2];
38 double *
x=(
double *)X, *
y=(
double *)Y, *st=0, *tx;
42
44
46 {
50 else
51 {
52 cblas_xerbla(2,
"cblas_zgemv",
"Illegal TransA setting, %d\n", TransA);
55 return;
56 }
57 #ifdef F77_CHAR
59 #endif
62 }
64 {
66
70 {
71 ALPHA[0]= *alp;
72 ALPHA[1]= -alp[1];
73 BETA[0]= *bet;
74 BETA[1]= -bet[1];
75 TA = 'N';
76 if (M > 0)
77 {
79 x = malloc(
n*
sizeof(
double));
81 if( incX > 0 ) {
82 i = incX << 1 ;
83 tincx = 2;
85 } else {
86 i = incX *(-2);
87 tincx = -2;
90 }
91
92 do
93 {
97 xx += i;
98 }
101
102 #ifdef F77_INT
104 #else
105 incx = 1;
106 #endif
107
108 if(incY > 0)
109 tincY = incY;
110 else
111 tincY = -incY;
112
114
116 {
117 i = tincY << 1;
120 do {
125 }
126 }
127 else x = (
double *) X;
128 }
129 else
130 {
131 cblas_xerbla(2,
"cblas_zgemv",
"Illegal TransA setting, %d\n", TransA);
134 return;
135 }
136 #ifdef F77_CHAR
138 #endif
142 else
145
147 {
148 if (
x != (
double *)X) free(
x);
150 {
151 do
152 {
155 }
157 }
158 }
159 }
160 else cblas_xerbla(1,
"cblas_zgemv",
"Illegal layout setting, %d\n", layout);
163 return;
164}
void cblas_xerbla(CBLAS_INT p, const char *rout, const char *form,...)