265 SUBROUTINE slatm5( 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
279 REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
280 $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
281 $ l( ldl, * ), r( ldr, * )
287 REAL ONE, ZERO, TWENTY, HALF, TWO
288 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0, twenty = 2.0e+1,
289 $ half = 0.5e+0, two = 2.0e+0 )
296 INTRINSIC mod, real, sin
303 IF( prtype.EQ.1 )
THEN
309 ELSE IF( i.EQ.j-1 )
THEN
322 b( i, j ) = one - alpha
324 ELSE IF( i.EQ.j-1 )
THEN
336 r( i, j ) = ( half-sin( real( i / j ) ) )*twenty
337 l( i, j ) = r( i, j )
341 ELSE IF( prtype.EQ.2 .OR. prtype.EQ.3 )
THEN
345 a( i, j ) = ( half-sin( real( i ) ) )*two
346 d( i, j ) = ( half-sin( real( i*j ) ) )*two
357 b( i, j ) = ( half-sin( real( i+j ) ) )*two
358 e( i, j ) = ( half-sin( real( j ) ) )*two
368 r( i, j ) = ( half-sin( real( i*j ) ) )*twenty
369 l( i, j ) = ( half-sin( real( i+j ) ) )*twenty
373 IF( prtype.EQ.3 )
THEN
376 DO 130 k = 1, m - 1, qblcka
377 a( k+1, k+1 ) = a( k, k )
378 a( k+1, k ) = -sin( a( k, k+1 ) )
383 DO 140 k = 1, n - 1, qblckb
384 b( k+1, k+1 ) = b( k, k )
385 b( k+1, k ) = -sin( b( k, k+1 ) )
389 ELSE IF( prtype.EQ.4 )
THEN
392 a( i, j ) = ( half-sin( real( i*j ) ) )*twenty
393 d( i, j ) = ( half-sin( real( i+j ) ) )*two
399 b( i, j ) = ( half-sin( real( i+j ) ) )*twenty
400 e( i, j ) = ( half-sin( real( i*j ) ) )*two
406 r( i, j ) = ( half-sin( real( j / i ) ) )*twenty
407 l( i, j ) = ( half-sin( real( i*j ) ) )*two
411 ELSE IF( prtype.GE.5 )
THEN
412 reeps = half*two*twenty / alpha
413 imeps = ( half-two ) / alpha
416 r( i, j ) = ( half-sin( real( i*j ) ) )*alpha / twenty
417 l( i, j ) = ( half-sin( real( i+j ) ) )*alpha / twenty
429 $ a( i, i ) = one + reeps
430 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
432 ELSE IF( i.GT.1 )
THEN
435 ELSE IF( i.LE.8 )
THEN
441 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
443 ELSE IF( i.GT.1 )
THEN
448 IF( mod( i, 2 ).NE.0 .AND. i.LT.m )
THEN
449 a( i, i+1 ) = imeps*2
450 ELSE IF( i.GT.1 )
THEN
451 a( i, i-1 ) = -imeps*2
461 $ b( i, i ) = one - reeps
462 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
464 ELSE IF( i.GT.1 )
THEN
467 ELSE IF( i.LE.8 )
THEN
473 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
474 b( i, i+1 ) = one + imeps
475 ELSE IF( i.GT.1 )
THEN
476 b( i, i-1 ) = -one - imeps
479 b( i, i ) = one - reeps
480 IF( mod( i, 2 ).NE.0 .AND. i.LT.n )
THEN
481 b( i, i+1 ) = imeps*2
482 ELSE IF( i.GT.1 )
THEN
483 b( i, i-1 ) = -imeps*2
491 CALL sgemm(
'N',
'N', m, n, m, one, a, lda, r, ldr, zero, c, ldc )
492 CALL sgemm(
'N',
'N', m, n, n, -one, l, ldl, b, ldb, one, c, ldc )
493 CALL sgemm(
'N',
'N', m, n, m, one, d, ldd, r, ldr, zero, f, ldf )
494 CALL sgemm(
'N',
'N', m, n, n, -one, l, ldl, e, lde, one, f, ldf )
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