1 SUBROUTINE ztrsm ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA,
4 CHARACTER*1 SIDE, UPLO, TRANSA, DIAG
8 COMPLEX*16 A( LDA, * ), B( LDB, * )
135 INTRINSIC dconjg, max
137 LOGICAL LSIDE, NOCONJ, NOUNIT, UPPER
138 INTEGER I, INFO, J, K, NROWA
142 parameter( one = ( 1.0d+0, 0.0d+0 ) )
144 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
150 lside = lsame( side ,
'L' )
156 noconj = lsame( transa,
'T' )
157 nounit = lsame( diag ,
'N' )
158 upper = lsame( uplo ,
'U' )
161 IF( ( .NOT.lside ).AND.
162 $ ( .NOT.lsame( side ,
'R' ) ) )
THEN
164 ELSE IF( ( .NOT.upper ).AND.
165 $ ( .NOT.lsame( uplo ,
'L' ) ) )
THEN
167 ELSE IF( ( .NOT.lsame( transa,
'N' ) ).AND.
168 $ ( .NOT.lsame( transa,
'T' ) ).AND.
169 $ ( .NOT.lsame( transa,
'C' ) ) )
THEN
171 ELSE IF( ( .NOT.lsame( diag ,
'U' ) ).AND.
172 $ ( .NOT.lsame( diag ,
'N' ) ) )
THEN
174 ELSE IF( m .LT.0 )
THEN
176 ELSE IF( n .LT.0 )
THEN
178 ELSE IF( lda.LT.max( 1, nrowa ) )
THEN
180 ELSE IF( ldb.LT.max( 1, m ) )
THEN
184 CALL xerbla(
'ZTRSM ', info )
195 IF( alpha.EQ.zero )
THEN
207 IF( lsame( transa,
'N' ) )
THEN
213 IF( alpha.NE.one )
THEN
215 b( i, j ) = alpha*b( i, j )
219 IF( b( k, j ).NE.zero )
THEN
221 $ b( k, j ) = b( k, j )/a( k, k )
223 b( i, j ) = b( i, j ) - b( k, j )*a( i, k )
230 IF( alpha.NE.one )
THEN
232 b( i, j ) = alpha*b( i, j )
236 IF( b( k, j ).NE.zero )
THEN
238 $ b( k, j ) = b( k, j )/a( k, k )
240 b( i, j ) = b( i, j ) - b( k, j )*a( i, k )
254 temp = alpha*b( i, j )
257 temp = temp - a( k, i )*b( k, j )
260 $ temp = temp/a( i, i )
263 temp = temp - dconjg( a( k, i ) )*b( k, j )
266 $ temp = temp/dconjg( a( i, i ) )
274 temp = alpha*b( i, j )
277 temp = temp - a( k, i )*b( k, j )
280 $ temp = temp/a( i, i )
283 temp = temp - dconjg( a( k, i ) )*b( k, j )
286 $ temp = temp/dconjg( a( i, i ) )
294 IF( lsame( transa,
'N' ) )
THEN
300 IF( alpha.NE.one )
THEN
302 b( i, j ) = alpha*b( i, j )
306 IF( a( k, j ).NE.zero )
THEN
308 b( i, j ) = b( i, j ) - a( k, j )*b( i, k )
315 b( i, j ) = temp*b( i, j )
321 IF( alpha.NE.one )
THEN
323 b( i, j ) = alpha*b( i, j )
327 IF( a( k, j ).NE.zero )
THEN
329 b( i, j ) = b( i, j ) - a( k, j )*b( i, k )
336 b( i, j ) = temp*b( i, j )
352 temp = one/dconjg( a( k, k ) )
355 b( i, k ) = temp*b( i, k )
359 IF( a( j, k ).NE.zero )
THEN
363 temp = dconjg( a( j, k ) )
366 b( i, j ) = b( i, j ) - temp*b( i, k )
370 IF( alpha.NE.one )
THEN
372 b( i, k ) = alpha*b( i, k )
382 temp = one/dconjg( a( k, k ) )
385 b( i, k ) = temp*b( i, k )
389 IF( a( j, k ).NE.zero )
THEN
393 temp = dconjg( a( j, k ) )
396 b( i, j ) = b( i, j ) - temp*b( i, k )
400 IF( alpha.NE.one )
THEN
402 b( i, k ) = alpha*b( i, k )
subroutine xerbla(SRNAME, INFO)
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)