2451 parameter ( zero = ( 0.0d0, 0.0d0 ) )
2452 DOUBLE PRECISION rzero, rone
2453 parameter ( rzero = 0.0d0, rone = 1.0d0 )
2455 COMPLEX*16 alpha, beta
2456 DOUBLE PRECISION eps, err
2457 INTEGER kk, lda, ldb, ldc, ldcc, m, n, nout
2459 CHARACTER*1 transa, transb
2461 COMPLEX*16 a( lda, * ), b( ldb, * ), c( ldc, * ),
2462 $ cc( ldcc, * ), ct( * )
2463 DOUBLE PRECISION g( * )
2466 DOUBLE PRECISION erri
2468 LOGICAL ctrana, ctranb, trana, tranb
2470 INTRINSIC abs, dimag, dconjg, max, dble, sqrt
2472 DOUBLE PRECISION abs1
2474 abs1( cl ) = abs( dble( cl ) ) + abs( dimag( cl ) )
2476 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
2477 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
2478 ctrana = transa.EQ.
'C'
2479 ctranb = transb.EQ.
'C'
2491 IF( .NOT.trana.AND..NOT.tranb )
THEN
2494 ct( i ) = ct( i ) + a( i, k )*b( k, j )
2495 g( i ) = g( i ) + abs1( a( i, k ) )*abs1( b( k, j ) )
2498 ELSE IF( trana.AND..NOT.tranb )
THEN
2502 ct( i ) = ct( i ) + dconjg( a( k, i ) )*b( k, j )
2503 g( i ) = g( i ) + abs1( a( k, i ) )*
2510 ct( i ) = ct( i ) + a( k, i )*b( k, j )
2511 g( i ) = g( i ) + abs1( a( k, i ) )*
2516 ELSE IF( .NOT.trana.AND.tranb )
THEN
2520 ct( i ) = ct( i ) + a( i, k )*dconjg( b( j, k ) )
2521 g( i ) = g( i ) + abs1( a( i, k ) )*
2528 ct( i ) = ct( i ) + a( i, k )*b( j, k )
2529 g( i ) = g( i ) + abs1( a( i, k ) )*
2534 ELSE IF( trana.AND.tranb )
THEN
2539 ct( i ) = ct( i ) + dconjg( a( k, i ) )*
2540 $ dconjg( b( j, k ) )
2541 g( i ) = g( i ) + abs1( a( k, i ) )*
2548 ct( i ) = ct( i ) + dconjg( a( k, i ) )*
2550 g( i ) = g( i ) + abs1( a( k, i ) )*
2559 ct( i ) = ct( i ) + a( k, i )*
2560 $ dconjg( b( j, k ) )
2561 g( i ) = g( i ) + abs1( a( k, i ) )*
2568 ct( i ) = ct( i ) + a( k, i )*b( j, k )
2569 g( i ) = g( i ) + abs1( a( k, i ) )*
2577 ct( i ) = alpha*ct( i ) + beta*c( i, j )
2578 g( i ) = abs1( alpha )*g( i ) +
2579 $ abs1( beta )*abs1( c( i, j ) )
2586 erri = abs1( ct( i ) - cc( i, j ) )/eps
2587 IF( g( i ).NE.rzero )
2588 $ erri = erri/g( i )
2589 err = max( err, erri )
2590 IF( err*sqrt( eps ).GE.rone )
2602 WRITE( nout, fmt = 9999 )
2605 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
2607 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
2611 $
WRITE( nout, fmt = 9997 )j
2616 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2617 $
'F ACCURATE *******', /
' EXPECTED RE',
2618 $
'SULT COMPUTED RESULT' )
2619 9998
FORMAT( 1x, i7, 2(
' (', g15.6,
',', g15.6,
')' ) )
2620 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )