comparison libgomp/oacc-plugin.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Copyright (C) 2014-2018 Free Software Foundation, Inc. 1 /* Copyright (C) 2014-2020 Free Software Foundation, Inc.
2 2
3 Contributed by Mentor Embedded. 3 Contributed by Mentor Embedded.
4 4
5 This file is part of the GNU Offloading and Multi Processing Library 5 This file is part of the GNU Offloading and Multi Processing Library
6 (libgomp). 6 (libgomp).
27 /* Initialize and register OpenACC dispatch table from libgomp plugin. */ 27 /* Initialize and register OpenACC dispatch table from libgomp plugin. */
28 28
29 #include "libgomp.h" 29 #include "libgomp.h"
30 #include "oacc-plugin.h" 30 #include "oacc-plugin.h"
31 #include "oacc-int.h" 31 #include "oacc-int.h"
32 #include "acc_prof.h"
32 33
34 /* This plugin function is now obsolete. */
33 void 35 void
34 GOMP_PLUGIN_async_unmap_vars (void *ptr, int async) 36 GOMP_PLUGIN_async_unmap_vars (void *ptr __attribute__((unused)),
37 int async __attribute__((unused)))
35 { 38 {
36 struct target_mem_desc *tgt = ptr; 39 gomp_fatal ("invalid plugin function");
37 struct gomp_device_descr *devicep = tgt->device_descr; 40 }
38 41
39 devicep->openacc.async_set_async_func (async); 42 /* Return the TLS data for the current thread. */
40 gomp_unmap_vars (tgt, true); 43
41 devicep->openacc.async_set_async_func (acc_async_sync); 44 struct goacc_thread *
45 GOMP_PLUGIN_goacc_thread (void)
46 {
47 return goacc_thread ();
42 } 48 }
43 49
44 /* Return the target-specific part of the TLS data for the current thread. */ 50 /* Return the target-specific part of the TLS data for the current thread. */
45 51
46 void * 52 void *
58 gomp_fatal ("invalid dimension argument: %d", i); 64 gomp_fatal ("invalid dimension argument: %d", i);
59 return -1; 65 return -1;
60 } 66 }
61 return goacc_default_dims[i]; 67 return goacc_default_dims[i];
62 } 68 }
69
70 void
71 GOMP_PLUGIN_goacc_profiling_dispatch (acc_prof_info *prof_info,
72 acc_event_info *event_info,
73 acc_api_info *api_info)
74 {
75 goacc_profiling_dispatch (prof_info, event_info, api_info);
76 }