patchGNU Octave - Patches: patch #8368, imremap - Change to imremap to...


patch #8368: imremap - Change to imremap to reduce memory footprint

Submitted by:  Ian Journeaux <ijourneaux>
Submitted on:  Mon 03 Mar 2014 03:23:29 PM UTC  
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 16 Mar 2014 07:40:18 PM UTC, comment #1:

Thanks for the diff, Ian. It seems to have been generated in reverse though, i.e., diff old new vs diff new old. Would it be possible to regenerate it, please?

Also, since this is related to bug #41674, could you please attach the modified diff files there, so that we avoid duplicates.

Can someone please close the present one.

(Developers would prefer to receive a changeset file, instead of a plain diff file, in case you're inclined to learn how to prepare it on your own.)

Felipe G. Nievinski <fgnievinski>
Mon 03 Mar 2014 03:23:29 PM UTC, original submission:

I would propose the following change to imremap to reduce the memory footprint. I will post a similar change to imresize.

The issue is that meshgrid returns double when single should be sufficient.

The change involves replacing

[X, Y] = meshgrid(1:columns(Z), 1:rows(Z));

XD = linspace (1, columns(Z), columns(Z));
YD = linspace (1, rows(Z), Rows(Z));
XDs = single(XD);
YDs = single(YD);
%# absolute tolerance equality
isequalAbs = @(x,y,tol) (abs(x-y) <= tol );

if(all(isequalAbs(XD, XDs, eps(XDs))) && all(isequalAbs(YD, YDs, eps(YDs))))
XD = XDs;
YD = YDs;
[X, Y] = meshgrid (XD, YD);

Ian Journeaux <ijourneaux>


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

Attach File(s):

Attached Files
file #30921:  imremapdiff.txt added by ijourneaux (613B - text/plain - Corrected Diff file)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by fgnievinski (Posted a comment)
  • -unavailable- added by ijourneaux (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 16 Mar 2014 11:44:46 PM UTCijourneauxAttached File-=>Added imremapdiff.txt, #30921

    Back to the top

    Powered by Savane 3.1-cleanup1