LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
sgbsvx.f
Go to the documentation of this file.
1*> \brief <b> SGBSVX computes the solution to system of linear equations A * X = B for GB matrices</b>
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download SGBSVX + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/sgbsvx.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/sgbsvx.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/sgbsvx.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE SGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
20* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
21* RCOND, FERR, BERR, WORK, IWORK, INFO )
22*
23* .. Scalar Arguments ..
24* CHARACTER EQUED, FACT, TRANS
25* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
26* REAL RCOND
27* ..
28* .. Array Arguments ..
29* INTEGER IPIV( * ), IWORK( * )
30* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
31* $ BERR( * ), C( * ), FERR( * ), R( * ),
32* $ WORK( * ), X( LDX, * )
33* ..
34*
35*
36*> \par Purpose:
37* =============
38*>
39*> \verbatim
40*>
41*> SGBSVX uses the LU factorization to compute the solution to a real
42*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
43*> where A is a band matrix of order N with KL subdiagonals and KU
44*> superdiagonals, and X and B are N-by-NRHS matrices.
45*>
46*> Error bounds on the solution and a condition estimate are also
47*> provided.
48*> \endverbatim
49*
50*> \par Description:
51* =================
52*>
53*> \verbatim
54*>
55*> The following steps are performed by this subroutine:
56*>
57*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
58*> the system:
59*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
60*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
61*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
62*> Whether or not the system will be equilibrated depends on the
63*> scaling of the matrix A, but if equilibration is used, A is
64*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
65*> or diag(C)*B (if TRANS = 'T' or 'C').
66*>
67*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
68*> matrix A (after equilibration if FACT = 'E') as
69*> A = L * U,
70*> where L is a product of permutation and unit lower triangular
71*> matrices with KL subdiagonals, and U is upper triangular with
72*> KL+KU superdiagonals.
73*>
74*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
75*> returns with INFO = i. Otherwise, the factored form of A is used
76*> to estimate the condition number of the matrix A. If the
77*> reciprocal of the condition number is less than machine precision,
78*> INFO = N+1 is returned as a warning, but the routine still goes on
79*> to solve for X and compute error bounds as described below.
80*>
81*> 4. The system of equations is solved for X using the factored form
82*> of A.
83*>
84*> 5. Iterative refinement is applied to improve the computed solution
85*> matrix and calculate error bounds and backward error estimates
86*> for it.
87*>
88*> 6. If equilibration was used, the matrix X is premultiplied by
89*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
90*> that it solves the original system before equilibration.
91*> \endverbatim
92*
93* Arguments:
94* ==========
95*
96*> \param[in] FACT
97*> \verbatim
98*> FACT is CHARACTER*1
99*> Specifies whether or not the factored form of the matrix A is
100*> supplied on entry, and if not, whether the matrix A should be
101*> equilibrated before it is factored.
102*> = 'F': On entry, AFB and IPIV contain the factored form of
103*> A. If EQUED is not 'N', the matrix A has been
104*> equilibrated with scaling factors given by R and C.
105*> AB, AFB, and IPIV are not modified.
106*> = 'N': The matrix A will be copied to AFB and factored.
107*> = 'E': The matrix A will be equilibrated if necessary, then
108*> copied to AFB and factored.
109*> \endverbatim
110*>
111*> \param[in] TRANS
112*> \verbatim
113*> TRANS is CHARACTER*1
114*> Specifies the form of the system of equations.
115*> = 'N': A * X = B (No transpose)
116*> = 'T': A**T * X = B (Transpose)
117*> = 'C': A**H * X = B (Transpose)
118*> \endverbatim
119*>
120*> \param[in] N
121*> \verbatim
122*> N is INTEGER
123*> The number of linear equations, i.e., the order of the
124*> matrix A. N >= 0.
125*> \endverbatim
126*>
127*> \param[in] KL
128*> \verbatim
129*> KL is INTEGER
130*> The number of subdiagonals within the band of A. KL >= 0.
131*> \endverbatim
132*>
133*> \param[in] KU
134*> \verbatim
135*> KU is INTEGER
136*> The number of superdiagonals within the band of A. KU >= 0.
137*> \endverbatim
138*>
139*> \param[in] NRHS
140*> \verbatim
141*> NRHS is INTEGER
142*> The number of right hand sides, i.e., the number of columns
143*> of the matrices B and X. NRHS >= 0.
144*> \endverbatim
145*>
146*> \param[in,out] AB
147*> \verbatim
148*> AB is REAL array, dimension (LDAB,N)
149*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
150*> The j-th column of A is stored in the j-th column of the
151*> array AB as follows:
152*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
153*>
154*> If FACT = 'F' and EQUED is not 'N', then A must have been
155*> equilibrated by the scaling factors in R and/or C. AB is not
156*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
157*> EQUED = 'N' on exit.
158*>
159*> On exit, if EQUED .ne. 'N', A is scaled as follows:
160*> EQUED = 'R': A := diag(R) * A
161*> EQUED = 'C': A := A * diag(C)
162*> EQUED = 'B': A := diag(R) * A * diag(C).
163*> \endverbatim
164*>
165*> \param[in] LDAB
166*> \verbatim
167*> LDAB is INTEGER
168*> The leading dimension of the array AB. LDAB >= KL+KU+1.
169*> \endverbatim
170*>
171*> \param[in,out] AFB
172*> \verbatim
173*> AFB is REAL array, dimension (LDAFB,N)
174*> If FACT = 'F', then AFB is an input argument and on entry
175*> contains details of the LU factorization of the band matrix
176*> A, as computed by SGBTRF. U is stored as an upper triangular
177*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
178*> and the multipliers used during the factorization are stored
179*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
180*> the factored form of the equilibrated matrix A.
181*>
182*> If FACT = 'N', then AFB is an output argument and on exit
183*> returns details of the LU factorization of A.
184*>
185*> If FACT = 'E', then AFB is an output argument and on exit
186*> returns details of the LU factorization of the equilibrated
187*> matrix A (see the description of AB for the form of the
188*> equilibrated matrix).
189*> \endverbatim
190*>
191*> \param[in] LDAFB
192*> \verbatim
193*> LDAFB is INTEGER
194*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
195*> \endverbatim
196*>
197*> \param[in,out] IPIV
198*> \verbatim
199*> IPIV is INTEGER array, dimension (N)
200*> If FACT = 'F', then IPIV is an input argument and on entry
201*> contains the pivot indices from the factorization A = L*U
202*> as computed by SGBTRF; row i of the matrix was interchanged
203*> with row IPIV(i).
204*>
205*> If FACT = 'N', then IPIV is an output argument and on exit
206*> contains the pivot indices from the factorization A = L*U
207*> of the original matrix A.
208*>
209*> If FACT = 'E', then IPIV is an output argument and on exit
210*> contains the pivot indices from the factorization A = L*U
211*> of the equilibrated matrix A.
212*> \endverbatim
213*>
214*> \param[in,out] EQUED
215*> \verbatim
216*> EQUED is CHARACTER*1
217*> Specifies the form of equilibration that was done.
218*> = 'N': No equilibration (always true if FACT = 'N').
219*> = 'R': Row equilibration, i.e., A has been premultiplied by
220*> diag(R).
221*> = 'C': Column equilibration, i.e., A has been postmultiplied
222*> by diag(C).
223*> = 'B': Both row and column equilibration, i.e., A has been
224*> replaced by diag(R) * A * diag(C).
225*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
226*> output argument.
227*> \endverbatim
228*>
229*> \param[in,out] R
230*> \verbatim
231*> R is REAL array, dimension (N)
232*> The row scale factors for A. If EQUED = 'R' or 'B', A is
233*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
234*> is not accessed. R is an input argument if FACT = 'F';
235*> otherwise, R is an output argument. If FACT = 'F' and
236*> EQUED = 'R' or 'B', each element of R must be positive.
237*> \endverbatim
238*>
239*> \param[in,out] C
240*> \verbatim
241*> C is REAL array, dimension (N)
242*> The column scale factors for A. If EQUED = 'C' or 'B', A is
243*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
244*> is not accessed. C is an input argument if FACT = 'F';
245*> otherwise, C is an output argument. If FACT = 'F' and
246*> EQUED = 'C' or 'B', each element of C must be positive.
247*> \endverbatim
248*>
249*> \param[in,out] B
250*> \verbatim
251*> B is REAL array, dimension (LDB,NRHS)
252*> On entry, the right hand side matrix B.
253*> On exit,
254*> if EQUED = 'N', B is not modified;
255*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
256*> diag(R)*B;
257*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
258*> overwritten by diag(C)*B.
259*> \endverbatim
260*>
261*> \param[in] LDB
262*> \verbatim
263*> LDB is INTEGER
264*> The leading dimension of the array B. LDB >= max(1,N).
265*> \endverbatim
266*>
267*> \param[out] X
268*> \verbatim
269*> X is REAL array, dimension (LDX,NRHS)
270*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
271*> to the original system of equations. Note that A and B are
272*> modified on exit if EQUED .ne. 'N', and the solution to the
273*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
274*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
275*> and EQUED = 'R' or 'B'.
276*> \endverbatim
277*>
278*> \param[in] LDX
279*> \verbatim
280*> LDX is INTEGER
281*> The leading dimension of the array X. LDX >= max(1,N).
282*> \endverbatim
283*>
284*> \param[out] RCOND
285*> \verbatim
286*> RCOND is REAL
287*> The estimate of the reciprocal condition number of the matrix
288*> A after equilibration (if done). If RCOND is less than the
289*> machine precision (in particular, if RCOND = 0), the matrix
290*> is singular to working precision. This condition is
291*> indicated by a return code of INFO > 0.
292*> \endverbatim
293*>
294*> \param[out] FERR
295*> \verbatim
296*> FERR is REAL array, dimension (NRHS)
297*> The estimated forward error bound for each solution vector
298*> X(j) (the j-th column of the solution matrix X).
299*> If XTRUE is the true solution corresponding to X(j), FERR(j)
300*> is an estimated upper bound for the magnitude of the largest
301*> element in (X(j) - XTRUE) divided by the magnitude of the
302*> largest element in X(j). The estimate is as reliable as
303*> the estimate for RCOND, and is almost always a slight
304*> overestimate of the true error.
305*> \endverbatim
306*>
307*> \param[out] BERR
308*> \verbatim
309*> BERR is REAL array, dimension (NRHS)
310*> The componentwise relative backward error of each solution
311*> vector X(j) (i.e., the smallest relative change in
312*> any element of A or B that makes X(j) an exact solution).
313*> \endverbatim
314*>
315*> \param[out] WORK
316*> \verbatim
317*> WORK is REAL array, dimension (MAX(1,3*N))
318*> On exit, WORK(1) contains the reciprocal pivot growth
319*> factor norm(A)/norm(U). The "max absolute element" norm is
320*> used. If WORK(1) is much less than 1, then the stability
321*> of the LU factorization of the (equilibrated) matrix A
322*> could be poor. This also means that the solution X, condition
323*> estimator RCOND, and forward error bound FERR could be
324*> unreliable. If factorization fails with 0<INFO<=N, then
325*> WORK(1) contains the reciprocal pivot growth factor for the
326*> leading INFO columns of A.
327*> \endverbatim
328*>
329*> \param[out] IWORK
330*> \verbatim
331*> IWORK is INTEGER array, dimension (N)
332*> \endverbatim
333*>
334*> \param[out] INFO
335*> \verbatim
336*> INFO is INTEGER
337*> = 0: successful exit
338*> < 0: if INFO = -i, the i-th argument had an illegal value
339*> > 0: if INFO = i, and i is
340*> <= N: U(i,i) is exactly zero. The factorization
341*> has been completed, but the factor U is exactly
342*> singular, so the solution and error bounds
343*> could not be computed. RCOND = 0 is returned.
344*> = N+1: U is nonsingular, but RCOND is less than machine
345*> precision, meaning that the matrix is singular
346*> to working precision. Nevertheless, the
347*> solution and error bounds are computed because
348*> there are a number of situations where the
349*> computed solution can be more accurate than the
350*> \endverbatim
351*
352* Authors:
353* ========
354*
355*> \author Univ. of Tennessee
356*> \author Univ. of California Berkeley
357*> \author Univ. of Colorado Denver
358*> \author NAG Ltd.
359*
360*> \ingroup gbsvx
361*
362* =====================================================================
363 SUBROUTINE sgbsvx( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
364 $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
365 $ RCOND, FERR, BERR, WORK, IWORK, INFO )
366*
367* -- LAPACK driver routine --
368* -- LAPACK is a software package provided by Univ. of Tennessee, --
369* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
370*
371* .. Scalar Arguments ..
372 CHARACTER EQUED, FACT, TRANS
373 INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
374 REAL RCOND
375* ..
376* .. Array Arguments ..
377 INTEGER IPIV( * ), IWORK( * )
378 REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
379 $ berr( * ), c( * ), ferr( * ), r( * ),
380 $ work( * ), x( ldx, * )
381* ..
382*
383* =====================================================================
384* Moved setting of INFO = N+1 so INFO does not subsequently get
385* overwritten. Sven, 17 Mar 05.
386* =====================================================================
387*
388* .. Parameters ..
389 REAL ZERO, ONE
390 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
391* ..
392* .. Local Scalars ..
393 LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
394 CHARACTER NORM
395 INTEGER I, INFEQU, J, J1, J2
396 REAL AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
397 $ rowcnd, rpvgrw, smlnum
398* ..
399* .. External Functions ..
400 LOGICAL LSAME
401 REAL SLAMCH, SLANGB, SLANTB
402 EXTERNAL lsame, slamch, slangb, slantb
403* ..
404* .. External Subroutines ..
405 EXTERNAL scopy, sgbcon, sgbequ, sgbrfs, sgbtrf,
406 $ sgbtrs,
408* ..
409* .. Intrinsic Functions ..
410 INTRINSIC abs, max, min
411* ..
412* .. Executable Statements ..
413*
414 info = 0
415 nofact = lsame( fact, 'N' )
416 equil = lsame( fact, 'E' )
417 notran = lsame( trans, 'N' )
418 IF( nofact .OR. equil ) THEN
419 equed = 'N'
420 rowequ = .false.
421 colequ = .false.
422 ELSE
423 rowequ = lsame( equed, 'R' ) .OR. lsame( equed, 'B' )
424 colequ = lsame( equed, 'C' ) .OR. lsame( equed, 'B' )
425 smlnum = slamch( 'Safe minimum' )
426 bignum = one / smlnum
427 END IF
428*
429* Test the input parameters.
430*
431 IF( .NOT.nofact .AND.
432 $ .NOT.equil .AND.
433 $ .NOT.lsame( fact, 'F' ) )
434 $ THEN
435 info = -1
436 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans, 'T' ) .AND. .NOT.
437 $ lsame( trans, 'C' ) ) THEN
438 info = -2
439 ELSE IF( n.LT.0 ) THEN
440 info = -3
441 ELSE IF( kl.LT.0 ) THEN
442 info = -4
443 ELSE IF( ku.LT.0 ) THEN
444 info = -5
445 ELSE IF( nrhs.LT.0 ) THEN
446 info = -6
447 ELSE IF( ldab.LT.kl+ku+1 ) THEN
448 info = -8
449 ELSE IF( ldafb.LT.2*kl+ku+1 ) THEN
450 info = -10
451 ELSE IF( lsame( fact, 'F' ) .AND. .NOT.
452 $ ( rowequ .OR. colequ .OR. lsame( equed, 'N' ) ) ) THEN
453 info = -12
454 ELSE
455 IF( rowequ ) THEN
456 rcmin = bignum
457 rcmax = zero
458 DO 10 j = 1, n
459 rcmin = min( rcmin, r( j ) )
460 rcmax = max( rcmax, r( j ) )
461 10 CONTINUE
462 IF( rcmin.LE.zero ) THEN
463 info = -13
464 ELSE IF( n.GT.0 ) THEN
465 rowcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
466 ELSE
467 rowcnd = one
468 END IF
469 END IF
470 IF( colequ .AND. info.EQ.0 ) THEN
471 rcmin = bignum
472 rcmax = zero
473 DO 20 j = 1, n
474 rcmin = min( rcmin, c( j ) )
475 rcmax = max( rcmax, c( j ) )
476 20 CONTINUE
477 IF( rcmin.LE.zero ) THEN
478 info = -14
479 ELSE IF( n.GT.0 ) THEN
480 colcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
481 ELSE
482 colcnd = one
483 END IF
484 END IF
485 IF( info.EQ.0 ) THEN
486 IF( ldb.LT.max( 1, n ) ) THEN
487 info = -16
488 ELSE IF( ldx.LT.max( 1, n ) ) THEN
489 info = -18
490 END IF
491 END IF
492 END IF
493*
494 IF( info.NE.0 ) THEN
495 CALL xerbla( 'SGBSVX', -info )
496 RETURN
497 END IF
498*
499 IF( equil ) THEN
500*
501* Compute row and column scalings to equilibrate the matrix A.
502*
503 CALL sgbequ( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
504 $ amax, infequ )
505 IF( infequ.EQ.0 ) THEN
506*
507* Equilibrate the matrix.
508*
509 CALL slaqgb( n, n, kl, ku, ab, ldab, r, c, rowcnd,
510 $ colcnd,
511 $ amax, equed )
512 rowequ = lsame( equed, 'R' ) .OR. lsame( equed, 'B' )
513 colequ = lsame( equed, 'C' ) .OR. lsame( equed, 'B' )
514 END IF
515 END IF
516*
517* Scale the right hand side.
518*
519 IF( notran ) THEN
520 IF( rowequ ) THEN
521 DO 40 j = 1, nrhs
522 DO 30 i = 1, n
523 b( i, j ) = r( i )*b( i, j )
524 30 CONTINUE
525 40 CONTINUE
526 END IF
527 ELSE IF( colequ ) THEN
528 DO 60 j = 1, nrhs
529 DO 50 i = 1, n
530 b( i, j ) = c( i )*b( i, j )
531 50 CONTINUE
532 60 CONTINUE
533 END IF
534*
535 IF( nofact .OR. equil ) THEN
536*
537* Compute the LU factorization of the band matrix A.
538*
539 DO 70 j = 1, n
540 j1 = max( j-ku, 1 )
541 j2 = min( j+kl, n )
542 CALL scopy( j2-j1+1, ab( ku+1-j+j1, j ), 1,
543 $ afb( kl+ku+1-j+j1, j ), 1 )
544 70 CONTINUE
545*
546 CALL sgbtrf( n, n, kl, ku, afb, ldafb, ipiv, info )
547*
548* Return if INFO is non-zero.
549*
550 IF( info.GT.0 ) THEN
551*
552* Compute the reciprocal pivot growth factor of the
553* leading rank-deficient INFO columns of A.
554*
555 anorm = zero
556 DO 90 j = 1, info
557 DO 80 i = max( ku+2-j, 1 ), min( n+ku+1-j, kl+ku+1 )
558 anorm = max( anorm, abs( ab( i, j ) ) )
559 80 CONTINUE
560 90 CONTINUE
561 rpvgrw = slantb( 'M', 'U', 'N', info, min( info-1,
562 $ kl+ku ),
563 $ afb( max( 1, kl+ku+2-info ), 1 ), ldafb,
564 $ work )
565 IF( rpvgrw.EQ.zero ) THEN
566 rpvgrw = one
567 ELSE
568 rpvgrw = anorm / rpvgrw
569 END IF
570 work( 1 ) = rpvgrw
571 rcond = zero
572 RETURN
573 END IF
574 END IF
575*
576* Compute the norm of the matrix A and the
577* reciprocal pivot growth factor RPVGRW.
578*
579 IF( notran ) THEN
580 norm = '1'
581 ELSE
582 norm = 'I'
583 END IF
584 anorm = slangb( norm, n, kl, ku, ab, ldab, work )
585 rpvgrw = slantb( 'M', 'U', 'N', n, kl+ku, afb, ldafb, work )
586 IF( rpvgrw.EQ.zero ) THEN
587 rpvgrw = one
588 ELSE
589 rpvgrw = slangb( 'M', n, kl, ku, ab, ldab, work ) / rpvgrw
590 END IF
591*
592* Compute the reciprocal of the condition number of A.
593*
594 CALL sgbcon( norm, n, kl, ku, afb, ldafb, ipiv, anorm, rcond,
595 $ work, iwork, info )
596*
597* Compute the solution matrix X.
598*
599 CALL slacpy( 'Full', n, nrhs, b, ldb, x, ldx )
600 CALL sgbtrs( trans, n, kl, ku, nrhs, afb, ldafb, ipiv, x, ldx,
601 $ info )
602*
603* Use iterative refinement to improve the computed solution and
604* compute error bounds and backward error estimates for it.
605*
606 CALL sgbrfs( trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb,
607 $ ipiv,
608 $ b, ldb, x, ldx, ferr, berr, work, iwork, info )
609*
610* Transform the solution matrix X to a solution of the original
611* system.
612*
613 IF( notran ) THEN
614 IF( colequ ) THEN
615 DO 110 j = 1, nrhs
616 DO 100 i = 1, n
617 x( i, j ) = c( i )*x( i, j )
618 100 CONTINUE
619 110 CONTINUE
620 DO 120 j = 1, nrhs
621 ferr( j ) = ferr( j ) / colcnd
622 120 CONTINUE
623 END IF
624 ELSE IF( rowequ ) THEN
625 DO 140 j = 1, nrhs
626 DO 130 i = 1, n
627 x( i, j ) = r( i )*x( i, j )
628 130 CONTINUE
629 140 CONTINUE
630 DO 150 j = 1, nrhs
631 ferr( j ) = ferr( j ) / rowcnd
632 150 CONTINUE
633 END IF
634*
635* Set INFO = N+1 if the matrix is singular to working precision.
636*
637 IF( rcond.LT.slamch( 'Epsilon' ) )
638 $ info = n + 1
639*
640 work( 1 ) = rpvgrw
641 RETURN
642*
643* End of SGBSVX
644*
645 END
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
Definition scopy.f:82
subroutine sgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, iwork, info)
SGBCON
Definition sgbcon.f:144
subroutine sgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
SGBEQU
Definition sgbequ.f:152
subroutine sgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
SGBRFS
Definition sgbrfs.f:204
subroutine sgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
SGBSVX computes the solution to system of linear equations A * X = B for GB matrices
Definition sgbsvx.f:366
subroutine sgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
SGBTRF
Definition sgbtrf.f:142
subroutine sgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
SGBTRS
Definition sgbtrs.f:137
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
Definition slacpy.f:101
subroutine slaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
SLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ.
Definition slaqgb.f:158