[PATCH 1/3] Host-to-device transfer coalescing & magic offset value self-documentation

Julian Brown julian@codesourcery.com
Sat Nov 10 17:11:00 GMT 2018


This patch (by Cesar, with some minor additional changes) replaces usage
of several magic constants in target.c with named macros, and replaces
the flat array of size_t pairs used for coalescing host-to-device copies
with an array of a new struct with start/end fields instead.

Tested and bootstrapped alongside the other patches in this series
(plus the async patches).. OK?

Julian


	ChangeLog

	libgomp/
	* libgomp.h (OFFSET_INLINED, OFFSET_POINTER, OFFSET_STRUCT): Define.
	* target.c (FIELD_TGT_EMPTY): Define.
	(gomp_coalesce_chunk): New.
	(gomp_coalesce_buf): Use above instead of flat array of size_t pairs.
	(gomp_coalesce_buf_add): Adjust for above change.
	(gomp_copy_host2dev): Likewise.
	(gomp_map_val): Use OFFSET_* macros instead of magic constants.  Write
	as switch instead of list of ifs.
	(gomp_map_vars_async): Adjust for gomp_coalesce_chunk change.  Use
	OFFSET_* macros.
---
 libgomp/libgomp.h |   5 +++
 libgomp/target.c  | 101 ++++++++++++++++++++++++++++++++----------------------
 2 files changed, 65 insertions(+), 41 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Host-to-device-transfer-coalescing-magic-offset-valu.patch
Type: text/x-patch
Size: 9444 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181110/5bfd8378/attachment.bin>


More information about the Fortran mailing list