bugGNU Octave - Bugs: bug #31401, Single arrays returned from mex...

 
 

bug #31401: Single arrays returned from mex files are converted to double arrays.

Submitter:  Gunnar Farnebäck <gf>
Submitted:  Thu 21 Oct 2010 08:19:31 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Gunnar Farnebäck Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 21 Oct 2010 09:24:03 PM UTC, comment #1: 

Thanks for the patch.  I applied it and added your name to the list of contributors in the manual.

John W. Eaton <jwe>
Group administrator
Thu 21 Oct 2010 08:19:31 PM UTC, original submission:  

When a mex file returns a single array it is converted to a double array before it reaches octave's workspace. Since octave now supports single arrays this conversion is no longer needed, nor desirable. The attached patch corrects this, hopefully in a proper way. I also attach a minimal example mex file returning a scalar single.

Gunnar Farnebäck <gf>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21751:  test_mex_single.c added by gf (208B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by gf (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-21 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2010-10-21 gf Attached File- Added mex_float_conversion_fix.diff, #21750
        Attached File- Added test_mex_single.c, #21751

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code