[cffi-devel] offer of code contribution - with-array-as-foreign-pointer

Mark Hoemmen mark.hoemmen at gmail.com
Sun Sep 12 00:45:21 UTC 2010


On Sat, Sep 11, 2010 at 18:38, JTK <jetmonk at gmail.com> wrote:
> I'm using cffi, and I need to perform the common task of passing Lisp arrays to foreign code.
>
> This task comes up a lot in scientific code, matrix math, image processing, etc.
>
> Normally, it involves a lot of boilerplate to allocate a pointer, copy data Lisp  to foreign
> memory, copy the data back, and deallocate the memory.   Getting the copying to run
> fast can be tricky.
>
> Hence I wrote a package to automate it.

You might be disappointed (or pleased, perhaps) to see that someone
(Tamas K. Papp, in particular) has already done this:

http://tkpapp.blogspot.com/2007/12/announcement-ffa.html

mfh




More information about the cffi-devel mailing list