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.

claipd.f 3.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. *> \brief \b CLAIPD
  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 CLAIPD( N, A, INDA, VINDA )
  12. *
  13. * .. Scalar Arguments ..
  14. * INTEGER INDA, N, VINDA
  15. * ..
  16. * .. Array Arguments ..
  17. * COMPLEX A( * )
  18. * ..
  19. *
  20. *
  21. *> \par Purpose:
  22. * =============
  23. *>
  24. *> \verbatim
  25. *>
  26. *> CLAIPD sets the imaginary part of the diagonal elements of a complex
  27. *> matrix A to a large value. This is used to test LAPACK routines for
  28. *> complex Hermitian matrices, which are not supposed to access or use
  29. *> the imaginary parts of the diagonals.
  30. *> \endverbatim
  31. *
  32. * Arguments:
  33. * ==========
  34. *
  35. *> \param[in] N
  36. *> \verbatim
  37. *> N is INTEGER
  38. *> The number of diagonal elements of A.
  39. *> \endverbatim
  40. *>
  41. *> \param[in,out] A
  42. *> \verbatim
  43. *> A is COMPLEX array, dimension
  44. *> (1+(N-1)*INDA+(N-2)*VINDA)
  45. *> On entry, the complex (Hermitian) matrix A.
  46. *> On exit, the imaginary parts of the diagonal elements are set
  47. *> to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
  48. *> SAFMIN is the safe minimum.
  49. *> \endverbatim
  50. *>
  51. *> \param[in] INDA
  52. *> \verbatim
  53. *> INDA is INTEGER
  54. *> The increment between A(1) and the next diagonal element of A.
  55. *> Typical values are
  56. *> = LDA+1: square matrices with leading dimension LDA
  57. *> = 2: packed upper triangular matrix, starting at A(1,1)
  58. *> = N: packed lower triangular matrix, starting at A(1,1)
  59. *> \endverbatim
  60. *>
  61. *> \param[in] VINDA
  62. *> \verbatim
  63. *> VINDA is INTEGER
  64. *> The change in the diagonal increment between columns of A.
  65. *> Typical values are
  66. *> = 0: no change, the row and column increments in A are fixed
  67. *> = 1: packed upper triangular matrix
  68. *> = -1: packed lower triangular matrix
  69. *> \endverbatim
  70. *
  71. * Authors:
  72. * ========
  73. *
  74. *> \author Univ. of Tennessee
  75. *> \author Univ. of California Berkeley
  76. *> \author Univ. of Colorado Denver
  77. *> \author NAG Ltd.
  78. *
  79. *> \date December 2016
  80. *
  81. *> \ingroup complex_lin
  82. *
  83. * =====================================================================
  84. SUBROUTINE CLAIPD( N, A, INDA, VINDA )
  85. *
  86. * -- LAPACK test routine (version 3.7.0) --
  87. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  88. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  89. * December 2016
  90. *
  91. * .. Scalar Arguments ..
  92. INTEGER INDA, N, VINDA
  93. * ..
  94. * .. Array Arguments ..
  95. COMPLEX A( * )
  96. * ..
  97. *
  98. * =====================================================================
  99. *
  100. * .. Local Scalars ..
  101. INTEGER I, IA, IXA
  102. REAL BIGNUM
  103. * ..
  104. * .. External Functions ..
  105. REAL SLAMCH
  106. EXTERNAL SLAMCH
  107. * ..
  108. * .. Intrinsic Functions ..
  109. INTRINSIC CMPLX, REAL
  110. * ..
  111. * .. Executable Statements ..
  112. *
  113. BIGNUM = SLAMCH( 'Epsilon' ) / SLAMCH( 'Safe minimum' )
  114. IA = 1
  115. IXA = INDA
  116. DO 10 I = 1, N
  117. A( IA ) = CMPLX( REAL( A( IA ) ), BIGNUM )
  118. IA = IA + IXA
  119. IXA = IXA + VINDA
  120. 10 CONTINUE
  121. RETURN
  122. END