LAPACK 3.3.1
Linear Algebra PACKage
|
00001 SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO) 00002 * 00003 * -- LAPACK auxiliary routine (version 3.0) -- 00004 * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., 00005 * September 19, 2006 00006 * 00007 IMPLICIT NONE 00008 * .. Scalar Arguments .. 00009 INTEGER SRNAME_LEN, INFO 00010 * .. 00011 * .. Array Arguments .. 00012 CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN) 00013 * .. 00014 * 00015 * Purpose 00016 * ======= 00017 * 00018 * XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK 00019 * and BLAS error handler. Rather than taking a Fortran string argument 00020 * as the function's name, XERBLA_ARRAY takes an array of single 00021 * characters along with the array's length. XERBLA_ARRAY then copies 00022 * up to 32 characters of that array into a Fortran string and passes 00023 * that to XERBLA. If called with a non-positive SRNAME_LEN, 00024 * XERBLA_ARRAY will call XERBLA with a string of all blank characters. 00025 * 00026 * Say some macro or other device makes XERBLA_ARRAY available to C99 00027 * by a name lapack_xerbla and with a common Fortran calling convention. 00028 * Then a C99 program could invoke XERBLA via: 00029 * { 00030 * int flen = strlen(__func__); 00031 * lapack_xerbla(__func__, &flen, &info); 00032 * } 00033 * 00034 * Providing XERBLA_ARRAY is not necessary for intercepting LAPACK 00035 * errors. XERBLA_ARRAY calls XERBLA. 00036 * 00037 * Arguments 00038 * ========= 00039 * 00040 * SRNAME_ARRAY (input) CHARACTER(1) array, dimension (SRNAME_LEN) 00041 * The name of the routine which called XERBLA_ARRAY. 00042 * 00043 * SRNAME_LEN (input) INTEGER 00044 * The length of the name in SRNAME_ARRAY. 00045 * 00046 * INFO (input) INTEGER 00047 * The position of the invalid parameter in the parameter list 00048 * of the calling routine. 00049 * 00050 * ===================================================================== 00051 * 00052 * .. 00053 * .. Local Scalars .. 00054 INTEGER I 00055 * .. 00056 * .. Local Arrays .. 00057 CHARACTER*32 SRNAME 00058 * .. 00059 * .. Intrinsic Functions .. 00060 INTRINSIC MIN, LEN 00061 * .. 00062 * .. External Functions .. 00063 EXTERNAL XERBLA 00064 * .. 00065 * .. Executable Statements .. 00066 SRNAME = '' 00067 DO I = 1, MIN( SRNAME_LEN, LEN( SRNAME ) ) 00068 SRNAME( I:I ) = SRNAME_ARRAY( I ) 00069 END DO 00070 00071 CALL XERBLA( SRNAME, INFO ) 00072 00073 RETURN 00074 END