Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C and C++ bindings #125

Merged
merged 4 commits into from
Jun 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions SRC/icbacn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ subroutine cnaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
use :: iso_c_binding
implicit none
integer(kind=c_int), intent(inout) :: ido
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_float_complex), value, intent(in) :: tol
real(kind=c_float_complex), dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
real(kind=c_float_complex), dimension(ldv, ncv), intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
real(kind=c_float_complex), dimension(3*n), intent(out) :: workd
real(kind=c_float_complex), dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_float_complex), dimension(ncv), intent(out) :: rwork
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_float), value, intent(in) :: tol
complex(kind=c_float_complex),dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
complex(kind=c_float_complex),dimension(ldv, ncv),intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
complex(kind=c_float_complex),dimension(3*n), intent(out) :: workd
complex(kind=c_float_complex),dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_float), dimension(ncv), intent(out) :: rwork
integer(kind=c_int), intent(inout) :: info
call cnaupd(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
iparam, ipntr, workd, workl, lworkl, rwork, info)
Expand All @@ -32,29 +32,29 @@ subroutine cneupd_c(rvec, howmny, select, d, z, ldz, sigma, workev, &
bind(c, name="cneupd_c")
use :: iso_c_binding
implicit none
logical(kind=c_bool), value, intent(in) :: rvec
character(kind=c_char), dimension(1), intent(in) :: howmny
logical(kind=c_bool), dimension(ncv), intent(in) :: select
real(kind=c_float_complex), dimension(nev), intent(out) :: d
real(kind=c_float_complex), dimension(n, nev), intent(out) :: z
integer(kind=c_int), value, intent(in) :: ldz
real(kind=c_float_complex), value, intent(in) :: sigma
real(kind=c_float_complex), dimension(2*ncv), intent(in) :: workev
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_float_complex), value, intent(in) :: tol
real(kind=c_float_complex), dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
real(kind=c_float_complex), dimension(ldv, ncv), intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
real(kind=c_float_complex), dimension(3*n), intent(out) :: workd
real(kind=c_float_complex), dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_float_complex), dimension(ncv), intent(out) :: rwork
logical(kind=c_bool), value, intent(in) :: rvec
character(kind=c_char), dimension(1), intent(in) :: howmny
logical(kind=c_bool), dimension(ncv), intent(in) :: select
complex(kind=c_float_complex),dimension(nev), intent(out) :: d
complex(kind=c_float_complex),dimension(n, nev), intent(out) :: z
integer(kind=c_int), value, intent(in) :: ldz
complex(kind=c_float_complex),value, intent(in) :: sigma
complex(kind=c_float_complex),dimension(2*ncv), intent(out) :: workev
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_float), value, intent(in) :: tol
complex(kind=c_float_complex),dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
complex(kind=c_float_complex),dimension(ldv, ncv),intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
complex(kind=c_float_complex),dimension(3*n), intent(out) :: workd
complex(kind=c_float_complex),dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_float), dimension(ncv), intent(out) :: rwork
integer(kind=c_int), intent(inout) :: info
call cneupd(rvec, howmny, select, d, z, ldz, sigma, workev,&
bmat, n, which, nev, tol, resid, ncv, v, ldv, &
Expand Down
82 changes: 41 additions & 41 deletions SRC/icbazn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ subroutine znaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
bind(c, name="znaupd_c")
use :: iso_c_binding
implicit none
integer(kind=c_int), intent(inout) :: ido
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_double_complex), value, intent(in) :: tol
real(kind=c_double_complex), dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
real(kind=c_double_complex), dimension(ldv, ncv), intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
real(kind=c_double_complex), dimension(3*n), intent(out) :: workd
real(kind=c_double_complex), dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_double_complex), dimension(ncv), intent(out) :: rwork
integer(kind=c_int), intent(inout) :: info
integer(kind=c_int), intent(inout) :: ido
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_double), value, intent(in) :: tol
complex(kind=c_double_complex), dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
complex(kind=c_double_complex), dimension(ldv, ncv),intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
complex(kind=c_double_complex), dimension(3*n), intent(out) :: workd
complex(kind=c_double_complex), dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_double), dimension(ncv), intent(out) :: rwork
integer(kind=c_int), intent(inout) :: info
call znaupd(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
iparam, ipntr, workd, workl, lworkl, rwork, info)
end subroutine znaupd_c
Expand All @@ -32,30 +32,30 @@ subroutine zneupd_c(rvec, howmny, select, d, z, ldz, sigma, workev, &
bind(c, name="zneupd_c")
use :: iso_c_binding
implicit none
logical(kind=c_bool), value, intent(in) :: rvec
character(kind=c_char), dimension(1), intent(in) :: howmny
logical(kind=c_bool), dimension(ncv), intent(in) :: select
real(kind=c_double_complex), dimension(nev), intent(out) :: d
real(kind=c_double_complex), dimension(n, nev), intent(out) :: z
integer(kind=c_int), value, intent(in) :: ldz
real(kind=c_double_complex), value, intent(in) :: sigma
real(kind=c_double_complex), dimension(2*ncv), intent(in) :: workev
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_double_complex), value, intent(in) :: tol
real(kind=c_double_complex), dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
real(kind=c_double_complex), dimension(ldv, ncv), intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
real(kind=c_double_complex), dimension(3*n), intent(out) :: workd
real(kind=c_double_complex), dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_double_complex), dimension(ncv), intent(out) :: rwork
integer(kind=c_int), intent(inout) :: info
logical(kind=c_bool), value, intent(in) :: rvec
character(kind=c_char), dimension(1), intent(in) :: howmny
logical(kind=c_bool), dimension(ncv), intent(in) :: select
complex(kind=c_double_complex), dimension(nev), intent(out) :: d
complex(kind=c_double_complex), dimension(n, nev), intent(out) :: z
integer(kind=c_int), value, intent(in) :: ldz
complex(kind=c_double_complex), value, intent(in) :: sigma
complex(kind=c_double_complex), dimension(2*ncv), intent(out) :: workev
character(kind=c_char), dimension(1), intent(in) :: bmat
integer(kind=c_int), value, intent(in) :: n
character(kind=c_char), dimension(2), intent(in) :: which
integer(kind=c_int), value, intent(in) :: nev
real(kind=c_double), value, intent(in) :: tol
complex(kind=c_double_complex), dimension(n), intent(inout) :: resid
integer(kind=c_int), value, intent(in) :: ncv
complex(kind=c_double_complex), dimension(ldv, ncv),intent(out) :: v
integer(kind=c_int), value, intent(in) :: ldv
integer(kind=c_int), dimension(11), intent(inout) :: iparam
integer(kind=c_int), dimension(11), intent(out) :: ipntr
complex(kind=c_double_complex), dimension(3*n), intent(out) :: workd
complex(kind=c_double_complex), dimension(lworkl), intent(out) :: workl
integer(kind=c_int), value, intent(in) :: lworkl
real(kind=c_double), dimension(ncv), intent(out) :: rwork
integer(kind=c_int), intent(inout) :: info
call zneupd(rvec, howmny, select, d, z, ldz, sigma, workev,&
bmat, n, which, nev, tol, resid, ncv, v, ldv, &
iparam, ipntr, workd, workl, lworkl, rwork, info)
Expand Down
2 changes: 1 addition & 1 deletion TESTS/icb_arpack_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int zn() {
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
workl[k] = 0;
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
double _Complex rwork[ncv];
double rwork[ncv];
double _Complex workev[2*ncv];
BLASINT info = 0;

Expand Down
Loading