LAPACK  3.10.0
LAPACK: Linear Algebra PACKage
xerbla_array.f
Go to the documentation of this file.
1 *> \brief \b XERBLA_ARRAY
2 *
3 * =========== DOCUMENTATION ===========
4 *
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
7 *
8 *> \htmlonly
9 *> Download XERBLA_ARRAY + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/xerbla_array.f">
11 *> [TGZ]</a>
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/xerbla_array.f">
13 *> [ZIP]</a>
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/xerbla_array.f">
15 *> [TXT]</a>
16 *> \endhtmlonly
17 *
18 * Definition:
19 * ===========
20 *
21 * SUBROUTINE XERBLA_ARRAY( SRNAME_ARRAY, SRNAME_LEN, INFO)
22 *
23 * .. Scalar Arguments ..
24 * INTEGER SRNAME_LEN, INFO
25 * ..
26 * .. Array Arguments ..
27 * CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
28 * ..
29 *
30 *
31 *> \par Purpose:
32 * =============
33 *>
34 *> \verbatim
35 *>
36 *> XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
37 *> and BLAS error handler. Rather than taking a Fortran string argument
38 *> as the function's name, XERBLA_ARRAY takes an array of single
39 *> characters along with the array's length. XERBLA_ARRAY then copies
40 *> up to 32 characters of that array into a Fortran string and passes
41 *> that to XERBLA. If called with a non-positive SRNAME_LEN,
42 *> XERBLA_ARRAY will call XERBLA with a string of all blank characters.
43 *>
44 *> Say some macro or other device makes XERBLA_ARRAY available to C99
45 *> by a name lapack_xerbla and with a common Fortran calling convention.
46 *> Then a C99 program could invoke XERBLA via:
47 *> {
48 *> int flen = strlen(__func__);
49 *> lapack_xerbla(__func__, &flen, &info);
50 *> }
51 *>
52 *> Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
53 *> errors. XERBLA_ARRAY calls XERBLA.
54 *> \endverbatim
55 *
56 * Arguments:
57 * ==========
58 *
59 *> \param[in] SRNAME_ARRAY
60 *> \verbatim
61 *> SRNAME_ARRAY is CHARACTER(1) array, dimension (SRNAME_LEN)
62 *> The name of the routine which called XERBLA_ARRAY.
63 *> \endverbatim
64 *>
65 *> \param[in] SRNAME_LEN
66 *> \verbatim
67 *> SRNAME_LEN is INTEGER
68 *> The length of the name in SRNAME_ARRAY.
69 *> \endverbatim
70 *>
71 *> \param[in] INFO
72 *> \verbatim
73 *> INFO is INTEGER
74 *> The position of the invalid parameter in the parameter list
75 *> of the calling routine.
76 *> \endverbatim
77 *
78 * Authors:
79 * ========
80 *
81 *> \author Univ. of Tennessee
82 *> \author Univ. of California Berkeley
83 *> \author Univ. of Colorado Denver
84 *> \author NAG Ltd.
85 *
86 *> \ingroup OTHERauxiliary
87 *
88 * =====================================================================
89  SUBROUTINE xerbla_array( SRNAME_ARRAY, SRNAME_LEN, INFO)
90 *
91 * -- LAPACK auxiliary routine --
92 * -- LAPACK is a software package provided by Univ. of Tennessee, --
93 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
94 *
95 * .. Scalar Arguments ..
96  INTEGER SRNAME_LEN, INFO
97 * ..
98 * .. Array Arguments ..
99  CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
100 * ..
101 *
102 * =====================================================================
103 *
104 * ..
105 * .. Local Scalars ..
106  INTEGER I
107 * ..
108 * .. Local Arrays ..
109  CHARACTER*32 SRNAME
110 * ..
111 * .. Intrinsic Functions ..
112  INTRINSIC min, len
113 * ..
114 * .. External Functions ..
115  EXTERNAL xerbla
116 * ..
117 * .. Executable Statements ..
118  srname = ''
119  DO i = 1, min( srname_len, len( srname ) )
120  srname( i:i ) = srname_array( i )
121  END DO
122 
123  CALL xerbla( srname, info )
124 
125  RETURN
126  END
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
subroutine xerbla_array(SRNAME_ARRAY, SRNAME_LEN, INFO)
XERBLA_ARRAY
Definition: xerbla_array.f:80