[Fortran][PATCH][gomp4]: Transform OpenACC loop directive

Ilmir Usmanov i.usmanov@samsung.com
Tue Apr 1 17:47:00 GMT 2014


Hi Tobias!

Thanks a lot for your review!

On 26.03.2014 03:16, Tobias Burnus wrote:
>
>>> * And do concurrent also supports masks:
>>>
>> This is doable: generate mask conditions inside of the deepest for 
>> loop (see applied patch).
>>
>
> That will work in the most common cases but not in general. At least 
> it is my understanding that Fortran requires that one first evaluates 
> the mask expression before one enters the loop. That's made explicit 
> for FORALL and DO CONCURRENT uses a forall header and does some refs 
> to FORALL (esp. 7.2.4.2.2 and 7.2.4.2.3), but it does not state so 
> explicitly.
>
I missed that, thanks!

I believe that there is no general way to support nested DO CONCURRENT 
loops with mask expressions if they must be collapsed.

I mean if we have example like

outer: DO CONCURRENT (i=1:5, j=1:5, i .ne. j)
   inner: DO CONCURRENT (i=1:5, b(i,j) .eq. 1)
     ! do something
   ENDDO inner
ENDDO outer

we must generate mask of inner loop inside of outer one. Hence, the loop 
cannot be collapsed.

Is this acceptable?

-- 
Ilmir.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Transform-OpenACC-loop-directive-to-GENERIC.patch
Type: text/x-diff
Size: 16752 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140401/0919330e/attachment.bin>


More information about the Gcc-patches mailing list