Re: Issue with _Cilk_for

2014-01-31 Thread Jakub Jelinek
On Wed, Jan 29, 2014 at 10:58:55PM +, Iyer, Balaji V wrote: This is the testcase I am using: _Cilk_for (vectorint::iterator iter = array.begin(); iter != array.end(); iter++) { if (*iter == 6) *iter = 13; }

Re: Issue with _Cilk_for

2014-01-31 Thread Jakub Jelinek
On Fri, Jan 31, 2014 at 04:42:57PM +0100, Jakub Jelinek wrote: Can you explain why you emit anything in between the parallel and _Cilk_for? I don't see why it should be needed. Depending on what the Cilk+ standard allows you to do (can array.begin () be evaluated multiple times or not, and if

RE: Issue with _Cilk_for

2014-01-31 Thread Iyer, Balaji V
-Original Message- From: Jakub Jelinek [mailto:ja...@redhat.com] Sent: Friday, January 31, 2014 11:04 AM To: Iyer, Balaji V Cc: gcc-patches@gcc.gnu.org Subject: Re: Issue with _Cilk_for On Fri, Jan 31, 2014 at 04:42:57PM +0100, Jakub Jelinek wrote: Can you explain why you emit

Re: Issue with _Cilk_for

2014-01-31 Thread Jakub Jelinek
On Fri, Jan 31, 2014 at 04:18:28PM +, Iyer, Balaji V wrote: I tried to do this. The thing is, you had me model like this: #pragma omp parallel for _Cilk_for (...) { Body } Now, the compiler will do something like this: #pragma OMP parallel { #pragma Omp for

RE: Issue with _Cilk_for

2014-01-31 Thread Iyer, Balaji V
-Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- ow...@gcc.gnu.org] On Behalf Of Jakub Jelinek Sent: Friday, January 31, 2014 11:26 AM To: Iyer, Balaji V Cc: gcc-patches@gcc.gnu.org Subject: Re: Issue with _Cilk_for On Fri, Jan 31, 2014 at 04:18:28PM