Re: question about tasks, multithreading and multi-cpu machines
- From: "Jeffrey R. Carter" <spam.not.jrcarter@xxxxxxxxxxxxxxxx>
- Date: Fri, 17 Mar 2006 19:42:17 GMT
Maciej Sobczak wrote:
Consider a simple example of two long vectors that need to be added. In the simplest case you do this:
for I in Vector'Range loop
V3(I) := V1(I) + V2(I);
end loop;
and you're done.
No, in all cases you should do
V3 := V1 + V2;
with an appropriate definition of "+" (which may be similar to your example).
Now, assume that you want to target dual-CPU machine and you *know* that you could greatly benefit from making things in paraller.
Then this is part of your requirements, and should be reflected in your design and implementation.
Incidentally, the English word is "parallel".
The interesting problem is writing portable code that takes advantage of N processors (N = 1, 2, 3, ...), with N unknown until run time.
--
Jeff Carter
"The time has come to act, and act fast. I'm leaving."
Blazing Saddles
36
.
- Follow-Ups:
- References:
- question about tasks, multithreading and multi-cpu machines
- From: Norbert Caspari
- Re: question about tasks, multithreading and multi-cpu machines
- From: Jeffrey Creem
- Re: question about tasks, multithreading and multi-cpu machines
- From: Maciej Sobczak
- Re: question about tasks, multithreading and multi-cpu machines
- From: Jeffrey R. Carter
- Re: question about tasks, multithreading and multi-cpu machines
- From: Maciej Sobczak
- question about tasks, multithreading and multi-cpu machines
- Prev by Date: Re: question about tasks, multithreading and multi-cpu machines
- Next by Date: Re: [gnuada] gcc 4.1.0 available
- Previous by thread: Re: question about tasks, multithreading and multi-cpu machines
- Next by thread: Re: question about tasks, multithreading and multi-cpu machines
- Index(es):
Relevant Pages
|
Loading