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

Home » Public Forums » archive » Re: Fast shear
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: Fast shear [message #29179 is a reply to message #29122] Thu, 07 February 2002 09:41 Go to previous messageGo to previous message
k-bowman is currently offline  k-bowman
Messages: 12
Registered: December 2001
Junior Member
In article <3C60199D.E4810C70@mpb.gsfc.nasa.gov>, Wayne Landsman <landsman@mpb.gsfc.nasa.gov> wrote:

> for i = 0, n-1 DO array[*,i] = SHIFT(array[*,i],delta[i])
>
> which in this case means to rewrite the assignment as
>
> for i = 0, n-1 DO array[0,i] = SHIFT(array[*,i],delta[i])
>
> I believe that one uses an asterisk on the left hand side, that
> IDL first creates a temporary variable, places the contents of the right
> hand side into this temporary variable, and then places the temporary
> variable back into array. By specifying array[0,i] one directly
> gives the starting location where to place the contents of the right
> hand side.

I thought that using an asterisk on the LHS meant that IDL created a temporary index array, i.e.

for i = 0, n-1 DO array[[0,1,2,3,...,m-1],i] = SHIFT(array[*,i],delta[i])

where m is the size of the first dimension. The slow down is due to the the indirect array indexing.

The fast method (e.g., array[0,i] = ...) specifies where to start storing the RHS, so it only works for the first dimension (that is, in memory order).

Ken
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: StrSplit wont port to Windows?
Next Topic: Re: Slow array indexing

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

Current Time: Wed Oct 08 17:30:09 PDT 2025

Total time taken to generate the page: 0.00442 seconds