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