Skip to content
  • Liam Healy's avatar
    Copy to and from CL arrays · 6a685571
    Liam Healy authored
    The function #'copy will now copy contents between marrays and CL
    arrays.  The destination array can be supplied literally, or created
    by this function by specifying the desired type: when copying from a
    marray to a CL array, specify 'array; when copying from a CL array to
    a marray, specify the element type of the marray.  For example,
    (COPY
       (COPY
        (MAKE-MARRAY '(COMPLEX DOUBLE-FLOAT) :INITIAL-CONTENTS
                     '((-34.5 8.24 3.29 -8.93 34.12 -6.15)
                       (-8.93 34.12 -6.15 49.27 -13.49 32.5)
                       (49.27 -13.49 32.5 42.73 -17.24 43.31)))
        'ARRAY)
       '(COMPLEX DOUBLE-FLOAT))
    copies from the matrix-complex-double-float made in the make-marray
    form to a CL array, then copies the contents to a new
    matrix-complex-double-float.
    6a685571