gcc/libgomp
Chung-Lin Tang 6ce1307231 target.c (gomp_device_copy): New function.
libgomp/
2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>

	* target.c (gomp_device_copy): New function.
	(gomp_copy_host2dev): Likewise.
	(gomp_copy_dev2host): Likewise.
	(gomp_free_device_memory): Likewise.
	(gomp_map_vars_existing): Adjust to call gomp_copy_host2dev.
	(gomp_map_pointer): Likewise.
	(gomp_map_vars): Adjust to call gomp_copy_host2dev, handle
	NULL value from alloc_func plugin hook.
	(gomp_unmap_tgt): Adjust to call gomp_free_device_memory.
	(gomp_copy_from_async): Adjust to call gomp_copy_dev2host.
	(gomp_unmap_vars): Likewise.
	(gomp_update): Adjust to call gomp_copy_dev2host and
	gomp_copy_host2dev functions.
	(gomp_unload_image_from_device): Handle false value from
	unload_image_func plugin hook.
	(gomp_init_device): Handle false value from init_device_func
	plugin hook.
	(gomp_exit_data): Adjust to call gomp_copy_dev2host.
	(omp_target_free): Adjust to call gomp_free_device_memory.
	(omp_target_memcpy): Handle return values from host2dev_func,
	dev2host_func, and dev2dev_func plugin hooks.
	(omp_target_memcpy_rect_worker): Likewise.
	(gomp_target_fini): Handle false value from fini_device_func
	plugin hook.
	* libgomp.h (struct gomp_device_descr): Adjust return type of
	init_device_func, fini_device_func, unload_image_func, free_func,
	dev2host_func,host2dev_func, and dev2dev_func plugin hooks to 'bool'.
	* oacc-init.c (acc_shutdown_1): Handle false value from
	fini_device_func plugin hook.
	* oacc-host.c (host_init_device): Change return type to bool.
	(host_fini_device): Likewise.
	(host_unload_image): Likewise.
	(host_free): Likewise.
	(host_dev2host): Likewise.
	(host_host2dev): Likewise.
	* oacc-mem.c (acc_free): Handle plugin hook fatal error case.
	(acc_memcpy_to_device): Likewise.
	(acc_memcpy_from_device): Likewise.
	(delete_copyout): Add libfnname parameter, handle free_func
	hook fatal error case.
	(acc_delete): Adjust delete_copyout call.
	(acc_copyout): Likewise.
	(update_dev_host): Move gomp_mutex_unlock to after
	host2dev/dev2host hook calls.

	* plugin/plugin-hsa.c (hsa_warn): Adjust 'hsa_error' local variable
	to 'hsa_error_msg', for clarity.
	(hsa_fatal): Likewise.
	(hsa_error): New function.
	(init_hsa_context): Change return type to bool, adjust to return
	false on error.
	(GOMP_OFFLOAD_get_num_devices): Adjust to handle init_hsa_context
	return value.
	(GOMP_OFFLOAD_init_device): Change return type to bool, adjust to
	return false on error.
	(get_agent_info): Adjust to return NULL on error.
	(destroy_hsa_program): Change return type to bool, adjust to
	return false on error.
	(GOMP_OFFLOAD_load_image): Adjust to return -1 on error.
	(destroy_module): Change return type to bool, adjust to
	return false on error.
	(GOMP_OFFLOAD_unload_image): Likewise.
	(GOMP_OFFLOAD_fini_device): Likewise.
	(GOMP_OFFLOAD_alloc): Change to return NULL when called.
	(GOMP_OFFLOAD_free): Change to return false when called.
	(GOMP_OFFLOAD_dev2host): Likewise.
	(GOMP_OFFLOAD_host2dev): Likewise.
	(GOMP_OFFLOAD_dev2dev): Likewise.

	* plugin/plugin-nvptx.c (CUDA_CALL_ERET): New convenience macro.
	(CUDA_CALL): Likewise.
	(CUDA_CALL_ASSERT): Likewise.
	(map_init): Change return type to bool, use CUDA_CALL* macros.
	(map_fini): Likewise.
	(init_streams_for_device): Change return type to bool, adjust
	call to map_init.
	(fini_streams_for_device): Change return type to bool, adjust
	call to map_fini.
	(select_stream_for_async): Release stream_lock before calls to
	GOMP_PLUGIN_fatal, adjust call to map_init.
	(nvptx_init): Use CUDA_CALL* macros.
	(nvptx_attach_host_thread_to_device): Change return type to bool,
	use CUDA_CALL* macros.
	(nvptx_open_device): Use CUDA_CALL* macros.
	(nvptx_close_device): Change return type to bool, use CUDA_CALL*
	macros.
	(nvptx_get_num_devices): Use CUDA_CALL* macros.
	(link_ptx): Change return type to bool, use CUDA_CALL* macros.
	(nvptx_exec): Use CUDA_CALL* macros.
	(nvptx_alloc): Use CUDA_CALL* macros.
	(nvptx_free): Change return type to bool, use CUDA_CALL* macros.
	(nvptx_host2dev): Likewise.
	(nvptx_dev2host): Likewise.
	(nvptx_wait): Use CUDA_CALL* macros.
	(nvptx_wait_async): Likewise.
	(nvptx_wait_all): Likewise.
	(nvptx_wait_all_async): Likewise.
	(nvptx_set_cuda_stream): Adjust order of stream_lock acquire,
	use CUDA_CALL* macros, adjust call to map_fini.
	(GOMP_OFFLOAD_init_device): Change return type to bool,
	adjust code accordingly.
	(GOMP_OFFLOAD_fini_device): Likewise.
	(GOMP_OFFLOAD_load_image): Adjust calls to
	nvptx_attach_host_thread_to_device/link_ptx to handle errors,
	use CUDA_CALL* macros.
	(GOMP_OFFLOAD_unload_image): Change return type to bool, adjust
	return code.
	(GOMP_OFFLOAD_alloc): Adjust calls to code to handle error return.
	(GOMP_OFFLOAD_free): Change return type to bool, adjust calls to
	handle error return.
	(GOMP_OFFLOAD_dev2host): Likewise.
	(GOMP_OFFLOAD_host2dev): Likewise.
	(GOMP_OFFLOAD_openacc_register_async_cleanup): Use CUDA_CALL* macros.
	(GOMP_OFFLOAD_openacc_create_thread_data): Likewise.

