This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Implementing OpenACC's Fortran module
- From: Tobias Burnus <burnus at net-b dot de>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, jakub at redhat dot com, gcc at gcc dot gnu dot org, James Norris <jnorris at codesourcery dot com>
- Date: Mon, 22 Sep 2014 17:38:14 +0200
- Subject: Re: Implementing OpenACC's Fortran module
- Authentication-results: sourceware.org; auth=none
- References: <53EE5A89 dot 30905 at codesourcery dot com> <20140818093652 dot GA12023 at physik dot fu-berlin dot de> <53F1F025 dot 8080102 at codesourcery dot com> <20140818135104 dot GA8943 at physik dot fu-berlin dot de> <53F29628 dot 401 at codesourcery dot com> <53F3A8FC dot 9030105 at net-b dot de> <53F3B4DB dot 90506 at codesourcery dot com> <53F3CA22 dot 3050704 at net-b dot de> <8738cshytq dot fsf at schwinge dot name> <87bnqc3rte dot fsf at kepler dot schwinge dot homeip dot net> <541D6A5E dot 4000800 at net-b dot de> <8761gflm5g dot fsf at schwinge dot name> <542040E8 dot 8070001 at net-b dot de>
On 22.09.2014 17:31, Tobias Burnus wrote:
In case of OpenACC, the OpenACC semantics require that the argument is
contiguous. If users gets it wrong, it will be wrong either way: If
the variable is not packed and when it is packed (and the temporary
removed after the function call).
Post script: Actually, in some cases, the copy-in/copy-out using a
temporary will actually work: Namely, if one only needs to transfer the
memory once, such that the pointer address does not matter (e.g. only
acc_copyin w/o later copyout or update). Thus, while copy-in/out with a
temporary is bad, passing the unpacked array is worse as it will also
use the wrong values in this special case. â That's another argument for
using CONTIGUOUS also in the INTERFACE block.
Tobias