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

Home » Public Forums » archive » Modifying an array while conserving memory
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Modifying an array while conserving memory [message #30953 is a reply to message #30878] Fri, 24 May 2002 10:06 Go to previous messageGo to previous message
Xiangyun Qiu is currently offline  Xiangyun Qiu
Messages: 6
Registered: November 2001
Junior Member
I was hoping this would only use memory size of about size(a) +
2*size(b) during
operation; when it's done, only size(a) + size(b). If the conccatination
causes the
problem, I currently have no solution to this.
Thanks,

Xiangyun

"Pavel A. Romashkin" wrote:
>
> I don't think this takes care of it. Temporary does not work like this.
> It is useful for modifying memory contents in place, but not for
> concatinating memory allocations together.
> Pavel
>
> Xiangyun Qiu wrote:
>>
>> Randall Skelton wrote:
>> Hi there,
>>
>> Provided TEMPORARY() function works as we expect, I think the following
>> steps can
>> use less memory:
>>
>> a = findgen(1000)
>> b = randomu(seed,100)
>> a = shift(TEMPORARY(a), 500)
>> c = [TEMPORARY(b),TEMPORARY(a)]
>> c = Shift(TEMPORARY(c), 500) ; here happens to be 500 too, because
>> 500 = 1000 - 500
>>
>> This solely rely on TEMPORARY function, live or die with it.

--
Xiangyun
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Modifying an array while conserving memory
Next Topic: url_get and idl -rt

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

Current Time: Sun Nov 30 10:51:40 PST 2025

Total time taken to generate the page: 1.36762 seconds