![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b XERBLA_ARRAY 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 * Definition: 00009 * =========== 00010 * 00011 * SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO) 00012 * 00013 * .. Scalar Arguments .. 00014 * INTEGER SRNAME_LEN, INFO 00015 * .. 00016 * .. Array Arguments .. 00017 * CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN) 00018 * .. 00019 * 00020 * 00021 *> \par Purpose: 00022 * ============= 00023 *> 00024 *> \verbatim 00025 *> 00026 *> XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK 00027 *> and BLAS error handler. Rather than taking a Fortran string argument 00028 *> as the function's name, XERBLA_ARRAY takes an array of single 00029 *> characters along with the array's length. XERBLA_ARRAY then copies 00030 *> up to 32 characters of that array into a Fortran string and passes 00031 *> that to XERBLA. If called with a non-positive SRNAME_LEN, 00032 *> XERBLA_ARRAY will call XERBLA with a string of all blank characters. 00033 *> 00034 *> Say some macro or other device makes XERBLA_ARRAY available to C99 00035 *> by a name lapack_xerbla and with a common Fortran calling convention. 00036 *> Then a C99 program could invoke XERBLA via: 00037 *> { 00038 *> int flen = strlen(__func__); 00039 *> lapack_xerbla(__func__, &flen, &info); 00040 *> } 00041 *> 00042 *> Providing XERBLA_ARRAY is not necessary for intercepting LAPACK 00043 *> errors. XERBLA_ARRAY calls XERBLA. 00044 *> \endverbatim 00045 * 00046 * Arguments: 00047 * ========== 00048 * 00049 *> \param[in] SRNAME_ARRAY 00050 *> \verbatim 00051 *> SRNAME_ARRAY is CHARACTER(1) array, dimension (SRNAME_LEN) 00052 *> The name of the routine which called XERBLA_ARRAY. 00053 *> \endverbatim 00054 *> 00055 *> \param[in] SRNAME_LEN 00056 *> \verbatim 00057 *> SRNAME_LEN is INTEGER 00058 *> The length of the name in SRNAME_ARRAY. 00059 *> \endverbatim 00060 *> 00061 *> \param[in] INFO 00062 *> \verbatim 00063 *> INFO is INTEGER 00064 *> The position of the invalid parameter in the parameter list 00065 *> of the calling routine. 00066 *> \endverbatim 00067 * 00068 * Authors: 00069 * ======== 00070 * 00071 *> \author Univ. of Tennessee 00072 *> \author Univ. of California Berkeley 00073 *> \author Univ. of Colorado Denver 00074 *> \author NAG Ltd. 00075 * 00076 *> \date November 2011 00077 * 00078 *> \ingroup aux_blas 00079 * 00080 * ===================================================================== 00081 SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO) 00082 * 00083 * -- Reference BLAS level1 routine (version 3.4.0) -- 00084 * -- Reference BLAS is a software package provided by Univ. of Tennessee, -- 00085 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00086 * November 2011 00087 * 00088 * .. Scalar Arguments .. 00089 INTEGER SRNAME_LEN, INFO 00090 * .. 00091 * .. Array Arguments .. 00092 CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN) 00093 * .. 00094 * 00095 * ===================================================================== 00096 * 00097 * .. 00098 * .. Local Scalars .. 00099 INTEGER I 00100 * .. 00101 * .. Local Arrays .. 00102 CHARACTER*32 SRNAME 00103 * .. 00104 * .. Intrinsic Functions .. 00105 INTRINSIC MIN, LEN 00106 * .. 00107 * .. External Functions .. 00108 EXTERNAL XERBLA 00109 * .. 00110 * .. Executable Statements .. 00111 SRNAME = '' 00112 DO I = 1, MIN( SRNAME_LEN, LEN( SRNAME ) ) 00113 SRNAME( I:I ) = SRNAME_ARRAY( I ) 00114 END DO 00115 00116 CALL XERBLA( SRNAME, INFO ) 00117 00118 RETURN 00119 END