File: dsgesv

package info (click to toggle)
ruby-lapack 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 28,552 kB
  • sloc: ansic: 191,612; ruby: 3,934; makefile: 8
file content (170 lines) | stat: -rwxr-xr-x 6,154 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
--- 
:name: dsgesv
:md5sum: 37507bbdfd1407291f8640470f411a6e
:category: :subroutine
:arguments: 
- n: 
    :type: integer
    :intent: input
- nrhs: 
    :type: integer
    :intent: input
- a: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - lda
    - n
- lda: 
    :type: integer
    :intent: input
- ipiv: 
    :type: integer
    :intent: output
    :dims: 
    - n
- b: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldb
    - nrhs
- ldb: 
    :type: integer
    :intent: input
- x: 
    :type: doublereal
    :intent: output
    :dims: 
    - ldx
    - nrhs
- ldx: 
    :type: integer
    :intent: input
- work: 
    :type: doublereal
    :intent: workspace
    :dims: 
    - n
    - nrhs
- swork: 
    :type: real
    :intent: workspace
    :dims: 
    - n*(n+nrhs)
- iter: 
    :type: integer
    :intent: output
- info: 
    :type: integer
    :intent: output
:substitutions: 
  ldx: MAX(1,n)
:fortran_help: "      SUBROUTINE DSGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK, SWORK, ITER, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DSGESV computes the solution to a real system of linear equations\n\
  *     A * X = B,\n\
  *  where A is an N-by-N matrix and X and B are N-by-NRHS matrices.\n\
  *\n\
  *  DSGESV first attempts to factorize the matrix in SINGLE PRECISION\n\
  *  and use this factorization within an iterative refinement procedure\n\
  *  to produce a solution with DOUBLE PRECISION normwise backward error\n\
  *  quality (see below). If the approach fails the method switches to a\n\
  *  DOUBLE PRECISION factorization and solve.\n\
  *\n\
  *  The iterative refinement is not going to be a winning strategy if\n\
  *  the ratio SINGLE PRECISION performance over DOUBLE PRECISION\n\
  *  performance is too small. A reasonable strategy should take the\n\
  *  number of right-hand sides and the size of the matrix into account.\n\
  *  This might be done with a call to ILAENV in the future. Up to now, we\n\
  *  always try iterative refinement.\n\
  *\n\
  *  The iterative refinement process is stopped if\n\
  *      ITER > ITERMAX\n\
  *  or for all the RHS we have:\n\
  *      RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX\n\
  *  where\n\
  *      o ITER is the number of the current iteration in the iterative\n\
  *        refinement process\n\
  *      o RNRM is the infinity-norm of the residual\n\
  *      o XNRM is the infinity-norm of the solution\n\
  *      o ANRM is the infinity-operator-norm of the matrix A\n\
  *      o EPS is the machine epsilon returned by DLAMCH('Epsilon')\n\
  *  The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00\n\
  *  respectively.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The number of linear equations, i.e., the order of the\n\
  *          matrix A.  N >= 0.\n\
  *\n\
  *  NRHS    (input) INTEGER\n\
  *          The number of right hand sides, i.e., the number of columns\n\
  *          of the matrix B.  NRHS >= 0.\n\
  *\n\
  *  A       (input/output) DOUBLE PRECISION array,\n\
  *          dimension (LDA,N)\n\
  *          On entry, the N-by-N coefficient matrix A.\n\
  *          On exit, if iterative refinement has been successfully used\n\
  *          (INFO.EQ.0 and ITER.GE.0, see description below), then A is\n\
  *          unchanged, if double precision factorization has been used\n\
  *          (INFO.EQ.0 and ITER.LT.0, see description below), then the\n\
  *          array A contains the factors L and U from the factorization\n\
  *          A = P*L*U; the unit diagonal elements of L are not stored.\n\
  *\n\
  *  LDA     (input) INTEGER\n\
  *          The leading dimension of the array A.  LDA >= max(1,N).\n\
  *\n\
  *  IPIV    (output) INTEGER array, dimension (N)\n\
  *          The pivot indices that define the permutation matrix P;\n\
  *          row i of the matrix was interchanged with row IPIV(i).\n\
  *          Corresponds either to the single precision factorization\n\
  *          (if INFO.EQ.0 and ITER.GE.0) or the double precision\n\
  *          factorization (if INFO.EQ.0 and ITER.LT.0).\n\
  *\n\
  *  B       (input) DOUBLE PRECISION array, dimension (LDB,NRHS)\n\
  *          The N-by-NRHS right hand side matrix B.\n\
  *\n\
  *  LDB     (input) INTEGER\n\
  *          The leading dimension of the array B.  LDB >= max(1,N).\n\
  *\n\
  *  X       (output) DOUBLE PRECISION array, dimension (LDX,NRHS)\n\
  *          If INFO = 0, the N-by-NRHS solution matrix X.\n\
  *\n\
  *  LDX     (input) INTEGER\n\
  *          The leading dimension of the array X.  LDX >= max(1,N).\n\
  *\n\
  *  WORK    (workspace) DOUBLE PRECISION array, dimension (N,NRHS)\n\
  *          This array is used to hold the residual vectors.\n\
  *\n\
  *  SWORK   (workspace) REAL array, dimension (N*(N+NRHS))\n\
  *          This array is used to use the single precision matrix and the\n\
  *          right-hand sides or solutions in single precision.\n\
  *\n\
  *  ITER    (output) INTEGER\n\
  *          < 0: iterative refinement has failed, double precision\n\
  *               factorization has been performed\n\
  *               -1 : the routine fell back to full precision for\n\
  *                    implementation- or machine-specific reasons\n\
  *               -2 : narrowing the precision induced an overflow,\n\
  *                    the routine fell back to full precision\n\
  *               -3 : failure of SGETRF\n\
  *               -31: stop the iterative refinement after the 30th\n\
  *                    iterations\n\
  *          > 0: iterative refinement has been successfully used.\n\
  *               Returns the number of iterations\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          = 0:  successful exit\n\
  *          < 0:  if INFO = -i, the i-th argument had an illegal value\n\
  *          > 0:  if INFO = i, U(i,i) computed in DOUBLE PRECISION is\n\
  *                exactly zero.  The factorization has been completed,\n\
  *                but the factor U is exactly singular, so the solution\n\
  *                could not be computed.\n\
  *\n\
  *  =========\n\
  *\n"