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

Home » Public Forums » archive » Strange memory problem
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: Strange memory problem [message #18403 is a reply to message #18337] Thu, 23 December 1999 00:00 Go to previous messageGo to previous message
Terry Smith is currently offline  Terry Smith
Messages: 2
Registered: December 1999
Junior Member
----------
In article <gdj84.46$O3.1036@uchinews>, rivers@cars3.uchicago.edu (Mark
Rivers) wrote:


> In article <83rfkn$826$1@nnrp1.deja.com>, Peter Mason
> <menakkis@my-deja.com> writes:
>> rkj@dukebar.crml.uab.edu (R. Kyle Justice) wrote:
>> <...>
>>> Actually I should have given my real problem rather than a
>>> simplified version of it. Acutally I have two big arrays of
>>> equal size and I am trying to copy one into the other:
>>>
>>> temp1(*)=temp2
>> <...>
>>
>> The best way I know of to do this sort of thing (in IDL) is to use
>> array-insertion starting offsets.
>> e.g., If you have 2-dimensional arrays and you want to copy one on top
>> of another, do: TEMP1(0,0)=TEMP2.
>> This is much, *much* more efficient than using '*'. It also converts
>> what it copies to the datatype of TEMP1 if necessary.
>> This issue goes back a long way, so I'd expect the "solution" to work
>> on PV-Wave as well.
>
> This is definitely the best way to do this. Note that you don't need both
> subscripts. You can just say:
> a = bytarr(100,100,25)+10b ; Create array of all 10's
> b = bytarr(100,100,25) ; Create a zero filled array
> b(0) = a ; This copies a into b
>
>
> Mark Rivers


This is faster than the straightforward:

b=a
or
b=temporary(a)

???

JD

>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to find the TLB of a widget
Next Topic: Tip: how to mix object gui with command line

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

Current Time: Wed Oct 08 19:21:00 PDT 2025

Total time taken to generate the page: 0.00456 seconds