3069 parameter ( zero = ( 0.0, 0.0 ) )
3071 parameter ( rzero = 0.0, rone = 1.0 )
3075 INTEGER kk, lda, ldb, ldc, ldcc, m, n, nout
3077 CHARACTER*1 transa, transb
3079 COMPLEX a( lda, * ), b( ldb, * ), c( ldc, * ),
3080 $ cc( ldcc, * ), ct( * )
3086 LOGICAL ctrana, ctranb, trana, tranb
3088 INTRINSIC abs, aimag, conjg, max,
REAL, sqrt
3092 abs1( cl ) = abs(
REAL( CL ) ) + abs( aimag( cl ) )
3094 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
3095 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
3096 ctrana = transa.EQ.
'C'
3097 ctranb = transb.EQ.
'C'
3109 IF( .NOT.trana.AND..NOT.tranb )
THEN
3112 ct( i ) = ct( i ) + a( i, k )*b( k, j )
3113 g( i ) = g( i ) + abs1( a( i, k ) )*abs1( b( k, j ) )
3116 ELSE IF( trana.AND..NOT.tranb )
THEN
3120 ct( i ) = ct( i ) + conjg( a( k, i ) )*b( k, j )
3121 g( i ) = g( i ) + abs1( a( k, i ) )*
3128 ct( i ) = ct( i ) + a( k, i )*b( k, j )
3129 g( i ) = g( i ) + abs1( a( k, i ) )*
3134 ELSE IF( .NOT.trana.AND.tranb )
THEN
3138 ct( i ) = ct( i ) + a( i, k )*conjg( b( j, k ) )
3139 g( i ) = g( i ) + abs1( a( i, k ) )*
3146 ct( i ) = ct( i ) + a( i, k )*b( j, k )
3147 g( i ) = g( i ) + abs1( a( i, k ) )*
3152 ELSE IF( trana.AND.tranb )
THEN
3157 ct( i ) = ct( i ) + conjg( a( k, i ) )*
3158 $ conjg( b( j, k ) )
3159 g( i ) = g( i ) + abs1( a( k, i ) )*
3166 ct( i ) = ct( i ) + conjg( a( k, i ) )*b( j, k )
3167 g( i ) = g( i ) + abs1( a( k, i ) )*
3176 ct( i ) = ct( i ) + a( k, i )*conjg( b( j, k ) )
3177 g( i ) = g( i ) + abs1( a( k, i ) )*
3184 ct( i ) = ct( i ) + a( k, i )*b( j, k )
3185 g( i ) = g( i ) + abs1( a( k, i ) )*
3193 ct( i ) = alpha*ct( i ) + beta*c( i, j )
3194 g( i ) = abs1( alpha )*g( i ) +
3195 $ abs1( beta )*abs1( c( i, j ) )
3202 erri = abs1( ct( i ) - cc( i, j ) )/eps
3203 IF( g( i ).NE.rzero )
3204 $ erri = erri/g( i )
3205 err = max( err, erri )
3206 IF( err*sqrt( eps ).GE.rone )
3218 WRITE( nout, fmt = 9999 )
3221 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
3223 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
3227 $
WRITE( nout, fmt = 9997 )j
3232 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
3233 $
'F ACCURATE *******', /
' EXPECTED RE',
3234 $
'SULT COMPUTED RESULT' )
3235 9998
FORMAT( 1x, i7, 2(
' (', g15.6,
',', g15.6,
')' ) )
3236 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )