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

Home » Public Forums » archive » Re: Parallel Processing in IDL
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: Parallel Processing in IDL [message #72822 is a reply to message #72820] Mon, 11 October 2010 09:41 Go to previous messageGo to previous message
Matt[2] is currently offline  Matt[2]
Messages: 69
Registered: March 2007
Member
On Oct 11, 10:35 am, Ammar Yusuf <amyus...@gmail.com> wrote:
> What's an easy way to use multiple processors in IDL? I have a large
> program but I want to start with a simple program first. Let's say I
> have an array of a million integers and I have four processors. I want
> to add all the elements in this array and output it. I could split the
> array into four parts and give it to each processor right? Is this
> possible? How would I do this? Thanks!

I would look at the documentation about thread pool.

In your case
y = total(array)
will take care of what you want to do assuming your thread pool is set
up properly.

from the total documentation:
"This routine is written to make use of IDL's thread pool, which can
increase execution speed on systems with multiple CPUs. The values
stored in the !CPU system variable control whether IDL uses the thread
pool for a given computation. In addition, you can use the thread pool
keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to
override the defaults established by !CPU for a single invocation of
this routine. See Thread Pool Keywords for details. "


Cheers,
Matt
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: move window object programmatically
Next Topic: Adding more to a Window.Save PDF page

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

Current Time: Wed Oct 08 17:08:58 PDT 2025

Total time taken to generate the page: 0.00789 seconds