1 Dec 2010 01:43
Fortran ffi question
Hi, Is it possible to define subroutines with output parameters using the Fortran FFI? I'm trying to wrap (some of!) arpack[1] and, following the example in the manual[2], want to do something with DSAUPD. The interface for DSAUPD is defined at [3], but basically it's a subroutine that takes loads of parameters, some of which are input/output. I tried the following:
USING: alien.fortran kernel ;
FROM: alien.libraries => deploy-library ;
IN: geometry.arpack.ffi
<<
"arpack" "libarpack.so.2" gfortran-abi add-fortran-library
"arpack" deploy-library
>>
LIBRARY: arpack
SUBROUTINE: DSAUPD
( !INTEGER IDO, CHARACTER*1 BMAT, INTEGER N, CHARACTER*2 WHICH,
INTEGER NEV, DOUBLE-PRECISION TOL, !DOUBLE-PRECISION(*) RESID,
INTEGER NCV, !DOUBLE-PRECISION(*) V, INTEGER LDV,
!INTEGER(11) IPARAM, !INTEGER(11) IPNTR,
(Continue reading)
RSS Feed