265 SUBROUTINE dlatm5( 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 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ),
281 $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
282 $ L( LDL, * ), R( LDR, * )
288 DOUBLE PRECISION ONE, ZERO, TWENTY, HALF, TWO
289 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0, twenty = 2.0d+1,
290 $ half = 0.5d+0, two = 2.0d+0 )
294 DOUBLE PRECISION IMEPS, REEPS
297 INTRINSIC dble, mod, sin
304 IF( prtype.EQ.1 )
THEN
310 ELSE IF( i.EQ.j-1 )
THEN
323 b( i, j ) = one - alpha
325 ELSE IF( i.EQ.j-1 )
THEN
337 r( i, j ) = ( half-sin( dble( i / j ) ) )*twenty
338 l( i, j ) = r( i, j )
342 ELSE IF( prtype.EQ.2 .OR. prtype.EQ.3 )
THEN
346 a( i, j ) = ( half-sin( dble( i ) ) )*two
347 d( i, j ) = ( half-sin( dble( i*j ) ) )*two
358 b( i, j ) = ( half-sin( dble( i+j ) ) )*two
359 e( i, j ) = ( half-sin( dble( j ) ) )*two
369 r( i, j ) = ( half-sin( dble( i*j ) ) )*twenty
370 l( i, j ) = ( half-sin( dble( i+j ) ) )*twenty
374 IF( prtype.EQ.3 )
THEN
377 DO 130 k = 1, m - 1, qblcka
378 a( k+1, k+1 ) = a( k, k )
379 a( k+1, k ) = -sin( a( k, k+1 ) )
384 DO 140 k = 1, n - 1, qblckb
385 b( k+1, k+1 ) = b( k, k )
386 b( k+1, k ) = -sin( b( k, k+1 ) )
390 ELSE IF( prtype.EQ.4 )
THEN
393 a( i, j ) = ( half-sin( dble( i*j ) ) )*twenty
394 d( i, j ) = ( half-sin( dble( i+j ) ) )*two
400 b( i, j ) = ( half-sin( dble( i+j ) ) )*twenty
401 e( i, j ) = ( half-sin( dble( i*j ) ) )*two
407 r( i, j ) = ( half-sin( dble( j / i ) ) )*twenty
408 l( i, j ) = ( half-sin( dble( i*j ) ) )*two
412 ELSE IF( prtype.GE.5 )
THEN
413 reeps = half*two*twenty / alpha
414 imeps = ( half-two ) / alpha
417 r( i, j ) = ( half-sin( dble( i*j ) ) )*alpha / twenty
418 l( i, j ) = ( half-sin( dble( i+j ) ) )*alpha / twenty
430 $ a( i, i ) = one + reeps
431 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
433 ELSE IF( i.GT.1 )
THEN
436 ELSE IF( i.LE.8 )
THEN
442 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
444 ELSE IF( i.GT.1 )
THEN
449 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
450 a( i, i+1 ) = imeps*2
451 ELSE IF( i.GT.1 )
THEN
452 a( i, i-1 ) = -imeps*2
462 $ b( i, i ) = one - reeps
463 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
465 ELSE IF( i.GT.1 )
THEN
468 ELSE IF( i.LE.8 )
THEN
474 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
475 b( i, i+1 ) = one + imeps
476 ELSE IF( i.GT.1 )
THEN
477 b( i, i-1 ) = -one - imeps
480 b( i, i ) = one - reeps
481 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
482 b( i, i+1 ) = imeps*2
483 ELSE IF( i.GT.1 )
THEN
484 b( i, i-1 ) = -imeps*2
492 CALL dgemm(
'N',
'N', m, n, m, one, a, lda, r, ldr, zero, c, ldc )
493 CALL dgemm(
'N',
'N', m, n, n, -one, l, ldl, b, ldb, one, c, ldc )
494 CALL dgemm(
'N',
'N', m, n, m, one, d, ldd, r, ldr, zero, f, ldf )
495 CALL dgemm(
'N',
'N', m, n, n, -one, l, ldl, e, lde, one, f, ldf )
subroutine dlatm5(prtype, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, r, ldr, l, ldl, alpha, qblcka, qblckb)
DLATM5