Arrays passed to and received from callbacks are foreign-arrays
Using the new function faify-form, pointers passed by GSL to callbacks are converted to foreign-array objects if scalarsp is nil. This has been tested on multidimensional minimization only so far, and works. Note that this is potentially inefficient, as each time the callback is called, new objects are made and in the callback itself any grefs involve a generic function dispatch. However, it is easier to write the callback than dealing with the raw pointer.
Showing
- data/foreign-array.lisp 5 additions, 5 deletionsdata/foreign-array.lisp
- init/funcallable.lisp 19 additions, 3 deletionsinit/funcallable.lisp
- solve-minimize-fit/minimization-multi.lisp 21 additions, 13 deletionssolve-minimize-fit/minimization-multi.lisp
- solve-minimize-fit/roots-multi.lisp 8 additions, 3 deletionssolve-minimize-fit/roots-multi.lisp
Please register or sign in to comment