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

Home » Public Forums » archive » 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
Threads in IDL 7.0 [message #63120] Mon, 27 October 2008 05:55 Go to previous message
Bernhard Reinhardt is currently offline  Bernhard Reinhardt
Messages: 26
Registered: October 2008
Junior Member
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
[Message index]
 
Read Message
Read Message
Previous Topic: Moving to objects loses array functionality?
Next Topic: Re: Multiple click region growing

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

Current Time: Fri Oct 10 22:55:44 PDT 2025

Total time taken to generate the page: 1.03717 seconds