126 SUBROUTINE csyt01_aa( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C,
127 $ ldc, rwork, resid )
136 INTEGER LDA, LDAFAC, LDC, N
141 COMPLEX A( lda, * ), AFAC( ldafac, * ), C( ldc, * )
149 parameter ( zero = 0.0d+0, one = 1.0d+0 )
151 parameter ( czero = 0.0e+0, cone = 1.0e+0 )
160 EXTERNAL lsame, slamch, clansy
179 eps = slamch(
'Epsilon' )
180 anorm = clansy(
'1', uplo, n, a, lda, rwork )
184 CALL claset(
'Full', n, n, czero, czero, c, ldc )
185 CALL clacpy(
'F', 1, n, afac( 1, 1 ), ldafac+1, c( 1, 1 ), ldc+1 )
187 IF( lsame( uplo,
'U' ) )
THEN
188 CALL clacpy(
'F', 1, n-1, afac( 1, 2 ), ldafac+1, c( 1, 2 ),
190 CALL clacpy(
'F', 1, n-1, afac( 1, 2 ), ldafac+1, c( 2, 1 ),
193 CALL clacpy(
'F', 1, n-1, afac( 2, 1 ), ldafac+1, c( 1, 2 ),
195 CALL clacpy(
'F', 1, n-1, afac( 2, 1 ), ldafac+1, c( 2, 1 ),
201 IF( lsame( uplo,
'U' ) )
THEN
202 CALL ctrmm(
'Left', uplo,
'Transpose',
'Unit', n-1, n,
203 $ cone, afac( 1, 2 ), ldafac, c( 2, 1 ), ldc )
205 CALL ctrmm(
'Left', uplo,
'No transpose',
'Unit', n-1, n,
206 $ cone, afac( 2, 1 ), ldafac, c( 2, 1 ), ldc )
211 IF( lsame( uplo,
'U' ) )
THEN
212 CALL ctrmm(
'Right', uplo,
'No transpose',
'Unit', n, n-1,
213 $ cone, afac( 1, 2 ), ldafac, c( 1, 2 ), ldc )
215 CALL ctrmm(
'Right', uplo,
'Transpose',
'Unit', n, n-1,
216 $ cone, afac( 2, 1 ), ldafac, c( 1, 2 ), ldc )
225 $
CALL cswap( n, c( j, 1 ), ldc, c( i, 1 ), ldc )
230 $
CALL cswap( n, c( 1, j ), 1, c( 1, i ), 1 )
236 IF( lsame( uplo,
'U' ) )
THEN
239 c( i, j ) = c( i, j ) - a( i, j )
245 c( i, j ) = c( i, j ) - a( i, j )
252 resid = clansy(
'1', uplo, n, c, ldc, rwork )
254 IF( anorm.LE.zero )
THEN
258 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine csyt01_aa(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
CSYT01
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 clavsy(UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
CLAVSY
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine ctrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRMM
subroutine cswap(N, CX, INCX, CY, INCY)
CSWAP