265 SUBROUTINE zlatm5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
266 $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
274 INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
275 $ PRTYPE, QBLCKA, QBLCKB
276 DOUBLE PRECISION ALPHA
279 COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
280 $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
281 $ l( ldl, * ), r( ldr, * )
287 COMPLEX*16 ONE, TWO, ZERO, HALF, TWENTY
288 PARAMETER ( ONE = ( 1.0d+0, 0.0d+0 ),
289 $ two = ( 2.0d+0, 0.0d+0 ),
290 $ zero = ( 0.0d+0, 0.0d+0 ),
291 $ half = ( 0.5d+0, 0.0d+0 ),
292 $ twenty = ( 2.0d+1, 0.0d+0 ) )
296 COMPLEX*16 IMEPS, REEPS
299 INTRINSIC dcmplx, mod, sin
306 IF( prtype.EQ.1 )
THEN
312 ELSE IF( i.EQ.j-1 )
THEN
325 b( i, j ) = one - alpha
327 ELSE IF( i.EQ.j-1 )
THEN
339 r( i, j ) = ( half-sin( dcmplx( i / j ) ) )*twenty
340 l( i, j ) = r( i, j )
344 ELSE IF( prtype.EQ.2 .OR. prtype.EQ.3 )
THEN
348 a( i, j ) = ( half-sin( dcmplx( i ) ) )*two
349 d( i, j ) = ( half-sin( dcmplx( i*j ) ) )*two
360 b( i, j ) = ( half-sin( dcmplx( i+j ) ) )*two
361 e( i, j ) = ( half-sin( dcmplx( j ) ) )*two
371 r( i, j ) = ( half-sin( dcmplx( i*j ) ) )*twenty
372 l( i, j ) = ( half-sin( dcmplx( i+j ) ) )*twenty
376 IF( prtype.EQ.3 )
THEN
379 DO 130 k = 1, m - 1, qblcka
380 a( k+1, k+1 ) = a( k, k )
381 a( k+1, k ) = -sin( a( k, k+1 ) )
386 DO 140 k = 1, n - 1, qblckb
387 b( k+1, k+1 ) = b( k, k )
388 b( k+1, k ) = -sin( b( k, k+1 ) )
392 ELSE IF( prtype.EQ.4 )
THEN
395 a( i, j ) = ( half-sin( dcmplx( i*j ) ) )*twenty
396 d( i, j ) = ( half-sin( dcmplx( i+j ) ) )*two
402 b( i, j ) = ( half-sin( dcmplx( i+j ) ) )*twenty
403 e( i, j ) = ( half-sin( dcmplx( i*j ) ) )*two
409 r( i, j ) = ( half-sin( dcmplx( j / i ) ) )*twenty
410 l( i, j ) = ( half-sin( dcmplx( i*j ) ) )*two
414 ELSE IF( prtype.GE.5 )
THEN
415 reeps = half*two*twenty / alpha
416 imeps = ( half-two ) / alpha
419 r( i, j ) = ( half-sin( dcmplx( i*j ) ) )*alpha / twenty
420 l( i, j ) = ( half-sin( dcmplx( i+j ) ) )*alpha / twenty
432 $ a( i, i ) = one + reeps
433 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
435 ELSE IF( i.GT.1 )
THEN
438 ELSE IF( i.LE.8 )
THEN
444 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
446 ELSE IF( i.GT.1 )
THEN
451 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
452 a( i, i+1 ) = imeps*2
453 ELSE IF( i.GT.1 )
THEN
454 a( i, i-1 ) = -imeps*2
464 $ b( i, i ) = one - reeps
465 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
467 ELSE IF( i.GT.1 )
THEN
470 ELSE IF( i.LE.8 )
THEN
476 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
477 b( i, i+1 ) = one + imeps
478 ELSE IF( i.GT.1 )
THEN
479 b( i, i-1 ) = -one - imeps
482 b( i, i ) = one - reeps
483 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
484 b( i, i+1 ) = imeps*2
485 ELSE IF( i.GT.1 )
THEN
486 b( i, i-1 ) = -imeps*2
494 CALL zgemm(
'N',
'N', m, n, m, one, a, lda, r, ldr, zero, c, ldc )
495 CALL zgemm(
'N',
'N', m, n, n, -one, l, ldl, b, ldb, one, c, ldc )
496 CALL zgemm(
'N',
'N', m, n, m, one, d, ldd, r, ldr, zero, f, ldf )
497 CALL zgemm(
'N',
'N', m, n, n, -one, l, ldl, e, lde, one, f, ldf )
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlatm5(prtype, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, r, ldr, l, ldl, alpha, qblcka, qblckb)
ZLATM5