Re: Re: Matrix column access
Nicolas Neuss <[email protected]> Wed, 07 Dec 2005 16:12:32 +0100
| Newsgroups | gmane.lisp.matlisp.user |
|---|---|
| Organization | IWR |
| Message-ID | <[email protected]> |
Raymond Toy <[email protected]> writes: >>>>>> "Nicolas" == Nicolas Neuss <[email protected]> writes: > > Nicolas> Raymond Toy <[email protected]> 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? If one uses clapack, it uses f2c (http://www.netlib.org/clapack/readme). But I don't know how performance does compare. > 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 Ouch, this looks much nastier than I thought. I googled, and did not find even a complete C interface to the Fortran BLAS/LAPACK libraries. In this case, trying to do an automatic CL interface is probably not very reasonable. Thanks for the information, Nicolas. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click