Hi Illmir,
Ilmir Usmanov:
This patch implements transformation of OpenACC loop directive from
Fortran AST to GENERIC.
If I followed correctly, with this patch the Fortran FE implementation
of OpenACC is complete, except for:
* !$acc cache() - parsing supported, but then aborting with a
not-implemented error
* OpenACC 2.0a additions.
Am I right?
Successfully bootstrapped and tested with no new regressions on
x86_64-unknown-linux-gnu.
OK for gomp4 branch?
I leave the review of gcc/tree-pretty-print.c part (looks good to me) to
Thomas, who might have also a comment to the Fortran part.
For a DO loop, the code looks okay.
For DO CONCURRENT, it is not. I think we should really consider to
reject DO CONCURRENT with a "not permitted"; it is currently not
explicitly supported by OpenACC; I think we can still worry about it,
when it will be explicitly added to OpenACC. Otherwise, see
gfc_trans_do_concurrent for how to handle the do concurrent loops.
Issues with DO CONCURRENT:
* You use "code->ext.iterator->var" - that's fine with DO but not with
DO CONCURRENT, which uses a "code->ext.forall_iterator"
* Do concurrent also handles multiple variables in a single statement,
such as:
integer :: i, j, b(3,5)
DO CONCURRENT(i=1:3, j=1:5:2)
b(i, j) = -42
END DO
end
* And do concurrent also supports masks:
logical :: my_mask(3)
integer :: i, b(3)
b(i) = [5, 5, 2]
my_mask = [.true., .false., .true.]
do concurrent (i=1:3, b(i) == 5 .and. my_mask(i))
b(i) = -42
end do
end
Tobias