Nikhil,

Try using "in" as a forall intent. That should give you task-private variables 
in a forall loop.

Vassily

On 03/21/16 17:04, Nikhil Padmanabhan wrote:
> Dear all,
>
> For the code executing inside a forall loop, is there any way in which it
> can determine what its "thread" id is?
>
> I'm imagining a case here where I need to call a function that takes in
> some state variable (eg. like a random number generator) that it might
> modify. The simplest way I can think of doing this in parallel would be to
> have Nthread copies of the state variable, and then every thread just
> modifies its own copy.
>
> I can certainly do this using a coforall loop; I was just curious if there
> was a way to do this even in forall loops....
>
> Thanks!
> -- Nikhil
> ---------------------------------
> Nikhil Padmanabhan
> [email protected]
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
>
>
>
> _______________________________________________
> Chapel-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chapel-users
>

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to