comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » array operations and memory consumption
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
array operations and memory consumption [message #57945] Fri, 04 January 2008 14:19
dktr.ted is currently offline  dktr.ted
Messages: 17
Registered: November 2006
Junior Member
Hi all,

Apologies in advance if this is old hat ... I've got a question
regarding IDL's memory usage that can be boiled down in the following
example:

IDL> a = BINDGEN(100,100,100)
IDL> baseMem = (MEMORY())[0]
IDL> a = a + 1
IDL> PRINT, (MEMORY())[3] - baseMem
2000049

I've tried modifying "a = a + 1" with various combinations of pointers
and the TEMPORARY function, but can't reduce this temporary elevated
memory consumption. Compare the above with a call to CONGRID:

IDL> a = BINDGEN(100,100,100)
IDL> baseMem = (MEMORY())[0]
IDL> a = CONGRID(a, 100, 100, 100)
IDL> PRINT, (MEMORY())[3] - baseMem
1003941

I'm working with some very large image arrays and trying to do some
"in place" manipulations. While I can slink by with the temporary
memory usage of the latter CONGRID-type operations, addition (or
multiplication) of an array by a scalar breaks the bank.

Any tips or directions to a helpful tutorial on IDL's memory policies
would be greatly appreciated. Thanks!

-Ted

P.S. IDL 7.0 on a 3 GHz Pentium w/ 2 GB RAM running Windows XP Pro
SP2, if it helps.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: New IDL 7.0 Project Problem
Next Topic: Re: array operations and memory consumption

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:05:35 PDT 2025

Total time taken to generate the page: 0.00491 seconds