122 SUBROUTINE csyt01_aa( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C,
123 $ LDC, RWORK, RESID )
131 INTEGER LDA, LDAFAC, LDC, N
136 COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
144 parameter( zero = 0.0e+0, one = 1.0e+0 )
146 parameter( czero = ( 0.0e+0, 0.0e+0 ),
147 $ cone = ( 1.0e+0, 0.0e+0 ) )
156 EXTERNAL lsame, slamch, clansy
175 eps = slamch(
'Epsilon' )
176 anorm = clansy(
'1', uplo, n, a, lda, rwork )
180 CALL claset(
'Full', n, n, czero, czero, c, ldc )
181 CALL clacpy(
'F', 1, n, afac( 1, 1 ), ldafac+1, c( 1, 1 ), ldc+1 )
183 IF( lsame( uplo,
'U' ) )
THEN
184 CALL clacpy(
'F', 1, n-1, afac( 1, 2 ), ldafac+1, c( 1, 2 ),
186 CALL clacpy(
'F', 1, n-1, afac( 1, 2 ), ldafac+1, c( 2, 1 ),
189 CALL clacpy(
'F', 1, n-1, afac( 2, 1 ), ldafac+1, c( 1, 2 ),
191 CALL clacpy(
'F', 1, n-1, afac( 2, 1 ), ldafac+1, c( 2, 1 ),
197 IF( lsame( uplo,
'U' ) )
THEN
198 CALL ctrmm(
'Left', uplo,
'Transpose',
'Unit', n-1, n,
199 $ cone, afac( 1, 2 ), ldafac, c( 2, 1 ), ldc )
201 CALL ctrmm(
'Left', uplo,
'No transpose',
'Unit', n-1, n,
202 $ cone, afac( 2, 1 ), ldafac, c( 2, 1 ), ldc )
207 IF( lsame( uplo,
'U' ) )
THEN
208 CALL ctrmm(
'Right', uplo,
'No transpose',
'Unit', n, n-1,
209 $ cone, afac( 1, 2 ), ldafac, c( 1, 2 ), ldc )
211 CALL ctrmm(
'Right', uplo,
'Transpose',
'Unit', n, n-1,
212 $ cone, afac( 2, 1 ), ldafac, c( 1, 2 ), ldc )
221 $
CALL cswap( n, c( j, 1 ), ldc, c( i, 1 ), ldc )
226 $
CALL cswap( n, c( 1, j ), 1, c( 1, i ), 1 )
232 IF( lsame( uplo,
'U' ) )
THEN
235 c( i, j ) = c( i, j ) - a( i, j )
241 c( i, j ) = c( i, j ) - a( i, j )
248 resid = clansy(
'1', uplo, n, c, ldc, rwork )
250 IF( anorm.LE.zero )
THEN
254 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine clavsy(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
CLAVSY
subroutine csyt01_aa(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
CSYT01
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
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.
subroutine cswap(n, cx, incx, cy, incy)
CSWAP
subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRMM