113 SUBROUTINE cspt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
128 COMPLEX A( * ), AFAC( * ), C( ldc, * )
135 parameter ( zero = 0.0e+0, one = 1.0e+0 )
137 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
138 $ cone = ( 1.0e+0, 0.0e+0 ) )
141 INTEGER I, INFO, J, JC
146 REAL CLANSP, CLANSY, SLAMCH
147 EXTERNAL lsame, clansp, clansy, slamch
166 eps = slamch(
'Epsilon' )
167 anorm = clansp(
'1', uplo, n, a, rwork )
171 CALL claset(
'Full', n, n, czero, cone, c, ldc )
175 CALL clavsp( uplo,
'Transpose',
'Non-unit', n, n, afac, ipiv, c,
180 CALL clavsp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
185 IF( lsame( uplo,
'U' ) )
THEN
189 c( i, j ) = c( i, j ) - a( jc+i )
197 c( i, j ) = c( i, j ) - a( jc+i-j )
205 resid = clansy(
'1', uplo, n, c, ldc, rwork )
207 IF( anorm.LE.zero )
THEN
211 resid = ( ( resid/
REAL( N ) )/anorm ) / eps
subroutine cspt01(UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID)
CSPT01
subroutine clavsp(UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB, INFO)
CLAVSP
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...