143 SUBROUTINE sggbak( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M,
153 INTEGER IHI, ILO, INFO, LDV, M, N
156 REAL LSCALE( * ), RSCALE( * ), V( LDV, * )
162 LOGICAL LEFTV, RIGHTV
179 rightv = lsame( side,
'R' )
180 leftv = lsame( side,
'L' )
183 IF( .NOT.lsame( job,
'N' ) .AND.
184 $ .NOT.lsame( job,
'P' ) .AND.
185 $ .NOT.lsame( job,
'S' ) .AND.
186 $ .NOT.lsame( job,
'B' ) )
THEN
188 ELSE IF( .NOT.rightv .AND. .NOT.leftv )
THEN
190 ELSE IF( n.LT.0 )
THEN
192 ELSE IF( ilo.LT.1 )
THEN
194 ELSE IF( n.EQ.0 .AND. ihi.EQ.0 .AND. ilo.NE.1 )
THEN
196 ELSE IF( n.GT.0 .AND. ( ihi.LT.ilo .OR. ihi.GT.max( 1, n ) ) )
199 ELSE IF( n.EQ.0 .AND. ilo.EQ.1 .AND. ihi.NE.0 )
THEN
201 ELSE IF( m.LT.0 )
THEN
203 ELSE IF( ldv.LT.max( 1, n ) )
THEN
207 CALL xerbla(
'SGGBAK', -info )
217 IF( lsame( job,
'N' ) )
225 IF( lsame( job,
'S' ) .OR. lsame( job,
'B' ) )
THEN
231 CALL sscal( m, rscale( i ), v( i, 1 ), ldv )
239 CALL sscal( m, lscale( i ), v( i, 1 ), ldv )
247 IF( lsame( job,
'P' ) .OR. lsame( job,
'B' ) )
THEN
255 DO 40 i = ilo - 1, 1, -1
256 k = int( rscale( i ) )
259 CALL sswap( m, v( i, 1 ), ldv, v( k, 1 ), ldv )
266 k = int( rscale( i ) )
269 CALL sswap( m, v( i, 1 ), ldv, v( k, 1 ), ldv )
279 DO 80 i = ilo - 1, 1, -1
280 k = int( lscale( i ) )
283 CALL sswap( m, v( i, 1 ), ldv, v( k, 1 ), ldv )
289 DO 100 i = ihi + 1, n
290 k = int( lscale( i ) )
293 CALL sswap( m, v( i, 1 ), ldv, v( k, 1 ), ldv )
subroutine sggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info)
SGGBAK