[racket-dev] Passing flvectors to BLAS and LAPACK

From: Neil Toronto (neil.toronto at gmail.com)
Date: Thu Dec 20 21:17:13 EST 2012

How hard would it be to allow flvectors to be passed to foreign 
functions as double pointers?

BLAS and LAPACK linear algebra functions primarily accept pointers to 
floating-point arrays in row-major order. If we could send flvectors 
directly (or at least pointers to their elements), we could reuse the 
`FlArray' type for LAPACK-accelerated matrices, cut down on copying, and 
more easily transparently use LAPACK on systems that have it.

Would it require somehow allocating flvectors with 'atomic-interior so 
they wouldn't be relocated?

Neil ⊥


Posted on the dev mailing list.