122 SUBROUTINE cgetrs( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
131 INTEGER info, lda, ldb, n, nrhs
135 COMPLEX a( lda, * ), b( ldb, * )
142 parameter( one = ( 1.0e+0, 0.0e+0 ) )
162 notran =
lsame( trans,
'N' )
163 IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) .AND. .NOT.
164 $
lsame( trans,
'C' ) )
THEN
166 ELSE IF( n.LT.0 )
THEN
168 ELSE IF( nrhs.LT.0 )
THEN
170 ELSE IF( lda.LT.max( 1, n ) )
THEN
172 ELSE IF( ldb.LT.max( 1, n ) )
THEN
176 CALL
xerbla(
'CGETRS', -info )
182 IF( n.EQ.0 .OR. nrhs.EQ.0 )
191 CALL
claswp( nrhs, b, ldb, 1, n, ipiv, 1 )
195 CALL
ctrsm(
'Left',
'Lower',
'No transpose',
'Unit', n, nrhs,
196 $ one, a, lda, b, ldb )
200 CALL
ctrsm(
'Left',
'Upper',
'No transpose',
'Non-unit', n,
201 $ nrhs, one, a, lda, b, ldb )
208 CALL
ctrsm(
'Left',
'Upper', trans,
'Non-unit', n, nrhs, one,
213 CALL
ctrsm(
'Left',
'Lower', trans,
'Unit', n, nrhs, one, a,
218 CALL
claswp( nrhs, b, ldb, 1, n, ipiv, -1 )