[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Oct files: How to get read-only pointers to data for arguments of un
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Oct files: How to get read-only pointers to data for arguments of unknown type? |
Date: |
Tue, 28 Feb 2012 09:44:36 -0500 |
On 28 February 2012 08:52, Stefan <address@hidden> wrote:
> I figured out how to get a pointer to the data in an octave_value object,
> regardless of the type, without having octave make a copy:
[code snipped]
> So there is an octave_value method mex_get_data() that emulates Matlab's
> mxGetData() function,
There is also mxGetData in Octave which emulates Matlab's mxGetData:
http://hg.savannah.gnu.org/hgweb/octave/file/933101fd5cbb/src/mexproto.h#l194
The difficulties you seem to have solved with the Octave API are about
figuring out the type of the octave_value you have received in your
DLD function.
I'm not sure if you'd be happier just using Octave's mex interface if
you already have mex files written for Matlab.
- Jordi G. H.