gomp-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gomp-discuss] Start of an OpenMP Implementation Spec


From: Diego Novillo
Subject: Re: [Gomp-discuss] Start of an OpenMP Implementation Spec
Date: Thu, 26 Aug 2004 12:39:25 -0400

On Thu, 2004-08-26 at 12:28, Lars Segerlund wrote:
>  I once had this silly idea of translating a set of openMP programs, ( or 
> rather first collecting them ), representative of what have to be solved into 
> runnable examples for the different systems we would like to support.
> 
>  How about this ?
> 
>  Does anybody think this is stupid ?
> 
>  A set of hand translated examples to run on threaded/clustered machines ?
> 
>  Now I would like some feedback, this would be an easy piece to start
> with, and anybody can do it even if they are not into the inner
> workings of compilers and such.
> 
This is an excellent place to start.

I'll suggest one other first step that you may want to take.  Grab a
copy of the gomp branch from gcc.gnu.org and create a new SSA pass that

Identifies a special switch statement by checking if it's using a
magically named variable (say "__gomp_thread_id").
It adds a function call to some threads library to spawn as many threads
as cases you find in the switch.
Adds the appropriate thread join calls at the end of the switch.

You could start by forcing each case of the switch to be a function call
so that you don't have to build the function bodies yourself (some
thread libraries want to launch functions).

If anyone is interested, I could update the gomp branch from mainline to
get the latest bits.


Diego.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]