Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

pfor?

Last post 10-27-2007, 1:15 AM by YurySerdyuk. 2 replies.
Sort Posts: Previous Next
 10-25-2007, 5:56 PM 30242673  

pfor?

Hi, this is something I cant get from TBB and I didnt find explined anywhere:

Why one have to call a parallel for in the way it is and not just let the compiler take care of it, lets say

pfor(i=0;ifoo(i);
}

I asked myself this looking at an erlang blog and I would like to find an answer...

salut
s

 
 10-26-2007, 4:00 PM 30242736 in reply to 30242673  

Re: pfor?

I certainly can't speak for Intel, but I imagine that it is the way it is because it's much easier to write a library than a compiler.  Adding a 'pfor' would also be a non-standard language feature.

Microsoft is working on a Parallel FX library for .NET (see: http://pietschsoft.com/Blog/Post.aspx?PostID=1399)

In c# it looks something like this (it uses an anonymous delegate).

Parallel.For(0, 100, delegate(int i) {
   a[i] = a[i] * a[i];
});

The common use of parallel languages is still very much in development.  In a decade I suspect there will be parallel features added to many common languages.

 
 10-27-2007, 1:15 AM 30242743 in reply to 30242736  

Re: pfor?

In a decade I suspect there will be parallel features added to many common languages.

Some example of extension of C# language by the parallel features

is MC# language (www.mcsharp.net).

 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...