liboffloadmic/
2016-05-26  Chung-Lin Tang  <cltang@codesourcery.com>

	* plugin/libgomp-plugin-intelmic.cpp (offload): Change return type
	to bool, adjust return code.
	(GOMP_OFFLOAD_init_device): Likewise.
	(GOMP_OFFLOAD_fini_device): Likewise.
	(get_target_table): Likewise.
	(offload_image): Likwise.
	(GOMP_OFFLOAD_load_image): Adjust call to offload_image(), change
	to return -1 on error.
	(GOMP_OFFLOAD_unload_image): Change return type to bool, adjust return
	code.
	(GOMP_OFFLOAD_alloc): Likewise.
	(GOMP_OFFLOAD_free): Likewise.
	(GOMP_OFFLOAD_host2dev): Likewise.
	(GOMP_OFFLOAD_dev2host): Likewise.
	(GOMP_OFFLOAD_dev2dev): Likewise.

From-SVN: r236768
2016-05-26 09:58:56 +00:00
..
config Update copyright years. 2016-01-04 15:30:50 +01:00
plugin target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
testsuite c-parser.c (c_parser_oacc_declare): Add support for GOMP_MAP_FIRSTPRIVATE_POINTER. 2016-05-24 15:54:21 -07:00
ChangeLog target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
ChangeLog.graphite Add forgotten ChangeLog entries. 2010-03-08 17:49:42 +00:00
Makefile.am omp-low.c (lower_omp_ordered): Add argument to GOMP_SMD_ORDERED_* internal calls - 0 if... 2015-11-14 19:42:13 +01:00
Makefile.in libgomp: Use HSA_RUNTIME_LIB, HSA_KMT_LIB in the testsuite 2016-02-02 13:48:31 +01:00
acinclude.m4 Fix Solaris symbol versioning (PR libstdc++/52188) 2012-02-27 13:51:50 +00:00
aclocal.m4 libgomp: Bump to automake 1.11.6 2015-05-13 11:24:38 +00:00
alloc.c Update copyright years. 2016-01-04 15:30:50 +01:00
barrier.c Update copyright years. 2016-01-04 15:30:50 +01:00
config.h.in Merge of HSA 2016-01-19 11:35:10 +01:00
configure libgomp: Use HSA_RUNTIME_LIB, HSA_KMT_LIB in the testsuite 2016-02-02 13:48:31 +01:00
configure.ac [gomp] Add RTEMS configuration 2015-09-03 11:26:36 +00:00
configure.tgt configure.tgt: Add missing ;; in between nvptx and rtems snippets. 2015-09-03 18:20:35 +02:00
critical.c Update copyright years. 2016-01-04 15:30:50 +01:00
env.c Update copyright years. 2016-01-04 15:30:50 +01:00
error.c Update copyright years. 2016-01-04 15:30:50 +01:00
fortran.c Update copyright years. 2016-01-04 15:30:50 +01:00
hashtab.h Update copyright years. 2016-01-04 15:30:50 +01:00
iter.c Update copyright years. 2016-01-04 15:30:50 +01:00
iter_ull.c Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp-plugin.c Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp-plugin.h Merge of HSA 2016-01-19 11:35:10 +01:00
libgomp.h target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
libgomp.map Merge BUILT_IN_GOACC_HOST_DATA into BUILT_IN_GOACC_DATA_START 2016-02-02 14:53:55 +01:00
libgomp.spec.in Generally link to libgomp for -ftree-parallelize-loops=*. 2013-11-07 16:07:34 +01:00
libgomp.texi * libgomp.texi: Updates for OpenACC. 2016-01-12 17:03:03 +00:00
libgomp_f.h.in Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp_g.h libgomp external ABI prototypes maintenance 2016-04-12 15:13:53 +02:00
loop.c Update copyright years. 2016-01-04 15:30:50 +01:00
loop_ull.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-async.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-cuda.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-host.c target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
oacc-init.c target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
oacc-int.h Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-mem.c target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
oacc-parallel.c Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE 2016-03-17 16:07:54 +01:00
oacc-plugin.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-plugin.h Update copyright years. 2016-01-04 15:30:50 +01:00
omp.h.in Update copyright years. 2016-01-04 15:30:50 +01:00
omp_lib.f90.in Update copyright years. 2016-01-04 15:30:50 +01:00
omp_lib.h.in Update copyright years. 2016-01-04 15:30:50 +01:00
openacc.f90 Update copyright years. 2016-01-04 15:30:50 +01:00
openacc.h openacc.c (acc_on_device): Add routine pragma for C++ wrapper. 2016-01-06 15:47:14 +00:00
openacc_lib.h Update copyright years. 2016-01-04 15:30:50 +01:00
ordered.c Update copyright years. 2016-01-04 15:30:50 +01:00
parallel.c Update copyright years. 2016-01-04 15:30:50 +01:00
priority_queue.c Update copyright years. 2016-01-04 15:30:50 +01:00
priority_queue.h Update copyright years. 2016-01-04 15:30:50 +01:00
sections.c Update copyright years. 2016-01-04 15:30:50 +01:00
single.c Update copyright years. 2016-01-04 15:30:50 +01:00
splay-tree.c Update copyright years. 2016-01-04 15:30:50 +01:00
splay-tree.h Update copyright years. 2016-01-04 15:30:50 +01:00
target.c target.c (gomp_device_copy): New function. 2016-05-26 09:58:56 +00:00
task.c omp-low.c (lower_omp_target): Use GOMP_MAP_FIRSTPRIVATE_INT regardless whether there are depend clauses or not. 2016-04-12 09:05:29 +02:00
taskloop.c Update copyright years. 2016-01-04 15:30:50 +01:00
team.c Update copyright years. 2016-01-04 15:30:50 +01:00
work.c Update copyright years. 2016-01-04 15:30:50 +01:00