Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Joe Groff <arcata-Re5JQEeQqe8AvxtiuMwx3w <at> public.gmane.org>
Subject: Fortran FFI
Newsgroups: gmane.comp.lang.factor.general
Date: Tuesday 10th February 2009 01:23:34 UTC (over 8 years ago)
CBLAS is kind of tricky to get working when it doesn't come bundled  
with a BLAS implementation, so I wrote a little Fortran FFI and  
updated math.blas to build off of it. It looks mostly like the C FFI.  
You declare your Fortran functions using a bastardized C-ish syntax:

USE: alien.fortran

LIBRARY: blas

FUNCTION: REAL CDOTU
     ( INTEGER N, COMPLEX ALPHA, COMPLEX(*) X, INTEGER INCX,  
COMPLEX(*) Y, INTEGER INCY ) ;
SUBROUTINE: SAXPY
     ( INTEGER N, REAL ALPHA, REAL(*) X, INTEGER INCX, REAL(*) Y,  
INTEGER INCY ) ;

Right now it only supports the ABI used by g77/gfortran. Someday I'll  
add support for the slightly different Intel Fortran and f2c ABIs,  
which should cover the common cases used in commercial and free  
software math software distributions.

-Joe


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code
to
build responsive, highly engaging applications that combine the power of
local
resources and data with the reach of the web. Download the Adobe AIR SDK
and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
 
CD: 2ms