Skip to content
Snippets Groups Projects
Commit efa2315f authored by Liam Healy's avatar Liam Healy
Browse files

Extend #'copy to copy to or from mpointers

Both copy-to-array and copy-making-destination have been extended so
that an mpointer can occur as the first or second argument.  If the
first argument, the second argument should be a symbol representing a
subclass of marray.  If the second argument is not present
(copy-making-destination), 'vector-double-float is assumed.  If the
mpointer is the second argument, the marray contents are copied into
its contents.  These methods are useful for callbacks and GSL
functions that send raw mpointers.  For example, a callback that uses
foreign arrays directly can simply copy from and to them.  This has
been applied in the solve-minimize-fit functions that return a raw
mpointer, replacing the explicit call to make-marray.  The first
argument to #'marray can now be either the class name or element-type.
parent c5e449db
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment