01:       INTEGER FUNCTION ILADIAG( DIAG )
02: *
03: *  -- LAPACK routine (version 3.2.1)                                    --
04: *
05: *  -- April 2009                                                      --
06: *
07: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
08: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
09: *
10: *     .. Scalar Arguments ..
11:       CHARACTER          DIAG
12: *     ..
13: *
14: *  Purpose
15: *  =======
16: *
17: *  This subroutine translated from a character string specifying if a
18: *  matrix has unit diagonal or not to the relevant BLAST-specified
19: *  integer constant.
20: *
21: *  ILADIAG returns an INTEGER.  If ILADIAG < 0, then the input is not a
22: *  character indicating a unit or non-unit diagonal.  Otherwise ILADIAG
23: *  returns the constant value corresponding to DIAG.
24: *
25: *  Arguments
26: *  =========
27: *  DIAG    (input) CHARACTER*1
28: *          = 'N':  A is non-unit triangular;
29: *          = 'U':  A is unit triangular.
30: *  =====================================================================
31: *
32: *     .. Parameters ..
33:       INTEGER BLAS_NON_UNIT_DIAG, BLAS_UNIT_DIAG
34:       PARAMETER ( BLAS_NON_UNIT_DIAG = 131, BLAS_UNIT_DIAG = 132 )
35: *     ..
36: *     .. External Functions ..
37:       LOGICAL            LSAME
38:       EXTERNAL           LSAME
39: *     ..
40: *     .. Executable Statements ..
41:       IF( LSAME( DIAG, 'N' ) ) THEN
42:          ILADIAG = BLAS_NON_UNIT_DIAG
43:       ELSE IF( LSAME( DIAG, 'U' ) ) THEN
44:          ILADIAG = BLAS_UNIT_DIAG
45:       ELSE
46:          ILADIAG = -1
47:       END IF
48:       RETURN
49: *
50: *     End of ILADIAG
51: *
52:       END
53: