! Signatures for f2py-wrappers of FORTRAN LAPACK General Banded Matrix functions. ! subroutine gbsv(n,kl,ku,nrhs,ab,piv,b,info) ! lub,piv,x,info = gbsv(kl,ku,ab,b,overwrite_ab=0,overwrite_b=0) ! Solve A * X = B ! A = P * L * U ! A is a band matrix of order n with kl subdiagonals and ku superdiagonals ! starting at kl-th row. ! X, B are n-by-nrhs matrices callstatement {F_INT i=2*kl+ku+1;(*f2py_func)(&n,&kl,&ku,&nrhs,ab,&i,piv,b,&n,&info);for(i=0;i\*,F_INT*,F_INT*,*,F_INT*,F_INT* integer depend(ab),intent(hide):: n = shape(ab,1) integer intent(in) :: kl integer intent(in) :: ku integer depend(b),intent(hide) :: nrhs = shape(b,1) dimension(2*kl+ku+1,n),depend(kl,ku), check(2*kl+ku+1==shape(ab,0)) :: ab integer dimension(n),depend(n),intent(out) :: piv dimension(n,nrhs),depend(n),check(shape(ab,1)==shape(b,0)) :: b integer intent(out) :: info intent(in,out,copy,out=x) b intent(in,out,copy,out=lub) ab end subroutine gbsv subroutine gbtrf(m,n,ab,kl,ku,ldab,ipiv,info) ! in :Band:dgbtrf.f ! lu,ipiv,info = dgbtrf(ab,kl,ku,[m,n,ldab,overwrite_ab]) ! Compute an LU factorization of a real m-by-n band matrix ! threadsafe ! FIXME: should this be added ? callstatement {F_INT i;(*f2py_func)(&m,&n,&kl,&ku,ab,&ldab,ipiv,&info); for(i=0,n=MIN(m,n);i\*,F_INT*,F_INT*,F_INT* ! let the default be a square matrix: integer optional,depend(ab) :: m=shape(ab,1) integer optional,depend(ab) :: n=shape(ab,1) integer :: kl integer :: ku dimension(ldab,n),intent(in,out,copy,out=lu) :: ab integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=max(shape(ab,0),1) integer dimension(MIN(m,n)),depend(m,n),intent(out) :: ipiv integer intent(out):: info end subroutine gbtrf subroutine gbtrs(ab,kl,ku,b,ipiv,trans,n,nrhs,ldab,ldb,info) ! in :Band:dgbtrs.f ! x,info = dgbtrs(ab,kl,ku,b,ipiv,[trans,n,ldab,ldb,overwrite_b]) ! solve a system of linear equations A * X = B or A' * X = B ! with a general band matrix A using the LU factorization ! computed by DGBTRF ! ! TRANS Specifies the form of the system of equations. ! 0 = 'N': A * X =B (No transpose) ! 1 = 'T': A'* X = B (Transpose) ! 2 = 'C': A'* X = B (Conjugate transpose = Transpose) callstatement {F_INT i;for(i=0;i\0?(trans==1?"T":"C"):"N"),&n,&kl,&ku,&nrhs,ab,&ldab,ipiv,b,&ldb,&info);for(i=0;i\*,F_INT*,F_INT*,*,F_INT*,F_INT* !character optional:: trans='N' integer optional:: trans=0 integer optional,depend(ab) :: n=shape(ab,1) integer :: kl integer :: ku integer intent(hide),depend(b):: nrhs=shape(b,1) dimension(ldab,n),intent(in) :: ab integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0) integer dimension(n),intent(in) :: ipiv dimension(ldb,nrhs),intent(in,out,copy,out=x) :: b integer optional,check(shape(b,0)==ldb),depend(b) :: ldb=shape(b,0) !integer optional,check(shape(b,0)==ldb),depend(b) :: ldb=shape(b,0) integer intent(out):: info end subroutine gbtrs