LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine clatb5 ( character*3  PATH,
integer  IMAT,
integer  N,
character  TYPE,
integer  KL,
integer  KU,
real  ANORM,
integer  MODE,
real  CNDNUM,
character  DIST 
)

CLATB5

Purpose:
 CLATB5 sets parameters for the matrix generator based on the type
 of matrix to be generated.
Parameters
[in]PATH
          PATH is CHARACTER*3
          The LAPACK path name.
[in]IMAT
          IMAT is INTEGER
          An integer key describing which matrix to generate for this
          path.
[in]N
          N is INTEGER
          The number of rows and columns in the matrix to be generated.
[out]TYPE
          TYPE is CHARACTER*1
          The type of the matrix to be generated:
          = 'S':  symmetric matrix
          = 'P':  symmetric positive (semi)definite matrix
          = 'N':  nonsymmetric matrix
[out]KL
          KL is INTEGER
          The lower band width of the matrix to be generated.
[out]KU
          KU is INTEGER
          The upper band width of the matrix to be generated.
[out]ANORM
          ANORM is REAL
          The desired norm of the matrix to be generated.  The diagonal
          matrix of singular values or eigenvalues is scaled by this
          value.
[out]MODE
          MODE is INTEGER
          A key indicating how to choose the vector of eigenvalues.
[out]CNDNUM
          CNDNUM is REAL
          The desired condition number.
[out]DIST
          DIST is CHARACTER*1
          The type of distribution to be used by the random number
          generator.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 116 of file clatb5.f.

116 *
117 * -- LAPACK test routine (version 3.4.0) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
120 * November 2011
121 *
122 * .. Scalar Arguments ..
123  REAL anorm, cndnum
124  INTEGER imat, kl, ku, mode, n
125  CHARACTER dist, type
126  CHARACTER*3 path
127 * ..
128 *
129 * =====================================================================
130 *
131 * .. Parameters ..
132  REAL shrink, tenth
133  parameter ( shrink = 0.25e0, tenth = 0.1e+0 )
134  REAL one
135  parameter ( one = 1.0e+0 )
136  REAL two
137  parameter ( two = 2.0e+0 )
138 * ..
139 * .. Local Scalars ..
140  REAL badc1, badc2, eps, large, small
141  LOGICAL first
142  CHARACTER*2 c2
143 * ..
144 * .. External Functions ..
145  REAL slamch
146  EXTERNAL slamch
147 * ..
148 * .. Intrinsic Functions ..
149  INTRINSIC max, sqrt
150 * ..
151 * .. External Subroutines ..
152  EXTERNAL slabad
153 * ..
154 * .. Save statement ..
155  SAVE eps, small, large, badc1, badc2, first
156 * ..
157 * .. Data statements ..
158  DATA first / .true. /
159 * ..
160 * .. Executable Statements ..
161 *
162 * Set some constants for use in the subroutine.
163 *
164  IF( first ) THEN
165  first = .false.
166  eps = slamch( 'Precision' )
167  badc2 = tenth / eps
168  badc1 = sqrt( badc2 )
169  small = slamch( 'Safe minimum' )
170  large = one / small
171 *
172 * If it looks like we're on a Cray, take the square root of
173 * SMALL and LARGE to avoid overflow and underflow problems.
174 *
175  CALL slabad( small, large )
176  small = shrink*( small / eps )
177  large = one / small
178  END IF
179 *
180  c2 = path( 2: 3 )
181 *
182 * Set some parameters
183 *
184  dist = 'S'
185  mode = 3
186 *
187 * Set TYPE, the type of matrix to be generated.
188 *
189  TYPE = c2( 1: 1 )
190 *
191 * Set the lower and upper bandwidths.
192 *
193  IF( imat.EQ.1 ) THEN
194  kl = 0
195  ELSE
196  kl = max( n-1, 0 )
197  END IF
198  ku = kl
199 *
200 * Set the condition number and norm.etc
201 *
202  IF( imat.EQ.3 ) THEN
203  cndnum = 1.0e4
204  mode = 2
205  ELSE IF( imat.EQ.4 ) THEN
206  cndnum = 1.0e4
207  mode = 1
208  ELSE IF( imat.EQ.5 ) THEN
209  cndnum = 1.0e4
210  mode = 3
211  ELSE IF( imat.EQ.6 ) THEN
212  cndnum = badc1
213  ELSE IF( imat.EQ.7 ) THEN
214  cndnum = badc2
215  ELSE
216  cndnum = two
217  END IF
218 *
219  IF( imat.EQ.8 ) THEN
220  anorm = small
221  ELSE IF( imat.EQ.9 ) THEN
222  anorm = large
223  ELSE
224  anorm = one
225  END IF
226 *
227  IF( n.LE.1 )
228  $ cndnum = one
229 *
230  RETURN
231 *
232 * End of SLATB5
233 *
subroutine slabad(SMALL, LARGE)
SLABAD
Definition: slabad.f:76
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69

Here is the call graph for this function:

Here is the caller graph for this function: