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

Home » Public Forums » archive » Re: Assignment Time for a 3d Variable
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: Assignment Time for a 3d Variable [message #46470 is a reply to message #46466] Wed, 23 November 2005 09:51 Go to previous messageGo to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
On Wed, 2005-11-23 at 08:52 -0800, David Streutker wrote:
> David Fanning wrote:
>> The speed differences have to do with how you access different
>> parts of the array in memory. If the parts you want are contiguous,
>> then you can get them faster than you can if they are far apart in
>> memory. (Think how much faster it is to pick up the poker
>> chips when they are stacked than when they are scattered all
>> around the table.)
>>
>> To make these kinds of assignments as fast as possible, use
>> the TRANSPOSE function to organize the data into the fastest
>> possible position:
>>
>> IDL> Help, data
>> DATA BYTE = Array[3, 227, 149]
>> IDL> data = Transpose( Temporary(data), [2,3,1] )
>> IDL> Help, data
>> DATA BYTE = Array[227, 149, 3]
>
> How does one know which is the fastest possible position? Should the
> largest dimension be first? Nuno's example seems to imply that the
> first dimension is not the fastest accessed.
>
> -Dave
>

Also I note that it depends on the language IDL is implemented. By
default all ANSI C compilers use row major mode.
See the other post for the link to an example :)

--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating Panels in iTools
Next Topic: How should I mark annotations in multi plot window

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

Current Time: Wed Oct 08 19:34:03 PDT 2025

Total time taken to generate the page: 0.00375 seconds