Télécharger dlacpy.eso

Retour à la liste

Numérotation des lignes :

dlacpy
  1. C DLACPY SOURCE BP208322 15/10/13 21:15:24 8670
  2. *> \brief \b DLACPY copies all or part of one two-dimensional array to another.
  3. *
  4. * =========== DOCUMENTATION ===========
  5. *
  6. * Online html documentation available at
  7. * http://www.netlib.org/lapack/explore-html/
  8. *
  9. *> \htmlonly
  10. *> Download DLACPY + dependencies
  11. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacpy.f">
  12. *> [TGZ]</a>
  13. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacpy.f">
  14. *> [ZIP]</a>
  15. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacpy.f">
  16. *> [TXT]</a>
  17. *> \endhtmlonly
  18. *
  19. * Definition:
  20. * ===========
  21. *
  22. * SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
  23. *
  24. * .. Scalar Arguments ..
  25. * CHARACTER UPLO
  26. * INTEGER LDA, LDB, M, N
  27. * ..
  28. * .. Array Arguments ..
  29. * REAL*8 A( LDA, * ), B( LDB, * )
  30. * ..
  31. *
  32. *
  33. *> \par Purpose:
  34. * =============
  35. *>
  36. *> \verbatim
  37. *>
  38. *> DLACPY copies all or part of a two-dimensional matrix A to another
  39. *> matrix B.
  40. *> \endverbatim
  41. *
  42. * Arguments:
  43. * ==========
  44. *
  45. *> \param[in] UPLO
  46. *> \verbatim
  47. *> UPLO is CHARACTER*1
  48. *> Specifies the part of the matrix A to be copied to B.
  49. *> = 'U': Upper triangular part
  50. *> = 'L': Lower triangular part
  51. *> Otherwise: All of the matrix A
  52. *> \endverbatim
  53. *>
  54. *> \param[in] M
  55. *> \verbatim
  56. *> M is INTEGER
  57. *> The number of rows of the matrix A. M >= 0.
  58. *> \endverbatim
  59. *>
  60. *> \param[in] N
  61. *> \verbatim
  62. *> N is INTEGER
  63. *> The number of columns of the matrix A. N >= 0.
  64. *> \endverbatim
  65. *>
  66. *> \param[in] A
  67. *> \verbatim
  68. *> A is DOUBLE PRECISION array, dimension (LDA,N)
  69. *> The m by n matrix A. If UPLO = 'U', only the upper triangle
  70. *> or trapezoid is accessed; if UPLO = 'L', only the lower
  71. *> triangle or trapezoid is accessed.
  72. *> \endverbatim
  73. *>
  74. *> \param[in] LDA
  75. *> \verbatim
  76. *> LDA is INTEGER
  77. *> The leading dimension of the array A. LDA >= max(1,M).
  78. *> \endverbatim
  79. *>
  80. *> \param[out] B
  81. *> \verbatim
  82. *> B is DOUBLE PRECISION array, dimension (LDB,N)
  83. *> On exit, B = A in the locations specified by UPLO.
  84. *> \endverbatim
  85. *>
  86. *> \param[in] LDB
  87. *> \verbatim
  88. *> LDB is INTEGER
  89. *> The leading dimension of the array B. LDB >= max(1,M).
  90. *> \endverbatim
  91. *
  92. * Authors:
  93. * ========
  94. *
  95. *> \author Univ. of Tennessee
  96. *> \author Univ. of California Berkeley
  97. *> \author Univ. of Colorado Denver
  98. *> \author NAG Ltd.
  99. *
  100. *> \date September 2012
  101. *
  102. *> \ingroup auxOTHERauxiliary
  103. *
  104. * =====================================================================
  105. SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
  106. *
  107. * -- LAPACK auxiliary routine (version 3.4.2) --
  108. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  109. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  110. * September 2012
  111. *
  112. * .. Scalar Arguments ..
  113. CHARACTER UPLO
  114. INTEGER LDA, LDB, M, N
  115. * ..
  116. * .. Array Arguments ..
  117. REAL*8 A( LDA, * ), B( LDB, * )
  118. * ..
  119. *
  120. * =====================================================================
  121. *
  122. * .. Local Scalars ..
  123. INTEGER I, J
  124. * ..
  125. * .. External Functions ..
  126. LOGICAL LSAME
  127. EXTERNAL LSAME
  128. * ..
  129. ** .. Intrinsic Functions ..
  130. * INTRINSIC MIN
  131. ** ..
  132. ** .. Executable Statements ..
  133. *
  134. IF( LSAME( UPLO, 'U' ) ) THEN
  135. DO 20 J = 1, N
  136. DO 10 I = 1, MIN( J, M )
  137. B( I, J ) = A( I, J )
  138. 10 CONTINUE
  139. 20 CONTINUE
  140. ELSE IF( LSAME( UPLO, 'L' ) ) THEN
  141. DO 40 J = 1, N
  142. DO 30 I = J, M
  143. B( I, J ) = A( I, J )
  144. 30 CONTINUE
  145. 40 CONTINUE
  146. ELSE
  147. DO 60 J = 1, N
  148. DO 50 I = 1, M
  149. B( I, J ) = A( I, J )
  150. 50 CONTINUE
  151. 60 CONTINUE
  152. END IF
  153. RETURN
  154. *
  155. * End of DLACPY
  156. *
  157. END
  158.  
  159.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales