octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need tests for new MEX interface functions run in recent version of Matl


From: John W. Eaton
Subject: Need tests for new MEX interface functions run in recent version of Matlab
Date: Tue, 14 Jan 2020 16:50:05 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

I'm looking at adding the following new MEX interface functions to Octave

   mxGetDoubles  mxGetSingles
   mxSetDoubles  mxSetSingles

   mxGetInt8s  mxGetInt16s  mxGetInt32s  mxGetInt64s
   mxSetInt8s  mxSetInt16s  mxSetInt32s  mxSetInt64s

   mxGetUint8s  mxGetUint16s  mxGetUint32s  mxGetUint64s
   mxSetUint8s  mxSetUint16s  mxSetUint32s  mxSetUint

To do that, I could use help understanding how they behave and how the older functions like mxGetPr behave with Matlab 2018a and newer versions that use interleaved complex data.

1. Do the new functions like mxGetDoubles throw errors if the input mxArray object does not match the expected type or do they return some undefined result?

2. If using the -r2018a option when compiling mex files so that they use the interleaved complex data interface, does the mxGetPr function return alternating real/imag values for a complex input array or does it throw an error?

Could someone try the following with the attached mextst.c file? You'll need Matlab 2018a or a newer version.

If compiled with mex -r2018a and called with

  mextst ([1, 2])

I expect the output to be something like

  mxGetPr:       1.00000, 2.00000
  mxGetDoubles:  1.00000, 2.00000

If called with

  mextst ([1+i, 2+2i])

Does mxGetPr throw an error because the type is wrong? If not, what does it display?

Does mxGetDoubles fail with an error because the type of the argument is wrong? If not, what does it display?

jwe

Attachment: mextst.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]