This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran][PATCH][gomp4]: Transform OpenACC loop directive
- From: Tobias Burnus <burnus at net-b dot de>
- To: Ilmir Usmanov <i dot usmanov at samsung dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, Slava Garbuzov <v dot garbuzov at samsung dot com>, Evgeny Gavrin <e dot gavrin at samsung dot com>
- Date: Wed, 19 Mar 2014 21:16:24 +0100
- Subject: Re: [Fortran][PATCH][gomp4]: Transform OpenACC loop directive
- Authentication-results: sourceware.org; auth=none
- References: <53299ABC dot 6010407 at samsung dot com>
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