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

Home » Public Forums » archive » Re: Threads in IDL 7.0
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: Threads in IDL 7.0 [message #63114 is a reply to message #63111] Mon, 27 October 2008 09:46 Go to previous messageGo to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Bernhard Reinhardt wrote:
> Hi,
>
> I have have read the Chapter "Multithreading in IDL" in the IDL-Help. As
> far as I can see some IDL functions use threads.
>
> Basically I want to count elements of a big array that exceed a given
> number.
>
> count=0
> for i = 0, 200000 do begin
> if array[i] ge 10. then count++
> endfor
>
> On my dual-core computer top shows a CPU-load of about 50%. So I guess
> IDL handles this problem single-threaded.
>
> Is there a simple way to split the task. Something like
>
> ;Thread 1
> count1=0
> for i = 0, 100000 do begin
> if array[i] ge 10. then count1++
> endfor
>
> ;Thread 2
> count2=0
> for i = 100001, 200000 do begin
> if array[i] ge 10. then count2++
> endfor
>
> count = count1 + count2
>
> Regards
>
> Bernhard

Bernhard,

You can't get access to the threads directly as far as I know, you might
want to read over:

http://www.ittvis.com/portals/0/whitepapers/IDL_MultiThread. pdf

basically it seems that ITTVIS thought it would be too complicated for
scientists to understand and use.

It makes a certain amount of sense when you think through the
complications of making things thread-safe although I think with a bit
more work they could have delivered something far more useful which
allows people who know what they are doing (or at least think they know
what they are doing) to mess with threads.

Thanks,

Allan
[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: Re: Typeconversion within structure?
Next Topic: Re: DEPTH_TEST_FUNCTION, DEPTH_TEST_DISABLE properties (send an object to back)

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

Current Time: Sun Nov 30 15:56:45 PST 2025

Total time taken to generate the page: 0.48268 seconds