Akshay Srinivasan | 11 Mar 19:11 2012

Re: BLAS (was Matlisp tests)

On 03/11/2012 12:37 PM, Raymond Toy wrote:
> On 3/10/12 7:03 PM, Akshay Srinivasan wrote:
>> On 03/10/2012 11:16 PM, Raymond Toy wrote:
>>> On 3/10/12 8:40 AM, Akshay Srinivasan wrote:
>>>>> It would be nice to be able to detect either mode and have 
>>>>> the ffi do the right thing, but I think many lisps do not 
>>>>> support structure returns the way gcc is doing it now.
>>>> It returns a struct ? I never could get hold of the 
>>>> documentation for that.
>>> That's my understanding.  And when I look at the disassembly 
>>> for a simple Fortran function, it returns the real and 
>>> imaginary parts in xmm0 and xmm1 (at least on OSX).
>> Hmm. Too clumsy and non-portable to support all that, no ?
> It would be good if cffi supported that, but I suspect not.
>>>>> We also have an alternative: Add simple C wrappers that
>>>>> use the f2c-mode return and call the Fortran routine
>>>>> directly.
>>>> CBLAS :) (not the netlib version).
After some more thinking, I vote for adding wrapper subroutine around
zdotu/zdotc in F77. It'll be far too much boring work to migrate to
CBLAS, given that I seem to be able to handle ordering quite well
within lisp itself. There aren't any other complex returning functions
in BLAS, are there ?

We probably don't need any other f2c features, since most functions I
know only take character arguments instead of string ones.


Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.