LAPACK routines can be considered pure

all arguments have 'intent' specification and don't access any global
variables.
output to screen only occurs in the case that someting goes wrong
This commit is contained in:
Martin Diehl 2021-12-29 07:09:52 +01:00
parent 4583c17080
commit 59bb264b5f
1 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@
module LAPACK_interface module LAPACK_interface
interface interface
subroutine dgeev(jobvl,jobvr,n,a,lda,wr,wi,vl,ldvl,vr,ldvr,work,lwork,info) pure subroutine dgeev(jobvl,jobvr,n,a,lda,wr,wi,vl,ldvl,vr,ldvr,work,lwork,info)
use prec use prec
character, intent(in) :: jobvl,jobvr character, intent(in) :: jobvl,jobvr
integer, intent(in) :: n,lda,ldvl,ldvr,lwork integer, intent(in) :: n,lda,ldvl,ldvr,lwork
@ -18,7 +18,7 @@ module LAPACK_interface
integer, intent(out) :: info integer, intent(out) :: info
end subroutine dgeev end subroutine dgeev
subroutine dgesv(n,nrhs,a,lda,ipiv,b,ldb,info) pure subroutine dgesv(n,nrhs,a,lda,ipiv,b,ldb,info)
use prec use prec
integer, intent(in) :: n,nrhs,lda,ldb integer, intent(in) :: n,nrhs,lda,ldb
real(pReal), intent(inout), dimension(lda,n) :: a real(pReal), intent(inout), dimension(lda,n) :: a
@ -27,7 +27,7 @@ module LAPACK_interface
integer, intent(out) :: info integer, intent(out) :: info
end subroutine dgesv end subroutine dgesv
subroutine dgetrf(m,n,a,lda,ipiv,info) pure subroutine dgetrf(m,n,a,lda,ipiv,info)
use prec use prec
integer, intent(in) :: m,n,lda integer, intent(in) :: m,n,lda
real(pReal), intent(inout), dimension(lda,n) :: a real(pReal), intent(inout), dimension(lda,n) :: a
@ -35,7 +35,7 @@ module LAPACK_interface
integer, intent(out) :: info integer, intent(out) :: info
end subroutine dgetrf end subroutine dgetrf
subroutine dgetri(n,a,lda,ipiv,work,lwork,info) pure subroutine dgetri(n,a,lda,ipiv,work,lwork,info)
use prec use prec
integer, intent(in) :: n,lda,lwork integer, intent(in) :: n,lda,lwork
real(pReal), intent(inout), dimension(lda,n) :: a real(pReal), intent(inout), dimension(lda,n) :: a
@ -44,7 +44,7 @@ module LAPACK_interface
integer, intent(out) :: info integer, intent(out) :: info
end subroutine dgetri end subroutine dgetri
subroutine dsyev(jobz,uplo,n,a,lda,w,work,lwork,info) pure subroutine dsyev(jobz,uplo,n,a,lda,w,work,lwork,info)
use prec use prec
character, intent(in) :: jobz,uplo character, intent(in) :: jobz,uplo
integer, intent(in) :: n,lda,lwork integer, intent(in) :: n,lda,lwork