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

Home » Public Forums » archive » vectorization challenge! (help!)
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: vectorization challenge! (help!) [message #54906 is a reply to message #54844] Thu, 19 July 2007 06:33 Go to previous messageGo to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Odd, I tried to answer this yesterday and it got lost in the bits I
guess.

I have one suggestion that I often use that might kick start your
thinking on this.

instead of doing this in the loop
if randomu(seed,1) lt cutoff then begin
try making a mask outside of the loop
mask = randomu(seed, npeeps) lt cutoff
this returns a byte array (so its small) of 1's and 0's then at worst
you only have to loop over the 1's or at best can use where to just
perform an operation on the 1's.

I find that this kind of thing is often the secret to fixing this kind
of code.

Cheers,

Brian

------------------------------------------------------------ ---------------------
Brian Larsen
Boston University
Center for Space Physics
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: warp_tri()
Next Topic: Re: how can idl find out information of other softwares

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

Current Time: Sat Oct 11 10:21:53 PDT 2025

Total time taken to generate the page: 1.67590 seconds