target.c (struct gomp_coalesce_buf): New type.
authorJakub Jelinek <jakub@redhat.com>
Sat, 28 Oct 2017 07:02:39 +0000 (09:02 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 28 Oct 2017 07:02:39 +0000 (09:02 +0200)
commit7324369a12e9abe3011f6a0cfd8ef48dd44c4729
tree4508f21797eab3eccc7a20d91a4d188d55e33f78
parentfdfcd5ecc51dc8e7252af21115f10946d490c55b
target.c (struct gomp_coalesce_buf): New type.

* target.c (struct gomp_coalesce_buf): New type.
(MAX_COALESCE_BUF_SIZE, MAX_COALESCE_BUF_GAP): Define.
(gomp_coalesce_buf_add, gomp_to_device_kind_p): New functions.
(gomp_copy_host2dev): Add CBUF argument, if copying into
the cached ranges, memcpy into buffer instead of copying
into device.
(gomp_map_vars_existing, gomp_map_pointer, gomp_map_fields_existing):
Add CBUF argument, pass it through to other calls.
(gomp_map_vars): Aggregate copies from host to device if small enough
and with small enough gaps in between into memcpy into a buffer and
fewer host to device copies from the buffer.
(gomp_update): Adjust gomp_copy_host2dev caller.

From-SVN: r254194
libgomp/ChangeLog
libgomp/target.c