Mercurial > octave
view .editorconfig @ 30227:b00ff462e0f2
improve efficiency of mxArray -> octave_value conversion
* Array.h (Array<T>::ArrayRep, Array<T>::Array): New constructor that
accepts externally allocated data array.
* Sparse.h (Sparse<T>::SparseRep, Sparse<T>::Sparse): New constructor
that accepts externally allocated data and index arrays.
* mex.cc (maybe_disown_ptr): New function.
(mxArray_interleaved_full::fp_to_ov): Use new Array constructor to
pass allocated data from mxArray object to Array object without
copying data. Call maybe_disown_ptr on data pointer to give up
ownership.
(mxArray_interleaved_sparse::to_ov): Use new Array constructor to
pass allocated data from mxArray object to Array object without
copying data. Call maybe_disown_ptr on data pointer to give up
ownership.
(mxArray_separate_full::to_ov): New template.
(mxArray_separate_flll::as_octave_value): Use it.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 01 Oct 2021 15:25:51 -0400 |
parents | 640ee0d531d0 |
children |
line wrap: on
line source
root = true [*] charset = utf-8 end_of_line = lf indent_size = 2 indent_style = space insert_final_newline = true [*.{am,mk}] indent_size = tab indent_style = tab