You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

xerbla_array.f 3.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. * Definition:
  9. * ===========
  10. *
  11. * SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO)
  12. *
  13. * .. Scalar Arguments ..
  14. * INTEGER SRNAME_LEN, INFO
  15. * ..
  16. * .. Array Arguments ..
  17. * CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
  18. * ..
  19. *
  20. *
  21. *> \par Purpose:
  22. * =============
  23. *>
  24. *> \verbatim
  25. *>
  26. *> XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
  27. *> and BLAS error handler. Rather than taking a Fortran string argument
  28. *> as the function's name, XERBLA_ARRAY takes an array of single
  29. *> characters along with the array's length. XERBLA_ARRAY then copies
  30. *> up to 32 characters of that array into a Fortran string and passes
  31. *> that to XERBLA. If called with a non-positive SRNAME_LEN,
  32. *> XERBLA_ARRAY will call XERBLA with a string of all blank characters.
  33. *>
  34. *> Say some macro or other device makes XERBLA_ARRAY available to C99
  35. *> by a name lapack_xerbla and with a common Fortran calling convention.
  36. *> Then a C99 program could invoke XERBLA via:
  37. *> {
  38. *> int flen = strlen(__func__);
  39. *> lapack_xerbla(__func__, &flen, &info);
  40. *> }
  41. *>
  42. *> Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
  43. *> errors. XERBLA_ARRAY calls XERBLA.
  44. *> \endverbatim
  45. *
  46. * Arguments:
  47. * ==========
  48. *
  49. *> \param[in] SRNAME_ARRAY
  50. *> \verbatim
  51. *> SRNAME_ARRAY is CHARACTER(1) array, dimension (SRNAME_LEN)
  52. *> The name of the routine which called XERBLA_ARRAY.
  53. *> \endverbatim
  54. *>
  55. *> \param[in] SRNAME_LEN
  56. *> \verbatim
  57. *> SRNAME_LEN is INTEGER
  58. *> The length of the name in SRNAME_ARRAY.
  59. *> \endverbatim
  60. *>
  61. *> \param[in] INFO
  62. *> \verbatim
  63. *> INFO is INTEGER
  64. *> The position of the invalid parameter in the parameter list
  65. *> of the calling routine.
  66. *> \endverbatim
  67. *
  68. * Authors:
  69. * ========
  70. *
  71. *> \author Univ. of Tennessee
  72. *> \author Univ. of California Berkeley
  73. *> \author Univ. of Colorado Denver
  74. *> \author NAG Ltd.
  75. *
  76. *> \date December 2016
  77. *
  78. *> \ingroup aux_blas
  79. *
  80. * =====================================================================
  81. SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO)
  82. *
  83. * -- Reference BLAS level1 routine (version 3.7.0) --
  84. * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
  85. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  86. * December 2016
  87. *
  88. * .. Scalar Arguments ..
  89. INTEGER SRNAME_LEN, INFO
  90. * ..
  91. * .. Array Arguments ..
  92. CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
  93. * ..
  94. *
  95. * =====================================================================
  96. *
  97. * ..
  98. * .. Local Scalars ..
  99. INTEGER I
  100. * ..
  101. * .. Local Arrays ..
  102. CHARACTER*32 SRNAME
  103. * ..
  104. * .. Intrinsic Functions ..
  105. INTRINSIC MIN, LEN
  106. * ..
  107. * .. External Functions ..
  108. EXTERNAL XERBLA
  109. * ..
  110. * .. Executable Statements ..
  111. SRNAME = ''
  112. DO I = 1, MIN( SRNAME_LEN, LEN( SRNAME ) )
  113. SRNAME( I:I ) = SRNAME_ARRAY( I )
  114. END DO
  115. CALL XERBLA( SRNAME, INFO )
  116. RETURN
  117. END