[cffi-devel] C99 complex datatypes?
Mark Hoemmen
mark.hoemmen at gmail.com
Sun Oct 15 10:04:58 UTC 2006
Greetings!
We're working on a linear algebra package (called lisp-matrix for lack
of a more marketable name ;) ) in CL. We plan to call the BLAS and
LAPACK for matrix-matrix multiplications and factorizations, and we
want to use CFFI for maximum portability (the older package Matlisp
has only been ported to SBCL and Allegro CL).
The BLAS and LAPACK fully support complex numbers (single-float and
couple-float), and they are stored with the same layout in memory as a
C struct would use. C99 supports complex floating-point types. As
such, we would like to include complex number support in lisp-matrix.
However, CFFI doesn't support passing C structs by value, so we can't
implement a complex number interface in CFFI using DEFCSTRUCT.
We would be glad to help implement complex number support in CFFI, but
would like some advice on the difficulty of such a project, and how we
might proceed.
We've written up some plans for the lisp-matrix project -- you can see
them here:
http://www.cs.berkeley.edu/~mhoemmen/lisp-matrix/
Best,
mfh
More information about the cffi-devel
mailing list