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.

zpotrif.f 2.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. SUBROUTINE ZPOTRIF( UPLO, N, A, LDA, INFO )
  2. *
  3. * -- LAPACK routine (version 3.1) --
  4. * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
  5. * November 2006
  6. *
  7. * .. Scalar Arguments ..
  8. CHARACTER UPLO
  9. INTEGER INFO, LDA, N
  10. * ..
  11. * .. Array Arguments ..
  12. COMPLEX*16 A( LDA, * )
  13. * ..
  14. *
  15. * Purpose
  16. * =======
  17. *
  18. * ZPOTRI computes the inverse of a complex Hermitian positive definite
  19. * matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
  20. * computed by ZPOTRF.
  21. *
  22. * Arguments
  23. * =========
  24. *
  25. * UPLO (input) CHARACTER*1
  26. * = 'U': Upper triangle of A is stored;
  27. * = 'L': Lower triangle of A is stored.
  28. *
  29. * N (input) INTEGER
  30. * The order of the matrix A. N >= 0.
  31. *
  32. * A (input/output) COMPLEX*16 array, dimension (LDA,N)
  33. * On entry, the triangular factor U or L from the Cholesky
  34. * factorization A = U**H*U or A = L*L**H, as computed by
  35. * ZPOTRF.
  36. * On exit, the upper or lower triangle of the (Hermitian)
  37. * inverse of A, overwriting the input factor U or L.
  38. *
  39. * LDA (input) INTEGER
  40. * The leading dimension of the array A. LDA >= max(1,N).
  41. *
  42. * INFO (output) INTEGER
  43. * = 0: successful exit
  44. * < 0: if INFO = -i, the i-th argument had an illegal value
  45. * > 0: if INFO = i, the (i,i) element of the factor U or L is
  46. * zero, and the inverse could not be computed.
  47. *
  48. * =====================================================================
  49. *
  50. * .. External Functions ..
  51. LOGICAL LSAME
  52. EXTERNAL LSAME
  53. * ..
  54. * .. External Subroutines ..
  55. EXTERNAL XERBLA, ZLAUUM, ZTRTRI
  56. * ..
  57. * .. Intrinsic Functions ..
  58. INTRINSIC MAX
  59. * ..
  60. * .. Executable Statements ..
  61. *
  62. * Test the input parameters.
  63. *
  64. INFO = 0
  65. IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
  66. INFO = -1
  67. ELSE IF( N.LT.0 ) THEN
  68. INFO = -2
  69. ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
  70. INFO = -4
  71. END IF
  72. IF( INFO.NE.0 ) THEN
  73. CALL XERBLA( 'ZPOTRI', -INFO )
  74. RETURN
  75. END IF
  76. *
  77. * Quick return if possible
  78. *
  79. IF( N.EQ.0 )
  80. $ RETURN
  81. *
  82. * Invert the triangular Cholesky factor U or L.
  83. *
  84. CALL ZTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO )
  85. IF( INFO.GT.0 )
  86. $ RETURN
  87. *
  88. * Form inv(U)*inv(U)' or inv(L)'*inv(L).
  89. *
  90. CALL ZLAUUM( UPLO, N, A, LDA, INFO )
  91. *
  92. RETURN
  93. *
  94. * End of ZPOTRI
  95. *
  96. END

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.