LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine slatb9 ( character*3  PATH,
integer  IMAT,
integer  M,
integer  P,
integer  N,
character  TYPE,
integer  KLA,
integer  KUA,
integer  KLB,
integer  KUB,
real  ANORM,
real  BNORM,
integer  MODEA,
integer  MODEB,
real  CNDNMA,
real  CNDNMB,
character  DISTA,
character  DISTB 
)

SLATB9

Purpose:
 SLATB9 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.
          = 1:   A: diagonal, B: upper triangular
          = 2:   A: upper triangular, B: upper triangular
          = 3:   A: lower triangular, B: upper triangular
          Else:  A: general dense, B: general dense
[in]M
          M is INTEGER
          The number of rows in the matrix to be generated.
[in]P
          P is INTEGER
[in]N
          N is INTEGER
          The number of 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]KLA
          KLA is INTEGER
          The lower band width of the matrix to be generated.
[out]KUA
          KUA is INTEGER
          The upper band width of the matrix to be generated.
[out]KLB
          KLB is INTEGER
          The lower band width of the matrix to be generated.
[out]KUB
          KUA 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]BNORM
          BNORM 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]MODEA
          MODEA is INTEGER
          A key indicating how to choose the vector of eigenvalues.
[out]MODEB
          MODEB is INTEGER
          A key indicating how to choose the vector of eigenvalues.
[out]CNDNMA
          CNDNMA is REAL
          The desired condition number.
[out]CNDNMB
          CNDNMB is REAL
          The desired condition number.
[out]DISTA
          DISTA is CHARACTER*1
          The type of distribution to be used by the random number
          generator.
[out]DISTB
          DISTB 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 172 of file slatb9.f.

172 *
173 * -- LAPACK test routine (version 3.4.0) --
174 * -- LAPACK is a software package provided by Univ. of Tennessee, --
175 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
176 * November 2011
177 *
178 * .. Scalar Arguments ..
179  CHARACTER dista, distb, type
180  CHARACTER*3 path
181  INTEGER imat, kla, kua, klb, kub, m, p, modea, modeb, n
182  REAL anorm, bnorm, cndnma, cndnmb
183 * ..
184 *
185 * =====================================================================
186 *
187 * .. Parameters ..
188  REAL shrink, tenth
189  parameter ( shrink = 0.25e0, tenth = 0.1e+0 )
190  REAL one, ten
191  parameter ( one = 1.0e+0, ten = 1.0e+1 )
192 * ..
193 * .. Local Scalars ..
194  LOGICAL first
195  REAL badc1, badc2, eps, large, small
196 * ..
197 * .. External Functions ..
198  LOGICAL lsamen
199  REAL slamch
200  EXTERNAL lsamen, slamch
201 * ..
202 * .. Intrinsic Functions ..
203  INTRINSIC max, sqrt
204 * ..
205 * .. External Subroutines ..
206  EXTERNAL slabad
207 * ..
208 * .. Save statement ..
209  SAVE eps, small, large, badc1, badc2, first
210 * ..
211 * .. Data statements ..
212  DATA first / .true. /
213 * ..
214 * .. Executable Statements ..
215 *
216 * Set some constants for use in the subroutine.
217 *
218  IF( first ) THEN
219  first = .false.
220  eps = slamch( 'Precision' )
221  badc2 = tenth / eps
222  badc1 = sqrt( badc2 )
223  small = slamch( 'Safe minimum' )
224  large = one / small
225 *
226 * If it looks like we're on a Cray, take the square root of
227 * SMALL and LARGE to avoid overflow and underflow problems.
228 *
229  CALL slabad( small, large )
230  small = shrink*( small / eps )
231  large = one / small
232  END IF
233 *
234 * Set some parameters we don't plan to change.
235 *
236  TYPE = 'N'
237  dista = 'S'
238  distb = 'S'
239  modea = 3
240  modeb = 4
241 *
242 * Set the lower and upper bandwidths.
243 *
244  IF( lsamen( 3, path, 'GRQ') .OR. lsamen( 3, path, 'LSE') .OR.
245  $ lsamen( 3, path, 'GSV') )THEN
246 *
247 * A: M by N, B: P by N
248 *
249  IF( imat.EQ.1 ) THEN
250 *
251 * A: diagonal, B: upper triangular
252 *
253  kla = 0
254  kua = 0
255  klb = 0
256  kub = max( n-1,0 )
257 *
258  ELSE IF( imat.EQ.2 ) THEN
259 *
260 * A: upper triangular, B: upper triangular
261 *
262  kla = 0
263  kua = max( n-1, 0 )
264  klb = 0
265  kub = max( n-1, 0 )
266 *
267  ELSE IF( imat.EQ.3 ) THEN
268 *
269 * A: lower triangular, B: upper triangular
270 *
271  kla = max( m-1, 0 )
272  kua = 0
273  klb = 0
274  kub = max( n-1, 0 )
275 *
276  ELSE
277 *
278 * A: general dense, B: general dense
279 *
280  kla = max( m-1, 0 )
281  kua = max( n-1, 0 )
282  klb = max( p-1, 0 )
283  kub = max( n-1, 0 )
284 *
285  END IF
286 *
287  ELSE IF( lsamen( 3, path, 'GQR' ) .OR.
288  $ lsamen( 3, path, 'GLM') )THEN
289 *
290 * A: N by M, B: N by P
291 *
292  IF( imat.EQ.1 ) THEN
293 *
294 * A: diagonal, B: lower triangular
295 *
296  kla = 0
297  kua = 0
298  klb = max( n-1,0 )
299  kub = 0
300  ELSE IF( imat.EQ.2 ) THEN
301 *
302 * A: lower triangular, B: diagonal
303 *
304  kla = max( n-1, 0 )
305  kua = 0
306  klb = 0
307  kub = 0
308 *
309  ELSE IF( imat.EQ.3 ) THEN
310 *
311 * A: lower triangular, B: upper triangular
312 *
313  kla = max( n-1, 0 )
314  kua = 0
315  klb = 0
316  kub = max( p-1, 0 )
317 *
318  ELSE
319 *
320 * A: general dense, B: general dense
321 *
322  kla = max( n-1, 0 )
323  kua = max( m-1, 0 )
324  klb = max( n-1, 0 )
325  kub = max( p-1, 0 )
326  END IF
327 *
328  END IF
329 *
330 * Set the condition number and norm.
331 *
332  cndnma = ten*ten
333  cndnmb = ten
334  IF( lsamen( 3, path, 'GQR') .OR. lsamen( 3, path, 'GRQ') .OR.
335  $ lsamen( 3, path, 'GSV') )THEN
336  IF( imat.EQ.5 ) THEN
337  cndnma = badc1
338  cndnmb = badc1
339  ELSE IF( imat.EQ.6 ) THEN
340  cndnma = badc2
341  cndnmb = badc2
342  ELSE IF( imat.EQ.7 ) THEN
343  cndnma = badc1
344  cndnmb = badc2
345  ELSE IF( imat.EQ.8 ) THEN
346  cndnma = badc2
347  cndnmb = badc1
348  END IF
349  END IF
350 *
351  anorm = ten
352  bnorm = ten*ten*ten
353  IF( lsamen( 3, path, 'GQR') .OR. lsamen( 3, path, 'GRQ') )THEN
354  IF( imat.EQ.7 ) THEN
355  anorm = small
356  bnorm = large
357  ELSE IF( imat.EQ.8 ) THEN
358  anorm = large
359  bnorm = small
360  END IF
361  END IF
362 *
363  IF( n.LE.1 )THEN
364  cndnma = one
365  cndnmb = one
366  END IF
367 *
368  RETURN
369 *
370 * End of SLATB9
371 *
logical function lsamen(N, CA, CB)
LSAMEN
Definition: lsamen.f:76
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: