patchGNU Octave - Patches: patch #8368, [octave forge] (image): imremap -...

 
 

patch #8368: [octave forge] (image): imremap - Change to imremap to reduce memory footprint

Submitter:  Ian Journeaux <ijourneaux>
Submitted:  Mon 03 Mar 2014 03:23:29 PM UTC
 
Category:  Forge : new feature Priority:  5 - Normal
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Wed 29 Dec 2021 11:53:30 AM UTC, comment #3: 

Agreed.marking as duplicate and closing.

Nicholas Jankowski <nrjank>
Project Member
Wed 29 Dec 2021 11:42:08 AM UTC, comment #2: 

Could this be closed?

On 29 Sep 2018 carandraug removed all calls to meshgrid for imremap.
As seen in bug #41674 comment 17
"I pushed 736f6c0cd527 which completely removes the use of meshgrid"

The ijourneaux stated meshgrid was the issue.

Anonymous
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));

with
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;
endif
XDs=[];
YDs=[];
[X, Y] = meshgrid (XD, YD);
XD=[];
YD=[];

Ian Journeaux <ijourneaux>

 

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

Attach Files:
   
   
Comment:
   

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
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by fgnievinski (Posted a comment)
  • -email is unavailable- added by ijourneaux (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 logged-in users can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-29 nrjank StatusNone Duplicate
        Open/ClosedOpen Closed
    2020-01-18 siko1056 CategoryNone Forge : new feature
        Summaryimremap - Change to imremap to reduce memory footprint [octave forge] (image): imremap - Change to imremap to reduce memory footprint
    2014-03-16 ijourneaux Attached File- Added imremapdiff.txt, #30921

    Back to the top


    Powered by Savane 3.9