|
From: Raymond T. <ray...@er...> - 2005-12-07 14:10:36
|
>>>>> "Nicolas" == Nicolas Neuss <Nic...@iw...> writes:
Nicolas> Raymond Toy <ray...@er...> writes:
>> Not quite sure what you mean by automating the process of making the
>> routines available. Someone has to figure out the function signature
>> to tell Lisp how to call it. And some of the functions take
>> characters or strings, and that is very dependent on the Fortran
>> compiler. Same with returning complex values.
Nicolas> Does this mean that interfacing to Fortran libraries is ill-defined? Maybe
Nicolas> one should use the C-interface of BLAS/LAPACK then?
Perhaps. Replacing them all would be quite a bit of work, though. Is
the C interface just that and you still have to use Fortran for
BLAS/LAPACK, so you get another layer?
I think the standard used by Matlisp is the standard for the old
portable f77 compiler, which is used by g77 and Sun f77, so it's not
so bad. I suspect that I'm the only one who uses something other than
g77, and I don't do that very often either.
For the record, Fortran strings are represented as basically C
strings, and the length of the string is appended to the list of
parameters. Functions returning complex values actually insert a new
parameter into the arg list and this parameter is a pointer to where
the complex value should be stored. This is probably how the C
interface works.
Ray
|