Adding parallel for loop construct to clang

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding parallel for loop construct to clang

jignesh vasoya
Hi,
I want clang to parse parallel_for loop construct.
this loop has similar syntax like for loop

parallel_for( init ; cond ; incr )
{
/*body*/
}

what are the file and structure i have to modify for parsing this kind of loop
It will be similar like ForStmt class, how can I add ParallelForStmt class into
existing clang framework
--
------------------------------------------------------------
Jignesh Vasoya
248-Pampa Hostel,
IIT Madras,
India.



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Adding parallel for loop construct to clang

Chris Lattner

On Apr 7, 2011, at 2:16 PM, jignesh vasoya wrote:

> Hi,
> I want clang to parse parallel_for loop construct.
> this loop has similar syntax like for loop
>
> parallel_for( init ; cond ; incr )
> {
> /*body*/
> }
>
> what are the file and structure i have to modify for parsing this kind of loop
> It will be similar like ForStmt class, how can I add ParallelForStmt class into
> existing clang framework

Hi Jignesh,

The best approach is to use ForStmt as an example.  Just look at all the places that define and touch it.

-Chris

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev