Skip to content
  • Liam Healy's avatar
    Extend #'copy to copy to or from mpointers · efa2315f
    Liam Healy authored
    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.
    efa2315f