1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
! -*- f90 -*-
! Signatures for f2py-wrappers of FORTRAN LEVEL 2 BLAS functions.
!
! Author: Pearu Peterson
! Created: Jan-Feb 2002
!
!XXX: make beta and y optional in hemv,symv similarly to gemv
subroutine <tchar=s,d,c,z>gemv(m,n,alpha,a,x,beta,y,offx,incx,offy,incy,trans,rows,cols,ly)
! y = gemv(alpha,a,x,beta=0,y=0,offx=0,incx=1,offy=0,incy=0,trans=0)
! Calculate y <- alpha * op(A) * x + beta * y
callstatement (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&alpha,a,&m,x+offx,&incx,&beta,y+offy,&incy)
callprotoargument char*,int*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*
integer optional,intent(in),check(trans>=0 && trans <=2) :: trans = 0
integer optional, intent(in),check(incx>0||incx<0) :: incx = 1
integer optional, intent(in),check(incy>0||incy<0) :: incy = 1
<type_in> intent(in) :: alpha
<type_in> intent(in),optional :: beta = <type_convert=0.0>
<type_in> dimension(*),intent(in) :: x
<type_in> dimension(ly),intent(in,copy,out),depend(ly),optional :: y
integer intent(hide),depend(incy,rows,offy) :: ly = (y_capi==Py_None?1+offy+(rows-1)*abs(incy):-1)
<type_in> dimension(m,n),intent(in) :: a
integer depend(a),intent(hide):: m = shape(a,0)
integer depend(a),intent(hide):: n = shape(a,1)
integer optional,intent(in) :: offx=0
integer optional,intent(in) :: offy=0
check(offx>=0 && offx<len(x)) :: x
check(len(x)>offx+(cols-1)*abs(incx)) :: x
depend(offx,cols,incx) :: x
check(offy>=0 && offy<len(y)) :: y
check(len(y)>offy+(rows-1)*abs(incy)) :: y
depend(offy,rows,incy) :: y
integer depend(m,n,trans),intent(hide) :: rows = (trans?n:m)
integer depend(m,n,trans),intent(hide) :: cols = (trans?m:n)
end subroutine <tchar=s,d,c,z>gemv
subroutine <tchar=c,z>hemv(n,alpha,a,x,offx,incx,beta,y,offy,incy,lower)
! Calculate y <- alpha * A * x + beta * y, A is hermitian
callstatement (*f2py_func)((lower?"L":"U"),&n,&alpha,a,&n,x+offx,&incx,&beta,y+offy,&incy)
callprotoargument char*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional, intent(in),check(incx>0||incx<0) :: incx = 1
integer optional, intent(in),check(incy>0||incy<0) :: incy = 1
<type_in> intent(in) :: alpha,beta
<type_in> dimension(*),intent(in) :: x
<type_in> dimension(*),intent(in,copy,out) :: y
<type_in> dimension(n,n),intent(in),check(shape(a,0)==shape(a,1)) :: a
integer depend(a),intent(hide):: n = shape(a,0)
integer optional,intent(in),depend(x) :: offx=0
integer optional,intent(in),depend(y) :: offy=0
check(offx>=0 && offx<len(x)) :: offx
check(offy>=0 && offy<len(y)) :: offy
check(len(x)>offx+(n-1)*abs(incx)) :: n
check(len(y)>offy+(n-1)*abs(incy)) :: n
depend(x,offx,incx,y,offy,incy) :: n
end subroutine <tchar=c,z>hemv
subroutine <tchar=s,d>symv(n,alpha,a,x,offx,incx,beta,y,offy,incy,lower)
! Calculate y <- alpha * A * x + beta * y, A is symmetric
callstatement (*f2py_func)((lower?"L":"U"),&n,&alpha,a,&n,x+offx,&incx,&beta,y+offy,&incy)
callprotoargument char*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional, intent(in),check(incx>0||incx<0) :: incx = 1
integer optional, intent(in),check(incy>0||incy<0) :: incy = 1
<type_in> intent(in) :: alpha,beta
<type_in> dimension(*),intent(in) :: x
<type_in> dimension(*),intent(in,copy,out) :: y
<type_in> dimension(n,n),intent(in),check(shape(a,0)==shape(a,1)) :: a
integer depend(a),intent(hide):: n = shape(a,0)
integer optional,intent(in),depend(x) :: offx=0
integer optional,intent(in),depend(y) :: offy=0
check(offx>=0 && offx<len(x)) :: offx
check(offy>=0 && offy<len(y)) :: offy
check(len(x)>offx+(n-1)*abs(incx)) :: n
check(len(y)>offy+(n-1)*abs(incy)) :: n
depend(x,offx,incx,y,offy,incy) :: n
end subroutine <tchar=s,d>symv
subroutine <tchar=s,d,c,z>trmv(n,a,x,offx,incx,lower,trans,unitdiag)
! Calculate x <- op(A) * x, A is triangular
callstatement (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(unitdiag?"U":"N"),&n,a,&n,x+offx,&incx)
callprotoargument char*,char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,int*
integer optional,intent(in),check(trans>=0 && trans <=2) :: trans = 0
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,intent(in),check(unitdiag==0||unitdiag==1) :: unitdiag = 0
integer optional, intent(in),check(incx>0||incx<0) :: incx = 1
<type_in> dimension(*),intent(in,out,copy) :: x
<type_in> dimension(n,n),intent(in),check(shape(a,0)==shape(a,1)) :: a
integer depend(a),intent(hide):: n = shape(a,0)
integer optional,intent(in),depend(x) :: offx=0
check(offx>=0 && offx<len(x)) :: offx
check(len(x)>offx+(n-1)*abs(incx)) :: n
depend(x,offx,incx) :: n
end subroutine <tchar=s,d,c,z>trmv
subroutine <tchar=s,d>ger(m,n,alpha,x,incx,y,incy,a,lda)
! a = ger(alpha,x,y,incx=1,incy=1,a=0,overwrite_x=1,overwrite_y=1,overwrite_a=0)
! Calculate a <- alpha*x*y^T + a
integer intent(hide),depend(x) :: m = len(x)
integer intent(hide),depend(y) :: n = len(y)
<type_in> intent(in) :: alpha
<type_in> dimension(m),intent(in,overwrite) :: x
integer optional,intent(in),check(incx==1||incx==-1) :: incx = 1
<type_in> dimension(n),intent(in,overwrite) :: y
integer optional,intent(in),check(incy==1||incy==-1) :: incy = 1
<type_in> dimension(m,n),intent(in,out,copy),optional :: a = <type_convert=0>
integer intent(hide), depend(m) :: lda=m
end subroutine <tchar=s,d>ger
subroutine <tchar=c,z>geru(m,n,alpha,x,incx,y,incy,a,lda)
! a = ger(alpha,x,y,incx=1,incy=1,a=0,overwrite_x=1,overwrite_y=1,overwrite_a=0)
! Calculate a <- alpha*x*y^T + a
integer intent(hide),depend(x) :: m = len(x)
integer intent(hide),depend(y) :: n = len(y)
<type_in> intent(in) :: alpha
<type_in> dimension(m),intent(in,overwrite) :: x
integer optional,intent(in),check(incx==1||incx==-1) :: incx = 1
<type_in> dimension(n),intent(in,overwrite) :: y
integer optional,intent(in),check(incy==1||incy==-1) :: incy = 1
<type_in> dimension(m,n),intent(in,out,copy),optional :: a = <type_convert=0>
integer intent(hide), depend(m) :: lda=m
end subroutine <tchar=c,z>geru
subroutine <tchar=c,z>gerc(m,n,alpha,x,incx,y,incy,a,lda)
! a = ger(alpha,x,y,incx=1,incy=1,a=0,overwrite_x=1,overwrite_y=1,overwrite_a=0)
! Calculate a <- alpha*x*y^H + a
integer intent(hide),depend(x) :: m = len(x)
integer intent(hide),depend(y) :: n = len(y)
<type_in> intent(in) :: alpha
<type_in> dimension(m),intent(in,overwrite) :: x
integer optional,intent(in),check(incx==1||incx==-1) :: incx = 1
<type_in> dimension(n),intent(in,overwrite) :: y
integer optional,intent(in),check(incy==1||incy==-1) :: incy = 1
<type_in> dimension(m,n),intent(in,out,copy),optional :: a = <type_convert=0>
integer intent(hide), depend(m) :: lda=m
end subroutine <tchar=c,z>gerc
|