267 SUBROUTINE slatm5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
268 $ e,
lde, f, ldf, r, ldr, l, ldl, alpha, qblcka,
277 INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
278 $ prtype, qblcka, qblckb
282 REAL A( lda, * ), B( ldb, * ), C( ldc, * ),
283 $ d( ldd, * ), e( lde, * ), f( ldf, * ),
284 $ l( ldl, * ), r( ldr, * )
290 REAL ONE, ZERO, TWENTY, HALF, TWO
291 parameter ( one = 1.0e+0, zero = 0.0e+0, twenty = 2.0e+1,
292 $ half = 0.5e+0, two = 2.0e+0 )
299 INTRINSIC mod,
REAL, 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(
REAL( 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(
REAL( I ) ) )*two
349 d( i, j ) = ( half-sin(
REAL( I*J ) ) )*two
360 b( i, j ) = ( half-sin(
REAL( I+J ) ) )*two
361 e( i, j ) = ( half-sin(
REAL( J ) ) )*two
371 r( i, j ) = ( half-sin(
REAL( I*J ) ) )*twenty
372 l( i, j ) = ( half-sin(
REAL( 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(
REAL( I*J ) ) )*twenty
396 d( i, j ) = ( half-sin(
REAL( I+J ) ) )*two
402 b( i, j ) = ( half-sin(
REAL( I+J ) ) )*twenty
403 e( i, j ) = ( half-sin(
REAL( I*J ) ) )*two
409 r( i, j ) = ( half-sin(
REAL( J / I ) ) )*twenty
410 l( i, j ) = ( half-sin(
REAL( 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(
REAL( I*J ) ) )*alpha / twenty
420 l( i, j ) = ( half-sin(
REAL( 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 sgemm(
'N',
'N', m, n, m, one, a, lda, r, ldr, zero, c, ldc )
495 CALL sgemm(
'N',
'N', m, n, n, -one, l, ldl, b, ldb, one, c, ldc )
496 CALL sgemm(
'N',
'N', m, n, m, one, d, ldd, r, ldr, zero, f, ldf )
497 CALL sgemm(
'N',
'N', m, n, n, -one, l, ldl, e, lde, one, f, ldf )
logical function lde(RI, RJ, LR)
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
subroutine slatm5(PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD, E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA, QBLCKB)
SLATM5