265 SUBROUTINE zlatm5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D,
267 $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
275 INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
276 $ PRTYPE, QBLCKA, QBLCKB
277 DOUBLE PRECISION ALPHA
280 COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
281 $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
282 $ L( LDL, * ), R( LDR, * )
288 COMPLEX*16 ONE, TWO, ZERO, HALF, TWENTY
289 PARAMETER ( ONE = ( 1.0d+0, 0.0d+0 ),
290 $ two = ( 2.0d+0, 0.0d+0 ),
291 $ zero = ( 0.0d+0, 0.0d+0 ),
292 $ half = ( 0.5d+0, 0.0d+0 ),
293 $ twenty = ( 2.0d+1, 0.0d+0 ) )
297 COMPLEX*16 IMEPS, REEPS
300 INTRINSIC dcmplx, mod, sin
307 IF( prtype.EQ.1 )
THEN
313 ELSE IF( i.EQ.j-1 )
THEN
326 b( i, j ) = one - alpha
328 ELSE IF( i.EQ.j-1 )
THEN
340 r( i, j ) = ( half-sin( dcmplx( i / j ) ) )*twenty
341 l( i, j ) = r( i, j )
345 ELSE IF( prtype.EQ.2 .OR. prtype.EQ.3 )
THEN
349 a( i, j ) = ( half-sin( dcmplx( i ) ) )*two
350 d( i, j ) = ( half-sin( dcmplx( i*j ) ) )*two
361 b( i, j ) = ( half-sin( dcmplx( i+j ) ) )*two
362 e( i, j ) = ( half-sin( dcmplx( j ) ) )*two
372 r( i, j ) = ( half-sin( dcmplx( i*j ) ) )*twenty
373 l( i, j ) = ( half-sin( dcmplx( i+j ) ) )*twenty
377 IF( prtype.EQ.3 )
THEN
380 DO 130 k = 1, m - 1, qblcka
381 a( k+1, k+1 ) = a( k, k )
382 a( k+1, k ) = -sin( a( k, k+1 ) )
387 DO 140 k = 1, n - 1, qblckb
388 b( k+1, k+1 ) = b( k, k )
389 b( k+1, k ) = -sin( b( k, k+1 ) )
393 ELSE IF( prtype.EQ.4 )
THEN
396 a( i, j ) = ( half-sin( dcmplx( i*j ) ) )*twenty
397 d( i, j ) = ( half-sin( dcmplx( i+j ) ) )*two
403 b( i, j ) = ( half-sin( dcmplx( i+j ) ) )*twenty
404 e( i, j ) = ( half-sin( dcmplx( i*j ) ) )*two
410 r( i, j ) = ( half-sin( dcmplx( j / i ) ) )*twenty
411 l( i, j ) = ( half-sin( dcmplx( i*j ) ) )*two
415 ELSE IF( prtype.GE.5 )
THEN
416 reeps = half*two*twenty / alpha
417 imeps = ( half-two ) / alpha
420 r( i, j ) = ( half-sin( dcmplx( i*j ) ) )*alpha / twenty
421 l( i, j ) = ( half-sin( dcmplx( i+j ) ) )*alpha / twenty
433 $ a( i, i ) = one + reeps
434 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
436 ELSE IF( i.GT.1 )
THEN
439 ELSE IF( i.LE.8 )
THEN
445 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
447 ELSE IF( i.GT.1 )
THEN
452 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
453 a( i, i+1 ) = imeps*2
454 ELSE IF( i.GT.1 )
THEN
455 a( i, i-1 ) = -imeps*2
465 $ b( i, i ) = one - reeps
466 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
468 ELSE IF( i.GT.1 )
THEN
471 ELSE IF( i.LE.8 )
THEN
477 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
478 b( i, i+1 ) = one + imeps
479 ELSE IF( i.GT.1 )
THEN
480 b( i, i-1 ) = -one - imeps
483 b( i, i ) = one - reeps
484 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
485 b( i, i+1 ) = imeps*2
486 ELSE IF( i.GT.1 )
THEN
487 b( i, i-1 ) = -imeps*2
495 CALL zgemm(
'N',
'N', m, n, m, one, a, lda, r, ldr, zero, c, ldc )
496 CALL zgemm(
'N',
'N', m, n, n, -one, l, ldl, b, ldb, one, c, ldc )
497 CALL zgemm(
'N',
'N', m, n, m, one, d, ldd, r, ldr, zero, f, ldf )
498 CALL zgemm(
'N',
'N', m, n, n, -one, l, ldl, e, lde, one, f, ldf )
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