Now that I've used the callback support a little, I'd like to propose
the following to make it a little easier to write callbacks for fortran
routines.
(WITH-FORTRAN-MATRIX (name fv &rest dimensions) &body body)
This makes it easier to access Fortran matrices so you can write
(defun callback (fv)
(with-fortran-matrix (m fv (1 4) (1 5))
(setf (m 1 3) (m 4 5))
The dimensions (1 4) and (1 5) are the lower and upper bounds of the
Fortran matrix m, which is an alias to the actual foreign vector in fv.
Or maybe it should be
(with-fortran-matrices ((m1 fv1 <dims1>)
(m2 fv2 <dims2>))
body)
so that several matrices can be created at once.
Ray
|