14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
21 int K,
int IOFFD,
char * ALPHA,
char * A,
int LDA,
22 char * XC,
int LDXC,
char * XR,
int LDXR,
char * YC,
23 int LDYC,
char * YR,
int LDYR )
25 void PB_Ctzhemv(
TYPE, SIDE, UPLO, M, N, K, IOFFD, ALPHA, A, LDA, XC,
26 LDXC, XR, LDXR, YC, LDYC, YR, LDYR )
31 int IOFFD, K, LDA, LDXC, LDXR, LDYC, LDYR, M, N;
37 char * A, * XC, * XR, * YC, * YR;
175 int i1, ione=1, j1, m1, mn, n1, size;
181 if( ( M <= 0 ) || ( N <= 0 ) )
return;
186 mn =
MAX( 0, -IOFFD );
187 if( ( n1 =
MIN( mn, N ) ) > 0 )
189 gemv(
C2F_CHAR(
NOTRAN ), &M, &n1, ALPHA, A, &LDA, XR, &LDXR, one, YC,
191 gemv(
C2F_CHAR(
COTRAN ), &M, &n1, ALPHA, A, &LDA, XC, &ione, one, YR,
195 if( ( n1 =
MIN( n1, N ) - mn ) > 0 )
197 i1 = ( j1 = mn ) + IOFFD;
199 size ), &LDA,
Mptr( XC, i1, 0, LDXC, size ), &ione, one,
200 Mptr( YC, i1, 0, LDYC, size ), &ione );
201 if( ( m1 = M - mn - n1 - IOFFD ) > 0 )
205 size ), &LDA,
Mptr( XR, 0, j1, LDXR, size ), &LDXR, one,
206 Mptr( YC, i1, 0, LDYC, size ), &ione );
208 size ), &LDA,
Mptr( XC, i1, 0, LDXC, size ), &ione, one,
209 Mptr( YR, 0, j1, LDYR, size ), &LDYR );
216 mn = M - IOFFD; mn =
MIN( mn, N );
217 if( ( n1 = mn -
MAX( 0, -IOFFD ) ) > 0 )
220 if( ( m1 =
MAX( 0, IOFFD ) ) > 0 )
222 gemv(
C2F_CHAR(
NOTRAN ), &m1, &n1, ALPHA, A, &LDA, XR, &LDXR, one,
224 gemv(
C2F_CHAR(
COTRAN ), &m1, &n1, ALPHA, A, &LDA, XC, &ione, one,
228 size ), &LDA,
Mptr( XC, m1, 0, LDXC, size ), &ione, one,
229 Mptr( YC, m1, 0, LDYC, size ), &ione );
231 if( ( n1 = N -
MAX( 0, mn ) ) > 0 )
235 &LDA,
Mptr( XR, 0, j1, LDXR, size ), &LDXR, one, YC, &ione );
237 &LDA, XC, &ione, one,
Mptr( YR, 0, j1, LDYR, size ), &LDYR );
242 one =
TYPE->one; gemv =
TYPE->Fgemv;
243 gemv(
C2F_CHAR(
NOTRAN ), &M, &N, ALPHA, A, &LDA, XR, &LDXR, one, YC,
245 gemv(
C2F_CHAR(
COTRAN ), &M, &N, ALPHA, A, &LDA, XC, &ione, one, YR,