1 2014-12-22 Thomas Schwinge <thomas@codesourcery.com>
3 * plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_name): Return "nvptx".
4 * oacc-init.c (resolve_device): Update for that using...
5 (get_openacc_name): ... this new function.
7 * testsuite/libgomp-test-support.exp.in
8 (offload_additional_options, offload_additional_lib_paths): Don't
10 * configure.ac: Instantiate testsuite/libgomp-test-support.pt.exp
11 instead of testsuite/libgomp-test-support.exp.
12 * testsuite/Makefile.am (libgomp-test-support.exp): New rule.
13 (all-local): Depend on it.
14 * configure: Regenerate.
15 * testsuite/Makefile.in: Likewise.
17 2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
18 Tom de Vries <tom@codesourcery.com>
20 * target.c (GOMP_target, GOMP_target_data, GOMP_target_update):
21 Prevent NULL pointer dereference.
23 * testsuite/lib/libgomp.exp: Set offload_targets_s, and
24 offload_targets_s_openacc.
25 (check_effective_target_openacc_nvidia_accel_selected): Look for
26 global offload_target_openacc instead of ACC_DEVICE_TYPE
28 * testsuite/libgomp.oacc-c++/c++.exp: Loop through
29 offload_targets_s_openacc.
30 * testsuite/libgomp.oacc-c/c.exp: Likewise.
31 * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
33 2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
35 * testsuite/Makefile.am: Don't export OFFLOAD_TARGETS,
36 OFFLOAD_ADDITIONAL_OPTIONS, and OFFLOAD_ADDITIONAL_LIB_PATHS...
37 * testsuite/libgomp-test-support.exp.in: ..., and instead set
38 offload_targets, offload_additional_options, and
39 offload_additional_lib_paths here. Update all users.
41 * testsuite/libgomp.oacc-c++/c++.exp
42 (check_effective_target_oacc_c): Remove, and ...
43 * testsuite/libgomp.oacc-c/c.exp (check_effective_target_oacc_c):
44 ... likewise. Update all users.
46 2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
47 James Norris <jnorris@codesourcery.com>
48 Cesar Philippidis <cesar@codesourcery.com>
49 Tom de Vries <tom@codesourcery.com>
51 * testsuite/libgomp.oacc-c-c++-common/abort-3.c: New file.
52 * testsuite/libgomp.oacc-c-c++-common/abort-4.c: Likewise.
53 * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
54 * testsuite/libgomp.oacc-c-c++-common/collapse-1.c: Likewise.
55 * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise.
56 * testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Likewise.
57 * testsuite/libgomp.oacc-c-c++-common/kernels-empty.c: Likewise.
58 * testsuite/libgomp.oacc-c-c++-common/parallel-empty.c: Likewise.
59 * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise.
60 * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
61 * testsuite/libgomp.oacc-fortran/collapse-3.f90: Likewise.
62 * testsuite/libgomp.oacc-fortran/collapse-4.f90: Likewise.
63 * testsuite/libgomp.oacc-fortran/collapse-5.f90: Likewise.
64 * testsuite/libgomp.oacc-fortran/collapse-6.f90: Likewise.
65 * testsuite/libgomp.oacc-fortran/collapse-7.f90: Likewise.
66 * testsuite/libgomp.oacc-fortran/collapse-8.f90: Likewise.
67 * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Update.
68 * testsuite/libgomp.oacc-c/collapse-4.c: Remove.
70 2014-12-17 James Norris <jnorris@codesourcery.com>
72 * testsuite/libgomp.oacc-c-c++-common/subr.h: New file.
73 * testsuite/libgomp.oacc-c-c++-common/subr.cu: Remove.
75 2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
77 * testsuite/libgomp.oacc-c++/c++.exp: Don't add -flto to
79 * testsuite/libgomp.oacc-c/c.exp: Likewise.
80 * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
81 * oacc-parallel.c (GOACC_parallel): Update error message.
83 * libgomp_g.h: Move internal stuff from here...
84 * libgomp_target.h: ..., and here...
85 * libgomp.h: ... into here.
87 * Makefile.am: Don't add ../include/gomp-constants.h to
88 nodist_libsubinclude_HEADERS.
90 * openacc.h: Don't include "gomp-constants.h".
92 * oacc-parallel.c (dump_var): Remove.
94 2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
95 Julian Brown <julian@codesourcery.com>
96 David Malcolm <dmalcolm@redhat.com>
98 * configure.ac: Rename from GNU OpenMP Runtime Library to GNU
99 Offloading and Multi Processing Runtime Library. Change all
102 2014-12-17 Thomas Schwinge <thomas@codesourcery.com>
103 Julian Brown <julian@codesourcery.com>
105 * plugin/Makefile.am: Rework into...
106 * plugin/Makefrag.am: ... this new file, and
107 * plugin/configure.ac: rework into...
108 * plugin/configfrag.ac: ... this new file. Change all users.
109 * configure.ac: Move plugin/offloading handling...
110 * plugin/configfrag.ac: ... here.
112 * env.c (initialize_env): Don't look for GCC_ACC_NOTIFY but for
113 GOMP_DEBUG. Document it in the libgomp manual.
114 * libgomp-plugin.h: Rename GOMP_PLUGIN_notify to
115 GOMP_PLUGIN_debug. Change all users.
116 * libgomp.h: Rename goacc_notify_var to gomp_debug_var,
117 gomp_vnotify to gomp_vdebug, and gomp_notify to gomp_debug.
118 Change all users. Add kind argument to gomp_vdebug and
119 gomp_debug. Change all users.
121 * libgomp_g.h: Remove names of formal parameters.
123 * libgomp_target.h: Rename ACC_dispatch_t to acc_dispatch_t.
125 * oacc-init.c: Rename _acc_init to acc_init_1, and _acc_shutdown
126 to acc_shutdown_1. Change all users.
127 * oacc-int.h: Rename ACC_register to goacc_register,
128 ACC_runtime_initialize to goacc_runtime_initialize,
129 ACC_save_and_set_bind to goacc_save_and_set_bind, ACC_restore_bind
130 to goacc_restore_bind, and ACC_lazy_initialize to
131 goacc_lazy_initialize. Change all users.
132 * plugin/plugin-nvptx.c: Rename cuErrorList to cuda_errlist,
133 cuErrorMsg to cuda_error, cuSymNames to cuda_symnames, PTX_inited
134 to ptx_inited, PTX_stream to ptx_stream, PTX_device to ptx_device,
135 PTX_event to ptx_event, PTX_event_type to ptx_event_type, PTX_init
136 to nvptx_init, , PTX_fini to nvptx_fini, PTX_open_device to
137 nvptx_open_device, PTX_close_device to nvptx_close_device,
138 PTX_get_num_devices to nvptx_get_num_devices, PTX_exec to
139 nvptx_exec, PTX_alloc to nvptx_alloc, PTX_free to nvptx_free,
140 PTX_host2dev to nvptx_host2dev, PTX_dev2host to nvptx_dev2host,
141 PTX_set_async to nvptx_set_async, PTX_async_test to
142 nvptx_async_test, PTX_async_test_all to nvptx_async_test_all,
143 PTX_wait to nvptx_wait, PTX_wait_async to nvptx_wait_async,
144 PTX_wait_all to nvptx_wait_all, PTX_wait_all_async to
145 nvptx_wait_all_async, PTX_get_current_cuda_device to
146 nvptx_get_current_cuda_device, PTX_get_current_cuda_context to
147 nvptx_get_current_cuda_context, PTX_get_cuda_stream to
148 nvptx_get_cuda_stream, PTX_set_cuda_stream to
149 nvptx_set_cuda_stream. Change all users.
151 * oacc-parallel.c (GOACC_kernels): Pass 0 instead of num_waits in
152 GOACC_parallel invocation.
154 * plugin/plugin-host.c: Remove all DEBUG code.
155 * plugin/plugin-nvptx.c: Likewise.
157 * plugin/plugin-host.c (GOMP_OFFLOAD_get_caps): Don't claim
158 TARGET_CAP_OPENMP_400.
160 * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Restrict to target
161 openacc_nvidia_accel_selected.
163 * testsuite/libgomp.oacc-c-c++-common/lib-38.c: Remove wrong
166 * testsuite/libgomp.oacc-c-c++-common/lib-9.c: Fix wrong check.
168 2014-11-14 Tom de Vries <tom@codesourcery.com>
170 * Makefile.am: Add missing dependency "openacc.mod: openacc.lo".
171 * Makefile.in: Regenerate.
173 2014-11-14 Tom de Vries <tom@codesourcery.com>
175 * configure.tgt: Handle case that $enable_linux_futex is empty.
177 2014-11-14 Thomas Schwinge <thomas@codesourcery.com>
179 * libgomp.texi (Reporting Bugs): Mention the "openacc" Bugzilla
182 2014-11-13 Thomas Schwinge <thomas@codesourcery.com>
184 * testsuite/libgomp.oacc-c-c++-common/context-2.c: Fix data
187 * target.c (gomp_map_vars_existing): Error out if "force"
189 (gomp_map_vars): Actually pass kinds to gomp_map_vars_existing.
191 * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: New file.
192 * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
193 * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
194 * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
195 * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
196 * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
197 * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
198 * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
199 * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
200 * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
201 * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
202 * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
203 * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
204 * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
205 * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
206 * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
208 2014-11-12 Thomas Schwinge <thomas@codesourcery.com>
210 * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: New file.
211 * testsuite/libgomp.oacc-c/collapse-4.c: Turn into an execution
213 * testsuite/libgomp.oacc-c-c++-common/data-2.c: Update.
214 * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
216 2014-11-11 Thomas Schwinge <thomas@codesourcery.com>
218 * plugin-nvptx.c: Remove.
220 2014-11-07 Tom de Vries <tom@codesourcery.com>
222 * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Skip for shared memory
224 (main): Use acc_device_default instead of acc_device_nvidia.
226 2014-11-06 Julian Brown <julian@codesourcery.com>
228 * oacc-init.c (resolve_device, _acc_init): Fix init_device_func
230 * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_avail): Remove.
231 (host_dispatch): Don't set avail_func hook.
232 * plugin/configure.ac (libgomp-test-support.exp): Add to
234 * plugin/configure: Regenerate.
235 * testsuite/libgomp-test-support.exp.in: Move from here...
236 * plugin/libgomp-test-support.exp.in: ...to here.
237 * plugin/Makefile.in: Regenerate.
238 * testsuite/lib/libgomp.exp (libgomp-test-support.exp): Find in
240 * testsuite/Makefile.in: Regenerate.
241 * configure.ac (testsuite/libgomp-test-support.exp): Remove from
243 * config.h.in: Regenerate.
244 * configure: Regenerate.
246 2014-11-05 Julian Brown <julian@codesourcery.com>
248 * Makefile.am (SUBDIRS): Add plugin.
249 (DIST_SUBDIRS): Define.
250 (libgomp_plugin_nvptx_*): Remove nvptx support from here.
251 (libgomp_plugin_host_nonshm_*): Likewise.
252 * Makefile.in: Regenerate.
253 * configure: Regenerate.
254 * oacc-host.c: Replace with #include of plugin/plugin-host.c code,
255 move implementation to the latter.
256 * plugin/plugin-host.c: New file.
257 * plugin-nvptx.c: Copy to...
258 * plugin/plugin-nvptx.c: New file.
259 * plugin/Makefile.am: New.
260 * plugin/Makefile.in: Regenerate.
261 * plugin/aclocal.m4: Regenerate.
262 * plugin/configure: Regenerate.
264 2014-11-05 Julian Brown <julian@codesourcery.com>
266 * oacc-host.c: Add GOMP_OFFLOAD_ prefix for plugin hooks. Rename
267 device_init to init_device, device_fini to fini_device,
268 offload_register to register_image and remove extraneous "device_"
269 from device_alloc, device_free, device_dev2host, device_host2dev and
271 (host_dispatch): Use new names for hooks.
272 * oacc-init.c: Use new names for hooks, throughout.
273 * plugin-nvptx.c: Likewise.
274 * target.c: Likewise.
275 (gomp_load_plugin_for_device): Likewise. Look for new hook names.
276 * target.h (gomp_device_descr): Use new hook names.
278 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
280 * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: New file.
281 * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
282 * testsuite/libgomp.oacc-fortran/data-4.f90: In one instance, use
283 the self clause instead of host clause.
285 * testsuite/libgomp.oacc-c/cache-1.c: Remove directives that are
286 expected to fail, and rename the file to...
287 * testsuite/libgomp.oacc-c-c++-common/cache-1.c: ... this.
288 * testsuite/libgomp.oacc-c++/cache-1.C: Remove file.
290 2014-11-05 James Norris <jnorris@codesourcery.com>
292 * testsuite/libgomp.oacc-c/cache-1.c: New file.
293 * testsuite/libgomp.oacc-c++/cache-1.C: Likewise.
295 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
296 James Norris <jnorris@codesourcery.com>
298 * testsuite/libgomp.oacc-c++/c++.exp: Enable
299 libgomp.oacc-c-c++-common testing.
300 * testsuite/libgomp.oacc-c/c.exp: Likewise.
301 * testsuite/libgomp.oacc-c/abort-2.c: Rename to...
302 * testsuite/libgomp.oacc-c-c++-common/abort-2.c: ... this.
303 * testsuite/libgomp.oacc-c/abort.c: Rename to...
304 * testsuite/libgomp.oacc-c-c++-common/abort.c: ... this.
305 * testsuite/libgomp.oacc-c/acc_on_device-1.c: Rename to...
306 * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: ... this.
307 * testsuite/libgomp.oacc-c/clauses-1.c: Rename to...
308 * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: ... this.
309 * testsuite/libgomp.oacc-c/clauses-2.c: Rename to...
310 * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: ... this.
311 * testsuite/libgomp.oacc-c/context-1.c: Rename to...
312 * testsuite/libgomp.oacc-c-c++-common/context-1.c: ... this.
313 * testsuite/libgomp.oacc-c/context-2.c: Rename to...
314 * testsuite/libgomp.oacc-c-c++-common/context-2.c: ... this.
315 * testsuite/libgomp.oacc-c/context-3.c: Rename to...
316 * testsuite/libgomp.oacc-c-c++-common/context-3.c: ... this.
317 * testsuite/libgomp.oacc-c/context-4.c: Rename to...
318 * testsuite/libgomp.oacc-c-c++-common/context-4.c: ... this.
319 * testsuite/libgomp.oacc-c/data-1.c: Rename to...
320 * testsuite/libgomp.oacc-c-c++-common/data-1.c: ... this.
321 * testsuite/libgomp.oacc-c/data-2.c: Rename to...
322 * testsuite/libgomp.oacc-c-c++-common/data-2.c: ... this.
323 * testsuite/libgomp.oacc-c/data-3.c: Rename to...
324 * testsuite/libgomp.oacc-c-c++-common/data-3.c: ... this.
325 * testsuite/libgomp.oacc-c/deviceptr-1.c: Rename to...
326 * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: ... this.
327 * testsuite/libgomp.oacc-c/if-1.c: Rename to...
328 * testsuite/libgomp.oacc-c-c++-common/if-1.c: ... this.
329 * testsuite/libgomp.oacc-c/kernels-1.c: Rename to...
330 * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: ... this.
331 * testsuite/libgomp.oacc-c/lib-1.c: Rename to...
332 * testsuite/libgomp.oacc-c-c++-common/lib-1.c: ... this.
333 * testsuite/libgomp.oacc-c/lib-10.c: Rename to...
334 * testsuite/libgomp.oacc-c-c++-common/lib-10.c: ... this.
335 * testsuite/libgomp.oacc-c/lib-11.c: Rename to...
336 * testsuite/libgomp.oacc-c-c++-common/lib-11.c: ... this.
337 * testsuite/libgomp.oacc-c/lib-12.c: Rename to...
338 * testsuite/libgomp.oacc-c-c++-common/lib-12.c: ... this.
339 * testsuite/libgomp.oacc-c/lib-13.c: Rename to...
340 * testsuite/libgomp.oacc-c-c++-common/lib-13.c: ... this.
341 * testsuite/libgomp.oacc-c/lib-14.c: Rename to...
342 * testsuite/libgomp.oacc-c-c++-common/lib-14.c: ... this.
343 * testsuite/libgomp.oacc-c/lib-15.c: Rename to...
344 * testsuite/libgomp.oacc-c-c++-common/lib-15.c: ... this.
345 * testsuite/libgomp.oacc-c/lib-16.c: Rename to...
346 * testsuite/libgomp.oacc-c-c++-common/lib-16.c: ... this.
347 * testsuite/libgomp.oacc-c/lib-17.c: Rename to...
348 * testsuite/libgomp.oacc-c-c++-common/lib-17.c: ... this.
349 * testsuite/libgomp.oacc-c/lib-18.c: Rename to...
350 * testsuite/libgomp.oacc-c-c++-common/lib-18.c: ... this.
351 * testsuite/libgomp.oacc-c/lib-19.c: Rename to...
352 * testsuite/libgomp.oacc-c-c++-common/lib-19.c: ... this.
353 * testsuite/libgomp.oacc-c/lib-2.c: Rename to...
354 * testsuite/libgomp.oacc-c-c++-common/lib-2.c: ... this.
355 * testsuite/libgomp.oacc-c/lib-20.c: Rename to...
356 * testsuite/libgomp.oacc-c-c++-common/lib-20.c: ... this.
357 * testsuite/libgomp.oacc-c/lib-21.c: Rename to...
358 * testsuite/libgomp.oacc-c-c++-common/lib-21.c: ... this.
359 * testsuite/libgomp.oacc-c/lib-22.c: Rename to...
360 * testsuite/libgomp.oacc-c-c++-common/lib-22.c: ... this.
361 * testsuite/libgomp.oacc-c/lib-23.c: Rename to...
362 * testsuite/libgomp.oacc-c-c++-common/lib-23.c: ... this.
363 * testsuite/libgomp.oacc-c/lib-24.c: Rename to...
364 * testsuite/libgomp.oacc-c-c++-common/lib-24.c: ... this.
365 * testsuite/libgomp.oacc-c/lib-25.c: Rename to...
366 * testsuite/libgomp.oacc-c-c++-common/lib-25.c: ... this.
367 * testsuite/libgomp.oacc-c/lib-26.c: Rename to...
368 * testsuite/libgomp.oacc-c-c++-common/lib-26.c: ... this.
369 * testsuite/libgomp.oacc-c/lib-27.c: Rename to...
370 * testsuite/libgomp.oacc-c-c++-common/lib-27.c: ... this.
371 * testsuite/libgomp.oacc-c/lib-28.c: Rename to...
372 * testsuite/libgomp.oacc-c-c++-common/lib-28.c: ... this.
373 * testsuite/libgomp.oacc-c/lib-29.c: Rename to...
374 * testsuite/libgomp.oacc-c-c++-common/lib-29.c: ... this.
375 * testsuite/libgomp.oacc-c/lib-3.c: Rename to...
376 * testsuite/libgomp.oacc-c-c++-common/lib-3.c: ... this.
377 * testsuite/libgomp.oacc-c/lib-30.c: Rename to...
378 * testsuite/libgomp.oacc-c-c++-common/lib-30.c: ... this.
379 * testsuite/libgomp.oacc-c/lib-31.c: Rename to...
380 * testsuite/libgomp.oacc-c-c++-common/lib-31.c: ... this.
381 * testsuite/libgomp.oacc-c/lib-32.c: Rename to...
382 * testsuite/libgomp.oacc-c-c++-common/lib-32.c: ... this.
383 * testsuite/libgomp.oacc-c/lib-33.c: Rename to...
384 * testsuite/libgomp.oacc-c-c++-common/lib-33.c: ... this.
385 * testsuite/libgomp.oacc-c/lib-34.c: Rename to...
386 * testsuite/libgomp.oacc-c-c++-common/lib-34.c: ... this.
387 * testsuite/libgomp.oacc-c/lib-35.c: Rename to...
388 * testsuite/libgomp.oacc-c-c++-common/lib-35.c: ... this.
389 * testsuite/libgomp.oacc-c/lib-36.c: Rename to...
390 * testsuite/libgomp.oacc-c-c++-common/lib-36.c: ... this.
391 * testsuite/libgomp.oacc-c/lib-37.c: Rename to...
392 * testsuite/libgomp.oacc-c-c++-common/lib-37.c: ... this.
393 * testsuite/libgomp.oacc-c/lib-38.c: Rename to...
394 * testsuite/libgomp.oacc-c-c++-common/lib-38.c: ... this.
395 * testsuite/libgomp.oacc-c/lib-39.c: Rename to...
396 * testsuite/libgomp.oacc-c-c++-common/lib-39.c: ... this.
397 * testsuite/libgomp.oacc-c/lib-4.c: Rename to...
398 * testsuite/libgomp.oacc-c-c++-common/lib-4.c: ... this.
399 * testsuite/libgomp.oacc-c/lib-40.c: Rename to...
400 * testsuite/libgomp.oacc-c-c++-common/lib-40.c: ... this.
401 * testsuite/libgomp.oacc-c/lib-41.c: Rename to...
402 * testsuite/libgomp.oacc-c-c++-common/lib-41.c: ... this.
403 * testsuite/libgomp.oacc-c/lib-42.c: Rename to...
404 * testsuite/libgomp.oacc-c-c++-common/lib-42.c: ... this.
405 * testsuite/libgomp.oacc-c/lib-43.c: Rename to...
406 * testsuite/libgomp.oacc-c-c++-common/lib-43.c: ... this.
407 * testsuite/libgomp.oacc-c/lib-44.c: Rename to...
408 * testsuite/libgomp.oacc-c-c++-common/lib-44.c: ... this.
409 * testsuite/libgomp.oacc-c/lib-45.c: Rename to...
410 * testsuite/libgomp.oacc-c-c++-common/lib-45.c: ... this.
411 * testsuite/libgomp.oacc-c/lib-46.c: Rename to...
412 * testsuite/libgomp.oacc-c-c++-common/lib-46.c: ... this.
413 * testsuite/libgomp.oacc-c/lib-47.c: Rename to...
414 * testsuite/libgomp.oacc-c-c++-common/lib-47.c: ... this.
415 * testsuite/libgomp.oacc-c/lib-48.c: Rename to...
416 * testsuite/libgomp.oacc-c-c++-common/lib-48.c: ... this.
417 * testsuite/libgomp.oacc-c/lib-49.c: Rename to...
418 * testsuite/libgomp.oacc-c-c++-common/lib-49.c: ... this.
419 * testsuite/libgomp.oacc-c/lib-5.c: Rename to...
420 * testsuite/libgomp.oacc-c-c++-common/lib-5.c: ... this.
421 * testsuite/libgomp.oacc-c/lib-50.c: Rename to...
422 * testsuite/libgomp.oacc-c-c++-common/lib-50.c: ... this.
423 * testsuite/libgomp.oacc-c/lib-51.c: Rename to...
424 * testsuite/libgomp.oacc-c-c++-common/lib-51.c: ... this.
425 * testsuite/libgomp.oacc-c/lib-52.c: Rename to...
426 * testsuite/libgomp.oacc-c-c++-common/lib-52.c: ... this.
427 * testsuite/libgomp.oacc-c/lib-53.c: Rename to...
428 * testsuite/libgomp.oacc-c-c++-common/lib-53.c: ... this.
429 * testsuite/libgomp.oacc-c/lib-54.c: Rename to...
430 * testsuite/libgomp.oacc-c-c++-common/lib-54.c: ... this.
431 * testsuite/libgomp.oacc-c/lib-55.c: Rename to...
432 * testsuite/libgomp.oacc-c-c++-common/lib-55.c: ... this.
433 * testsuite/libgomp.oacc-c/lib-56.c: Rename to...
434 * testsuite/libgomp.oacc-c-c++-common/lib-56.c: ... this.
435 * testsuite/libgomp.oacc-c/lib-57.c: Rename to...
436 * testsuite/libgomp.oacc-c-c++-common/lib-57.c: ... this.
437 * testsuite/libgomp.oacc-c/lib-58.c: Rename to...
438 * testsuite/libgomp.oacc-c-c++-common/lib-58.c: ... this.
439 * testsuite/libgomp.oacc-c/lib-59.c: Rename to...
440 * testsuite/libgomp.oacc-c-c++-common/lib-59.c: ... this.
441 * testsuite/libgomp.oacc-c/lib-6.c: Rename to...
442 * testsuite/libgomp.oacc-c-c++-common/lib-6.c: ... this.
443 * testsuite/libgomp.oacc-c/lib-60.c: Rename to...
444 * testsuite/libgomp.oacc-c-c++-common/lib-60.c: ... this.
445 * testsuite/libgomp.oacc-c/lib-61.c: Rename to...
446 * testsuite/libgomp.oacc-c-c++-common/lib-61.c: ... this.
447 * testsuite/libgomp.oacc-c/lib-62.c: Rename to...
448 * testsuite/libgomp.oacc-c-c++-common/lib-62.c: ... this.
449 * testsuite/libgomp.oacc-c/lib-63.c: Rename to...
450 * testsuite/libgomp.oacc-c-c++-common/lib-63.c: ... this.
451 * testsuite/libgomp.oacc-c/lib-64.c: Rename to...
452 * testsuite/libgomp.oacc-c-c++-common/lib-64.c: ... this.
453 * testsuite/libgomp.oacc-c/lib-65.c: Rename to...
454 * testsuite/libgomp.oacc-c-c++-common/lib-65.c: ... this.
455 * testsuite/libgomp.oacc-c/lib-66.c: Rename to...
456 * testsuite/libgomp.oacc-c-c++-common/lib-66.c: ... this.
457 * testsuite/libgomp.oacc-c/lib-67.c: Rename to...
458 * testsuite/libgomp.oacc-c-c++-common/lib-67.c: ... this.
459 * testsuite/libgomp.oacc-c/lib-68.c: Rename to...
460 * testsuite/libgomp.oacc-c-c++-common/lib-68.c: ... this.
461 * testsuite/libgomp.oacc-c/lib-69.c: Rename to...
462 * testsuite/libgomp.oacc-c-c++-common/lib-69.c: ... this.
463 * testsuite/libgomp.oacc-c/lib-7.c: Rename to...
464 * testsuite/libgomp.oacc-c-c++-common/lib-7.c: ... this.
465 * testsuite/libgomp.oacc-c/lib-70.c: Rename to...
466 * testsuite/libgomp.oacc-c-c++-common/lib-70.c: ... this.
467 * testsuite/libgomp.oacc-c/lib-71.c: Rename to...
468 * testsuite/libgomp.oacc-c-c++-common/lib-71.c: ... this.
469 * testsuite/libgomp.oacc-c/lib-72.c: Rename to...
470 * testsuite/libgomp.oacc-c-c++-common/lib-72.c: ... this.
471 * testsuite/libgomp.oacc-c/lib-73.c: Rename to...
472 * testsuite/libgomp.oacc-c-c++-common/lib-73.c: ... this.
473 * testsuite/libgomp.oacc-c/lib-74.c: Rename to...
474 * testsuite/libgomp.oacc-c-c++-common/lib-74.c: ... this.
475 * testsuite/libgomp.oacc-c/lib-75.c: Rename to...
476 * testsuite/libgomp.oacc-c-c++-common/lib-75.c: ... this.
477 * testsuite/libgomp.oacc-c/lib-76.c: Rename to...
478 * testsuite/libgomp.oacc-c-c++-common/lib-76.c: ... this.
479 * testsuite/libgomp.oacc-c/lib-77.c: Rename to...
480 * testsuite/libgomp.oacc-c-c++-common/lib-77.c: ... this.
481 * testsuite/libgomp.oacc-c/lib-78.c: Rename to...
482 * testsuite/libgomp.oacc-c-c++-common/lib-78.c: ... this.
483 * testsuite/libgomp.oacc-c/lib-79.c: Rename to...
484 * testsuite/libgomp.oacc-c-c++-common/lib-79.c: ... this.
485 * testsuite/libgomp.oacc-c/lib-80.c: Rename to...
486 * testsuite/libgomp.oacc-c-c++-common/lib-80.c: ... this.
487 * testsuite/libgomp.oacc-c/lib-81.c: Rename to...
488 * testsuite/libgomp.oacc-c-c++-common/lib-81.c: ... this.
489 * testsuite/libgomp.oacc-c/lib-82.c: Rename to...
490 * testsuite/libgomp.oacc-c-c++-common/lib-82.c: ... this.
491 * testsuite/libgomp.oacc-c/lib-83.c: Rename to...
492 * testsuite/libgomp.oacc-c-c++-common/lib-83.c: ... this.
493 * testsuite/libgomp.oacc-c/lib-84.c: Rename to...
494 * testsuite/libgomp.oacc-c-c++-common/lib-84.c: ... this.
495 * testsuite/libgomp.oacc-c/lib-85.c: Rename to...
496 * testsuite/libgomp.oacc-c-c++-common/lib-85.c: ... this.
497 * testsuite/libgomp.oacc-c/lib-86.c: Rename to...
498 * testsuite/libgomp.oacc-c-c++-common/lib-86.c: ... this.
499 * testsuite/libgomp.oacc-c/lib-87.c: Rename to...
500 * testsuite/libgomp.oacc-c-c++-common/lib-87.c: ... this.
501 * testsuite/libgomp.oacc-c/lib-88.c: Rename to...
502 * testsuite/libgomp.oacc-c-c++-common/lib-88.c: ... this.
503 * testsuite/libgomp.oacc-c/lib-89.c: Rename to...
504 * testsuite/libgomp.oacc-c-c++-common/lib-89.c: ... this.
505 * testsuite/libgomp.oacc-c/lib-9.c: Rename to...
506 * testsuite/libgomp.oacc-c-c++-common/lib-9.c: ... this.
507 * testsuite/libgomp.oacc-c/lib-90.c: Rename to...
508 * testsuite/libgomp.oacc-c-c++-common/lib-90.c: ... this.
509 * testsuite/libgomp.oacc-c/lib-91.c: Rename to...
510 * testsuite/libgomp.oacc-c-c++-common/lib-91.c: ... this.
511 * testsuite/libgomp.oacc-c/lib-92.c: Rename to...
512 * testsuite/libgomp.oacc-c-c++-common/lib-92.c: ... this.
513 * testsuite/libgomp.oacc-c/nested-1.c: Rename to...
514 * testsuite/libgomp.oacc-c-c++-common/nested-1.c: ... this.
515 * testsuite/libgomp.oacc-c/nested-2.c: Rename to...
516 * testsuite/libgomp.oacc-c-c++-common/nested-2.c: ... this.
517 * testsuite/libgomp.oacc-c/offset-1.c: Rename to...
518 * testsuite/libgomp.oacc-c-c++-common/offset-1.c: ... this.
519 * testsuite/libgomp.oacc-c/parallel-1.c: Rename to...
520 * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ... this.
521 * testsuite/libgomp.oacc-c/pointer-align-1.c: Rename to...
522 * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: ... this.
523 * testsuite/libgomp.oacc-c/present-1.c: Rename to...
524 * testsuite/libgomp.oacc-c-c++-common/present-1.c: ... this.
525 * testsuite/libgomp.oacc-c/present-2.c: Rename to...
526 * testsuite/libgomp.oacc-c-c++-common/present-2.c: ... this.
527 * testsuite/libgomp.oacc-c/reduction-1.c: Rename to...
528 * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: ... this.
529 * testsuite/libgomp.oacc-c/reduction-2.c: Rename to...
530 * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: ... this.
531 * testsuite/libgomp.oacc-c/reduction-3.c: Rename to...
532 * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: ... this.
533 * testsuite/libgomp.oacc-c/reduction-4.c: Rename to...
534 * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: ... this.
535 * testsuite/libgomp.oacc-c/reduction-5.c: Rename to...
536 * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: ... this.
537 * testsuite/libgomp.oacc-c/reduction-initial-1.c: Rename to...
538 * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: ... this.
539 * testsuite/libgomp.oacc-c/subr.cu: Rename to...
540 * testsuite/libgomp.oacc-c-c++-common/subr.cu: ... this.
541 * testsuite/libgomp.oacc-c/subr.ptx: Rename to...
542 * testsuite/libgomp.oacc-c-c++-common/subr.ptx: ... this.
543 * testsuite/libgomp.oacc-c/timer.h: Rename to...
544 * testsuite/libgomp.oacc-c-c++-common/timer.h: ... this.
545 * testsuite/libgomp.oacc-c/update-1.c: Rename to...
546 * testsuite/libgomp.oacc-c-c++-common/update-1.c: ... this.
548 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
550 * libgomp.texi: Update for OpenACC.
552 * target.h (struct ACC_dispatch_t): Remove avail_func. Update all
554 * oacc-host.c (openacc_avail): Likewise.
555 * plugin-nvptx.c (PTX_avail, openacc_avail): Likewise.
556 * libgomp.texi (acc_get_num_devices): Revise.
558 * testsuite/libgomp.oacc-c/goacc_kernels.c: Remove file.
559 * testsuite/libgomp.oacc-c/goacc_parallel.c: Remove file.
561 2014-11-04 Cesar Philippidis <cesar@codesourcery.com>
563 * testsuite/libgomp.oacc-fortran/routine-1.f90: New test.
564 * testsuite/libgomp.oacc-fortran/routine-2.f90: New test.
565 * testsuite/libgomp.oacc-fortran/routine-3.f90: New test.
566 * testsuite/libgomp.oacc-fortran/routine-4.f90: New test.
568 2014-11-04 Thomas Schwinge <thomas@codesourcery.com>
570 * testsuite/libgomp.oacc-c/reduction-initial-1.c
571 [ACC_DEVICE_TYPE_host_nonshm]: Remove special-casing for N.
573 2014-11-03 Cesar Philippidis <cesar@codesourcery.com>
574 Thomas Schwinge <thomas@codesourcery.com>
576 * libgomp.map (GOACC_get_thread_num): Declare.
577 (GOACC_get_num_threads): Declare.
578 * libgomp_g.h (GOACC_get_thread_num): Declare.
579 (GOACC_get_num_threads): Declare.
580 * oacc-parallel.c (GOACC_parallel): Handle num_gangs.
581 (GOACC_get_num_threads): New function.
582 (GOACC_get_thread_num): New function.
583 * oacc-ptx.h: New file.
584 * plugin-nvptx.c (ABORT_PTX): Remove macro. Move to oacc-ptx.h.
585 (ACC_ON_DEVICE_PTX): Likewise.
586 (link_ptx): Also link ptx code defined by GOACC_INTERNAL_PTX.
587 (PTX_exec): Handle gangs/CTAs.
588 * testsuite/libgomp.oacc-c/reduction-1.c: New test.
589 * testsuite/libgomp.oacc-c/reduction-2.c: New test.
590 * testsuite/libgomp.oacc-c/reduction-3.c: New test.
591 * testsuite/libgomp.oacc-c/reduction-4.c: New test.
592 * testsuite/libgomp.oacc-c/reduction-5.: New test.
593 * testsuite/libgomp.oacc-c/reduction-initial-1.c: New test.
594 * testsuite/libgomp.oacc-fortran/reduction-1.f90: New test.
595 * testsuite/libgomp.oacc-fortran/reduction-2.f90: New test.
596 * testsuite/libgomp.oacc-fortran/reduction-3.f90: New test.
597 * testsuite/libgomp.oacc-fortran/reduction-4.f90: New test.
598 * testsuite/libgomp.oacc-fortran/reduction-5.f90: New test.
599 * testsuite/libgomp.oacc-fortran/reduction-6.f90: New test.
601 2014-11-03 Cesar Philippidis <cesar@codesourcery.com>
603 * libgomp.map (GOACC_enter_exit_data): Declare as global.
604 * libgomp_g.h (GOACC_enter_exit_data): Declare.
605 (GOACC_update): Declare.
606 (gomp_acc_insert_pointer): Declare.
607 (gomp_acc_remove_pointer): Declare.
608 * oacc-mem.c (gomp_acc_insert_pointer): New function.
609 (gomp_acc_remove_pointer): New function.
610 * oacc-parallel.c (find_pset): New function.
611 (GOACC_enter_exit_data): New function.
612 (GOACC_update): Handle GOMP_MAP_TO_PSET.
613 * testsuite/libgomp.oacc-c/data-2.c: New test.
614 * testsuite/libgomp.oacc-c/data-3.c: New test.
615 * testsuite/libgomp.oacc-fortran/data-1.f90: New test.
616 * testsuite/libgomp.oacc-fortran/data-2.f90: New test.
617 * testsuite/libgomp.oacc-fortran/data-3.f90: New test.
618 * testsuite/libgomp.oacc-fortran/data-4.f90: New test.
620 2014-10-31 Cesar Philippidis <cesar@codesourcery.com>
622 * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: New test.
623 * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: New test.
624 * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: New test.
626 2014-10-31 Thomas Schwinge <thomas@codesourcery.com>
628 * configure.ac (CUDA_DRIVER_INCLUDE, CUDA_DRIVER_LIB): New
629 substituted variables.
630 (testsuite/libgomp-test-support.exp): Instantiate file.
631 * Makefile.in: Regenerate.
632 * configure: Likewise.
633 * testsuite/Makefile.in: Likewise.
634 * testsuite/libgomp-test-support.exp.in: New file.
635 * testsuite/lib/libgomp.exp: Load it.
636 (libgomp_init): For build-tree testing, add the CUDA paths to
637 ALWAYS_CFLAGS and always_ld_library_path.
639 2014-10-30 Julian Brown <julian@codesourcery.com>
641 * target.c (gomp_map_vars): Remove MM argument.
642 (GOMP_target, GOMP_target_data): Update calls to gomp_map_vars.
643 * oacc-mem.c (acc_map_data, present_create_copy): Update calls to
645 * oacc-parallel.c (GOACC_parallel, GOACC_data_start): Likewise.
646 * target.h (gomp_map_vars): Update prototype.
648 2014-10-30 Julian Brown <julian@codesourcery.com>
650 * oacc-host.c (DEBUG): Remove undefine.
651 * plugin-nvptx.c (DEBUG, DISABLE_ASYNC): Remove comment-out macro
653 * target.c (dump_mappings): Remove debugging function.
655 2014-10-30 Julian Brown <julian@codesourcery.com>
657 * target.c (gomp_load_plugin_for_device): Only call get_caps once.
658 (gomp_find_available_plugins): ...and don't call it again here.
660 2014-10-30 Julian Brown <julian@codesourcery.com>
662 * env.c (goacc_notify_var): New.
663 (initialize_env): Use above instead of
664 gomp_global_icv.acc_notify_var.
665 * error.c (gomp_vnotify): Use goacc_notify_var.
666 (gomp_notify): Fix formatting.
667 * libgomp.h (gomp_task_icv): Remove acc_notify_var field.
668 (goacc_notify_var): Add extern declaration.
670 2014-10-30 Julian Brown <julian@codesourcery.com>
672 * env.c (goacc_parse_device_num): Remove.
673 (initialize_env): Use parse_int instead of goacc_parse_device_num.
674 * oacc-init.c (lazy_open): Add bounds check for device number.
676 2014-10-30 Julian Brown <julian@codesourcery.com>
678 * env.c (oacc-int.h): Include.
679 * libgomp-plugin.h (GOMP_PLUGIN_async_unmap_vars): Don't declare
681 * libgomp.map (PLUGIN_1.0): Add GOMP_PLUGIN_acc_thread symbol.
682 * oacc-async.c (oacc-int.h): Include.
683 (acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
684 (acc_wait_all, acc_wait_all_async): Use base_dev not ACC_dev.
685 * oacc-cuda.c (oacc-int.h): Include.
686 (acc_get_current_cuda_device, acc_get_current_cuda_context)
687 (acc_get_cuda_stream): Use base_dev not ACC_dev.
688 (acc_set_cuda_stream): Call ACC_lazy_initialize, use base_dev not
690 * oacc-host.c (oacc-plugin.h, oacc-int.h): Include one or the
691 other, depending on HOST_NONSHM_PLUGIN setting.
692 (openacc_create_thread_data, openacc_destroy_thread_data): New.
693 (host_dispatch): Initialize create_thread_data_func,
694 destroy_thread_data_func hooks.
695 * oacc-init.c (oacc-int.h): Include.
696 (acc_device_lock): Make static.
697 (ACC_dev, ACC_handle, handle_num, struct ACC_context, ACC_contexts):
699 (base_dev, goacc_threads, goacc_thread_lock, goacc_cleanup_key):
701 (goacc_tls_data, goacc_tls_key): Define one or the other, depending
703 (dispatchers): Add comment.
704 (ACC_register): Only register 0th device.
705 (close_handle): Remove.
706 (_acc_init): Add comment. Don't use ACC_dev.
707 (goacc_new_thread, goacc_destroy_thread): New.
708 (lazy_open): Update comment. Remove code relating to contexts and
709 memory maps. Create thread-specific data if necessary.
710 (acc_init): Use base_dev not ACC_dev.
711 (_acc_shutdown): Don't call close_handle. Use base_dev not ACC_dev.
712 Free target-specific TLS data and close devices that are open at
713 the time of shutdown.
714 (lazy_init): Add comment. Use base_dev not ACC_dev.
715 (lazy_init_and_open): Add comment. Use base_dev not ACC_dev.
716 (acc_get_num_devices, acc_get_device_type, acc_get_device_num): Use
717 base_dev not ACC_dev.
718 (acc_set_device_num): Likewise. If switching device number,
719 de-associate previous device number from the current thread, but do
720 not close the device.
721 (acc_on_device): Check type for device for current thread, not
723 (ACC_runtime_initialize): Initialize goacc_tls_key,
724 goacc_cleanup_key, base_dev, goacc_threads, goacc_thread_lock. Don't
725 initialize ACC_contexts.
726 (saved_bound_dev): Remove.
727 (ACC_save_and_set_bind, ACC_restore_bind): Use goacc_thread.
728 (ACC_lazy_initialize): Use base_dev, goacc_thread instead of
730 * oacc-int.h (struct ACC_dispatch_t): Don't declare here.
731 (struct goacc_thread): New.
732 (goacc_tls_data): Define for HAVE_TLS.
733 (goacc_tls_key): Define for !HAVE_TLS.
734 (goacc_thread): New (versions with and without HAVE_TLS).
735 (ACC_mem_open, ACC_mem_close, ACC_resolve_device, ACC_dev)
736 (ACC_handle, struct memmap_t, ACC_memmap): Remove.
737 (base_dev): Add extern declaration.
738 * oacc-mem.c (oacc-int.h, assert.h): Include.
739 (ACC_memmap, ACC_mem_open, ACC_mem_close): Remove.
740 (lookup_host): Change memmap_t argument to struct
742 (lookup_dev): Change memmap_t argument to struct target_mem_desc.
743 Use list_count not refcount for iterating over mapped elements.
744 (acc_malloc): Use base_dev not ACC_dev.
745 (acc_free): Update call to lookup_dev. Use base_dev not ACC_dev.
746 (acc_memcpy_to_device, acc_memcpy_from_device): Use base_dev not
748 (acc_deviceptr, acc_is_present): Update call to lookup_host.
749 (acc_hostptr): Update call to lookup_dev.
750 (acc_map_data): Look up thread device instead of using ACC_dev,
751 update calls to lookup_host, lookup_dev. Use data environment in
753 (acc_unmap_data): Update call to lookup_host. Remove mapped data
754 from data environment not ACC_memmap.
755 (present_create_copy): Update call to lookup_host. Use data
756 environment instead of list in ACC_memmap.
757 (delete_copyout): Update call to lookup_host. Look up device in
758 current thread info instead of using ACC_dev.
759 (update_dev_host): Look up device in current thread info instead of
761 * oacc-parallel.c (oacc-int.h): Include.
762 (struct devgeom, devgeom, dump_devaddrs): Remove.
763 (select_acc_device): Call ACC_lazy_initialize earlier.
764 (GOACC_parallel): Use device for current thread instead of ACC_dev.
765 Use memory map from current device.
766 (GOACC_data_start): Likewise. Use thread info block for mapped data.
767 (GOACC_data_end): Use thread info block for mapped data.
768 (goacc_wait): Use device for current thread instead of ACC_dev.
769 (GOACC_update): Likewise. Formatting fixes.
770 * oacc-plugin.c (ACC_plugin_register): Remove.
771 (oacc-int.h): Include.
772 (GOMP_PLUGIN_acc_thread): New.
773 * oacc-plugin.h (target.h): Don't include.
774 (ACC_plugin_register): Remove.
775 (GOMP_PLUGIN_async_unmap_vars, GOMP_PLUGIN_acc_thread): Add extern
777 * plugin-nvptx.c (oacc-plugin.h): Include.
778 (current_stream, PTX_dev, PTX_devices): Remove.
779 (struct nvptx_thread): New.
780 (nvptx_thread): New function.
781 (select_stream_for_async): Locate ptx_dev in device-specific TLS
782 data instead of using TLS PTX_dev variable.
783 (PTX_init): Don't initialize PTX_devices.
784 (PTX_open_device): Remove PTX_devices list handling. Tweak context
786 (PTX_close_device): Remove PTX_devices list handling. Find PTX
787 device info via function argument instead of global TLS variable.
788 (PTX_get_num_devices): Make callable when backend has not been
790 (event_gc): Find PTX device info, current stream via nvptx_thread.
791 (event_add, PTX_exec, PTX_host2dev, PTX_dev2host)
792 (PTX_async_test_all, PTX_wait_all, PTX_wait_all_async)
793 (PTX_get_current_cuda_device, PTX_get_current_cuda_context)
794 (PTX_get_cuda_stream, PTX_set_cuda_stream, openacc_close_device)
795 (openacc_set_device_num, openacc_register_async_cleanup)
796 (openacc_async_set_async): Likewise.
797 (openacc_create_thread_data, openacc_destroy_thread_data): New.
798 * target.c (oacc-int.h): Include.
799 (gomp_fini_device): Split out memory-map freeing into...
800 (gomp_free_memmap): ...this new function.
801 (gomp_load_plugin_for_device): Initialize
802 openacc.create_thread_data_func, openacc.destroy_thread_data_func
804 (gomp_find_available_plugins): Initialize one target_device_descr
806 * target.h (oacc-int.h): Don't include.
807 (ACC_dispatch_t): Declare here. Add data_environ, ord fields.
808 Update comment for mem_map field.
809 (gomp_free_memmap): Add prototype.
811 2014-10-28 Thomas Schwinge <thomas@codesourcery.com>
813 * testsuite/libgomp.oacc-c/c.exp (ld_library_path, ALWAYS_CFLAGS):
814 Don't refer to CUDA installation in /opt/nvidia/cuda-5.5/.
816 * oacc-init.c: Don't use <sys/queue.h>'s SLIST_*.
817 * plugin-nvptx.c: Likewise.
819 2014-10-23 Thomas Schwinge <thomas@codesourcery.com>
821 * testsuite/libgomp.oacc-c/reduction-initial-1.c: New file.
823 2014-10-20 Cesar Philippidis <cesar@codesourcery.com>
825 * (GOACC_update): Declare.
827 2014-10-20 Julian Brown <julian@codesourcery.com>
829 * oacc-host.c (openacc_register_async_cleanup): New.
830 (host_dispatch): Initialise register_async_cleanup_func entry.
831 * oacc-int.h (struct ACC_dispatch_t): Add
832 register_async_cleanup_func hook.
833 * oacc-parallel.c (GOACC_parallel): Call
834 register_async_cleanup_func hook after queuing asynchronous
836 * plugin-nvptx.c (enum PTX_event_type): Add PTX_EVT_ASYNC_CLEANUP.
837 (struct PTX_event): Remove tgt field.
838 (event_gc): Don't do async cleanup in PTX_EVT_KNL, do it in
839 PTX_EVT_ASYNC_CLEANUP instead.
840 (event_add): Remove tgt argument. Support PTX_EVT_ASYNC_CLEANUP
842 (PTX_exec, PTX_host2dev, PTX_dev2host, PTX_wait_async)
843 (PTX_wait_all_async): Update calls to event_add.
844 (openacc_register_async_cleanup): New.
845 (PTX_async_test): Call event_gc on success path.
846 (PTX_async_test_all): Likewise.
847 * target.c (gomp_load_plugin_for_device): Initialise
848 register_async_cleanup hook.
850 2014-10-20 Julian Brown <julian@codesourcery.com>
852 * Makefile.am (AM_CPPFLAGS): Fix search path for locating
854 * Makefile.in: Regenerate.
856 2014-10-20 Julian Brown <julian@codesourcery.com>
858 * libgomp-plugin.c (gomp_plugin_*): Rename to...
859 (GOMP_PLUGIN_*): This.
860 * libgomp-plugin.h: Likewise.
861 * libgomp.map: Likewise.
862 * oacc-host.c (GOMP): Use GOMP_PLUGIN_ in macro expansion.
863 * oacc-plugin.c (gomp_plugin_*): Rename to...
864 (GOMP_PLUGIN_*): This.
865 * plugin-nvptx.c: Likewise.
867 2014-10-17 Thomas Schwinge <thomas@codesourcery.com>
868 James Norris <jnorris@codesourcery.com>
870 * libgomp.texi: Outline documentation for OpenACC.
872 2014-10-17 James Norris <jnorris@codesourcery.com>
873 Thomas Schwinge <thomas@codesourcery.com>
874 Tom de Vries <tom@codesourcery.com>
875 Cesar Philippidis <cesar@codesourcery.com>
877 * testsuite/Makefile.in: Regenerated.
878 * testsuite/lib/libgomp.exp
879 (check_effective_target_openacc_nvidia_accel_present)
880 (check_effective_target_openacc_nvidia_accel_selected): New
882 * testsuite/libgomp.oacc-fortran/fortran.exp: New exp file.
883 * testsuite/libgomp.oacc-fortran/*.f: New tests.
884 * testsuite/libgomp.oacc-fortran/*.f90: Likewise.
885 * testsuite/libgomp.oacc-c/c.exp: New exp file.
886 * testsuite/libgomp.oacc-c/subr.ptx: New file.
887 * testsuite/libgomp.oacc-c/subr.cu: New file.
888 * testsuite/libgomp.oacc-c/timer.h: New file.
889 * testsuite/libgomp.oacc-c/*.c: New tests.
890 * testsuite/libgomp.oacc-c++/c++.exp: New exp file.
892 2014-10-17 Nathan Sidwell <nathan@codesourcery.com>
893 James Norris <jnorris@codesourcery.com>
894 Thomas Schwinge <thomas@codesourcery.com>
895 Tom de Vries <tom@codesourcery.com>
896 Julian Brown <julian@codesourcery.com>
898 * Makefile.am (AM_CPPFLAGS): Search in ../include also.
899 (libgomp_plugin_nvptx_version_info, libgomp_plugin_nvptx_la_SOURCES)
900 (libgomp_plugin_nvptx_la_CPPFLAGS, libgomp_plugin_nvptx_la_LDFLAGS)
901 (libgomp_plugin_nvptx_la_LIBADD)
902 (libgomp_plugin_nvptx_la_LIBTOOLFLAGS): Set variables if
903 PLUGIN_NVPTX is defined.
904 (toolexeclib_LTLIBRARIES): Add nonshm-host
905 and (conditionally) nvidia plugins.
906 (libgomp_plugin_nonshm_host_version_info)
907 (libgomp_plugin_nonshm_host_la_SOURCES)
908 (libgomp_plugin_nonshm_host_la_CPPFLAGS)
909 (libgomp_plugin_nonshm_host_la_LDFLAGS)
910 (libgomp_plugin_nonshm_host_la_LIBTOOLFLAGS): Set variables.
911 (libgomp_la_SOURCES): Add oacc-parallel.c, splay-tree.c,
912 oacc-host.c, oacc-init.c, oacc-mem.c, oacc-async.c, oacc-plugin.c,
913 oacc-cuda.c, libgomp-plugin.c.
914 (nodist_libsubinclude_HEADERS): Add openacc.h,
915 ../include/gomp-constants.h.
916 * Makefile.in: Regenerate.
917 * config.h.in: Regenerate.
918 * configure.ac: Add TODOs for OpenACC in various places.
919 (CUDA_DRIVER_CPPFLAGS, CUDA_DRIVER_LDFLAGS): Initialize.
920 (--with-cuda-driver, --with-cuda-driver-include)
921 (--with-cuda-driver-lib, --enable-offload-targets): Implement new
923 (PLUGIN_NVPTX, PLUGIN_NVPTX_CPPFLAGS, PLUGIN_NVPTX_LDFLAGS)
924 (PLUGIN_NVPTX_LIBS): Initialize variables.
925 * configure: Regenerate.
926 * env.c (target.h): Include.
927 (goacc_device_num, goacc_device_type): New globals.
928 (goacc_parse_device_num, goacc_parse_device_type): New functions.
929 (initialize_env): Parse GCC_ACC_NOTIFY, ACC_DEVICE_TYPE,
930 ACC_DEVICE_NUM environment variables.
931 * error.c (gomp_verror, gomp_vfatal, gomp_vnotify, gomp_notify):
933 (gomp_fatal): Make global.
934 * libgomp.h (stdarg.h): Include.
935 (struct gomp_memory_mapping): Forward declaration.
936 (struct gomp_task_icv): Add acc_notify_var member.
937 (goacc_device_num, goacc_device_type): Add extern declarations.
938 (gomp_vnotify, gomp_notify, gomp_verror, gomp_vfatal): Add
940 (gomp_init_targets_once): Add prototype.
941 * libgomp.map (OACC_2.0): New symbol version. Add public acc_*
943 (PLUGIN_1.0): New symbol version. Add gomp plugin interface
945 * libgomp_g.h (GOACC_kernels, GOACC_parallel): Update prototypes.
946 (GOACC_wait): Add prototype.
947 * target.c (limits.h, stdbool.h, stdlib.h): Don't include.
948 (oacc-plugin.h, gomp-constants.h, stdio.h, assert.h): Include.
949 (splay_tree_node, splay_tree, splay_tree_key, target_mem_desc)
950 (splay_tree_key_s, enum target_type, gomp_device_descr): Don't
952 (splay-tree.h): Include.
954 (splay_compare): Change linkage to hidden not static.
955 (gomp_init_targets_once): New function.
956 (gomp_get_num_devices): Use above.
957 (dump_mappings): New function (for debugging).
958 (get_kind): New function.
959 (gomp_map_vars): Add gomp_memory_mapping (mm), is_openacc
960 parameters. Change KINDS to void *. Use lock from memory map
961 not device. Use macros from gomp-constants.h instead of
962 hard-coded values. Support OpenACC-specific mappings.
963 (gomp_copy_from_async): New function.
964 (gomp_unmap_vars): Add DO_COPYFROM argument. Only copy memory
965 back from device if it is true. Use lock from memory map not
967 (gomp_update): Add mm, is_openacc args. Use lock from
968 memory map not device. Use macros from gomp-constants.h not
970 (gomp_register_image_for_device): Add forward
972 (GOMP_offload_register): Change TARGET_DATA type to
973 void **. Check realloc result.
974 (gomp_init_device): Change linkage to hidden not static. Tweak mem
976 (gomp_fini_device): New function.
977 (GOMP_target): Adjust lazy initialization, check target
978 capabilities for OpenMP 4.0 support. Add locking around splay tree
979 lookup. Add new arg to gomp_unmap_vars call.
980 (GOMP_target_data): Tweak lazy initialization. Add new args to
981 gomp_map_vars, gomp_unmap_vars calls.
982 (GOMP_target_update): Tweak lazy initialization. Add new args to
984 (gomp_load_plugin_for_device): Initialize device_fini and
985 OpenACC-specific plugin hooks.
986 (gomp_register_images_for_device): Rename to...
987 (gomp_register_image_for_device): This, and register a single
988 device only, and only if it has not already had images registered.
989 (gomp_find_available_plugins): Rearrange to fix plugin loading and
990 initialization for OpenACC. Prefer a device with
991 TARGET_CAP_OPENMP_400 for OpenMP.
992 * target.h: New file.
993 * splay-tree.h: Move bulk of implementation to...
994 * splay-tree.c: New file.
995 * libgomp-plugin.c: New file.
996 * libgomp-plugin.h: New file.
997 * oacc-async.c: New file.
998 * oacc-cuda.c: New file.
999 * oacc-host.c: New file.
1000 * oacc-init.c: New file.
1001 * oacc-mem.c: New file.
1002 * oacc-parallel.c: New file.
1003 * oacc-plugin.c: New file.
1004 * plugin-nvptx.c: New file.
1005 * oacc-int.h: New file.
1006 * openacc.f90: New file.
1007 * openacc.h: New file.
1008 * openacc_lib.h: New file.
1010 2014-10-09 Thomas Schwinge <thomas@codesourcery.com>
1012 * testsuite/libgomp.oacc-c/collapse-4.c: New file, moved from
1013 gcc/testsuite/gcc.dg/goacc/collapse.c.
1015 2014-09-23 Thomas Schwinge <thomas@codesourcery.com>
1017 * libgomp.map (OACC_2.0): Add acc_on_device, acc_on_device_.
1018 * fortran.c: Include "openacc.h".
1019 (acc_on_device_): New function.
1020 * oacc-parallel.c: Include "openacc.h".
1021 (acc_on_device): New function.
1022 * openacc.f90 (acc_device_kind, acc_device_none)
1023 (acc_device_default, acc_device_host, acc_device_not_host): New
1025 (acc_on_device): New function declaration.
1026 * openacc_lib.h (acc_device_kind, acc_device_none)
1027 (acc_device_default, acc_device_host, acc_device_not_host): New
1029 (acc_on_device): New function declaration.
1030 * openacc.h (acc_device_t): New enum.
1031 (acc_on_device): New function declaration.
1032 * testsuite/libgomp.oacc-c/acc_on_device-1.c: New file.
1033 * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
1034 * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
1035 * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
1037 2014-07-09 Thomas Schwinge <thomas@codesourcery.com>
1038 Jakub Jelinek <jakub@redhat.com>
1040 * target.c (gomp_map_vars, gomp_unmap_vars, gomp_update): Support
1041 NULL mappings as well as mapping kind OMP_CLAUSE_MAP_TO_PSET.
1042 Also, some code reformatting.
1044 2014-06-06 Thomas Schwinge <thomas@codesourcery.com>
1045 James Norris <jnorris@codesourcery.com>
1047 * libgomp.map (GOACC_2.0): Add GOACC_update.
1048 * oacc-parallel.c (GOACC_update): New function.
1050 2014-03-18 Ilya Verbin <ilya.verbin@intel.com>
1052 * libgomp.map (GOMP_4.0.1): New symbol version.
1053 Add GOMP_offload_register.
1054 * plugin-host.c (device_available): Replace with:
1055 (get_num_devices): This.
1057 (offload_register): Ditto.
1058 (device_init): Ditto.
1059 (device_get_table): Ditto.
1060 (device_run): Ditto.
1061 * target.c (target_type): New enum.
1062 (offload_image_descr): New struct.
1063 (offload_images, num_offload_images): New globals.
1064 (struct gomp_device_descr): Remove device_available_func.
1065 Add type, is_initialized, get_type_func, get_num_devices_func,
1066 offload_register_func, device_init_func, device_get_table_func,
1068 (mapping_table): New struct.
1069 (GOMP_offload_register): New function.
1070 (gomp_init_device): Ditto.
1071 (GOMP_target): Add device initialization and lookup for target fn.
1072 (GOMP_target_data): Add device initialization.
1073 (GOMP_target_update): Ditto.
1074 (gomp_load_plugin_for_device): Take handles for get_type,
1075 get_num_devices, offload_register, device_init, device_get_table,
1076 device_run functions.
1077 (gomp_register_images_for_device): New function.
1078 (gomp_find_available_plugins): Add registration of offload images.
1080 2014-03-18 Thomas Schwinge <thomas@codesourcery.com>
1082 * libgomp_g.h (GOACC_kernels, GOACC_parallel): Add three
1083 additional int arguments.
1084 * oacc-parallel.c (GOACC_kernels, GOACC_parallel): Handle these.
1085 * testsuite/libgomp.oacc-c/goacc_kernels.c: Adjust.
1086 * testsuite/libgomp.oacc-c/goacc_parallel.c: Likewise.
1088 2014-02-28 Thomas Schwinge <thomas@codesourcery.com>
1090 * testsuite/libgomp.oacc-c/goacc_kernels.c: New file.
1091 * testsuite/libgomp.oacc-c/kernels-1.c: Likewise.
1092 * testsuite/libgomp.oacc-c/parallel-1.c: Add one missing test.
1094 * libgomp.map (GOACC_2.0): Add GOACC_kernels.
1095 * libgomp_g.h (GOACC_kernels): New prototype.
1096 * oacc-parallel.c (GOACC_kernels): New function.
1098 2014-02-21 Thomas Schwinge <thomas@codesourcery.com>
1100 * testsuite/libgomp.oacc-c/data-1.c: New file.
1102 * libgomp.map (GOACC_2.0): Add GOACC_data_end, GOACC_data_start.
1103 * libgomp_g.h (GOACC_data_start, GOACC_data_end): New prototypes.
1104 * oacc-parallel.c (GOACC_data_start, GOACC_data_end): New
1107 2014-02-20 Thomas Schwinge <thomas@codesourcery.com>
1109 * target.c (gomp_load_plugin_for_device): Don't call dlcose if
1112 2014-02-20 Thomas Schwinge <thomas@codesourcery.com>
1113 James Norris <jnorris@codesourcery.com>
1115 * plugin-host.c: New file.
1116 * target.c (struct gomp_device_descr): Add device_alloc_func,
1117 device_free_func, device_dev2host_func, device_host2dev_func
1119 (gomp_load_plugin_for_device): Load these.
1120 (gomp_map_vars, gomp_unmap_tgt, gomp_unmap_vars, gomp_update): Use
1122 (resolve_device, gomp_find_available_plugins): Remove ID 257 hack.
1124 2014-02-17 Ilya Verbin <ilya.verbin@intel.com>
1126 * target.c (gomp_map_vars_existing): Don't update copy_from for the
1129 2014-01-28 Thomas Schwinge <thomas@codesourcery.com>
1131 * testsuite/libgomp.oacc-c/parallel-1.c: Extend.
1133 2013-12-18 Thomas Schwinge <thomas@codesourcery.com>
1135 * libgomp_g.h (GOACC_parallel): Switch kinds array to unsigned
1137 * oacc-parallel.c (GOACC_parallel): Likewise, and catch
1140 2013-11-08 Thomas Schwinge <thomas@codesourcery.com>
1143 * target.c (gomp_find_available_plugins): Don't skip device 257
1146 2013-11-07 Thomas Schwinge <thomas@codesourcery.com>
1148 * oacc-parallel.c: New file.
1149 * Makefile.am (libgomp_la_SOURCES): Add it.
1150 * Makefile.in: Regenerate.
1151 * libgomp.map (GOACC_2.0): Add GOACC_parallel.
1152 * libgomp_g.h (GOACC_parallel): New declaration.
1153 * testsuite/libgomp.oacc-c/goacc_parallel.c: New file.
1154 * testsuite/libgomp.oacc-c/parallel-1.c: New file.
1156 * libgomp.map (GOACC_2.0): New symbol version.
1158 * openacc.f90 (openacc_version): New integer parameter.
1159 * openacc_lib.h (openacc_version): Likewise.
1160 * testsuite/libgomp.oacc-fortran/openacc_version-1.f: New file.
1161 * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
1163 * libgomp.map (OACC_2.0): New symbol version.
1164 * Makefile.am (nodist_libsubinclude_HEADERS): Add openacc.h.
1165 (nodist_finclude_HEADERS): Add openacc_lib.h, openacc.f90,
1166 openacc.mod, and openacc_kinds.mod.
1167 (openacc_kinds.mod): New target.
1168 (%.mod): New target, generalized from omp_lib.mod.
1169 * Makefile.in: Regenerate.
1170 * openacc.f90: New file.
1171 * openacc.h: Likewise.
1172 * openacc_lib.h: Likewise.
1173 * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
1174 * testsuite/libgomp.oacc-c/c.exp: Likewise.
1175 * testsuite/libgomp.oacc-c/lib-1.c: Likewise.
1176 * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
1177 * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
1178 * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
1179 * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
1181 Backport from trunk, r204519:
1183 * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
1185 * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
1186 * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
1187 * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
1188 * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
1191 Backport from trunk, r204518:
1193 * libgomp_g.h: Include <stddef.h> for size_t.
1195 Backport from trunk, r204517:
1197 * libgomp.spec.in: Update comment about libgomp's dependencies.
1198 * configure.ac: Likewise.
1199 * configure: Regenerate.
1201 2013-10-10 Jakub Jelinek <jakub@redhat.com>
1203 * testsuite/libgomp.c++/udr-6.C: Remove UDR + on type F.
1205 2013-10-08 Jakub Jelinek <jakub@redhat.com>
1207 * testsuite/libgomp.c/thread-limit-1.c (main): Check if
1208 cnt isn't bigger than 6 at any point in time, sleep 10ms after
1209 incrementing it and then atomically decrement.
1210 * testsuite/libgomp.c/thread-limit-2.c (main): Likewise.
1212 * libgomp.h (struct gomp_team): Add task_queued_count field.
1213 Add comments about task_{,queued_,running_}count.
1214 * team.c (gomp_new_team): Clear task_queued_count.
1215 * task.c (GOMP_task): Increment task_queued_count.
1216 (gomp_task_run_pre): Decrement task_queued_count. If it is
1217 decremented to zero, call gomp_team_barrier_clear_task_pending.
1218 (gomp_task_run_post_handle_dependers): Increment task_queued_count.
1219 (gomp_barrier_handle_tasks): Don't call
1220 gomp_team_barrier_clear_task_pending here.
1222 * testsuite/libgomp.c/udr-2.c (main): Remove unused variable i.
1223 * testsuite/libgomp.c/udr-3.c (main): Initialize i to 0.
1224 * testsuite/libgomp.c++/udr-8.C (main): Likewise.
1226 * testsuite/libgomp.c/affinity-1.c (min_cpusetsize): New variable.
1227 (pthread_getaffinity_np): Set it when setting contig_cpucount.
1228 (print_affinity): Use it for size, only use sysconf value if that is not
1229 set and if it is smaller than sizeof (cpu_set_t), use sizeof (cpu_set_t).
1231 2013-10-07 Jakub Jelinek <jakub@redhat.com>
1233 * testsuite/libgomp.c/affinity-1.c (main): Fork even if
1234 contig_cpucount is > 8.
1237 * config/linux/proc.c: Include errno.h.
1238 (gomp_get_cpuset_size): New variable.
1239 (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
1241 (gomp_init_num_threads): If CPU_ALLOC_SIZE is defined and
1242 pthread_getaffinity_np returned EINVAL, increase gomp_cpuset_size
1243 and retry. After successful pthread_getaffinity_np copy
1244 gomp_cpuset_size to gomp_get_cpuset_size and try to find out
1245 minimum gomp_cpuset_size that covers all the CPUs set in gomp_cpusetp.
1246 (get_num_procs): Pass gomp_get_cpuset_size rather than gomp_cpuset_size
1247 to pthread_getaffinity_np, adjust gomp_cpuset_popcount caller.
1248 * config/linux/proc.h (gomp_cpuset_popcount): Add cpusetsize argument.
1249 * config/linux/affinity.c (gomp_affinity_finalize_place_list,
1250 gomp_affinity_init_level): Adjust gomp_cpuset_popcount callers.
1251 * testsuite/libgomp.c/affinity-1.c (pthread_getaffinity_np): Set
1252 contig_cpucount from the first successful pthread_getaffinity_np
1253 call, rather than just first call.
1255 2013-10-04 Jakub Jelinek <jakub@redhat.com>
1257 * libgomp.h (struct gomp_task_icv): Add thread_limit_var.
1258 (gomp_thread_limit_var, gomp_remaining_threads_count,
1259 gomp_remaining_threads_lock): Remove.
1260 (gomp_managed_threads_lock): New variable.
1261 (struct gomp_thread_pool): Add threads_busy field.
1262 (gomp_free_thread): New prototype.
1263 * parallel.c (gomp_resolve_num_threads): Adjust for
1264 thread_limit now being in icv->thread_limit_var. Use
1265 UINT_MAX instead of ULONG_MAX as infinity. If not nested,
1266 just return minimum of max_num_threads and icv->thread_limit_var
1267 and if thr->thread_pool, set threads_busy to the returned value.
1268 Otherwise, don't update atomically gomp_remaining_threads_count,
1269 but instead thr->thread_pool->threads_busy.
1270 (GOMP_parallel_end): Adjust for thread_limit now being in
1271 icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
1272 infinity. Adjust threads_busy in the pool rather than
1273 gomp_remaining_threads_count. Remember team->nthreads and call
1274 gomp_team_end before adjusting threads_busy, if not nested
1275 afterwards, just set it to 1 non-atomically.
1276 * team.c (gomp_thread_start): Clear thr->thread_pool and
1277 thr->task before returning.
1278 (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
1279 before calling pthread_exit.
1280 (gomp_free_thread): No longer static. Use
1281 gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
1282 (gomp_team_start): Set thr->thread_pool->threads_busy to
1283 nthreads immediately after creating new pool. Use
1284 gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
1285 (gomp_team_end): Use gomp_managed_threads_lock instead of
1286 gomp_remaining_threads_lock.
1287 (initialize_team): Don't call gomp_sem_init here.
1288 * env.c (gomp_global_icv): Initialize thread_limit_var field.
1289 (gomp_thread_limit_var, gomp_remaining_threads_count,
1290 gomp_remaining_threads_lock): Remove.
1291 (gomp_managed_threads_locks): New variable.
1292 (handle_omp_display_env): Adjust for thread_limit var being
1294 (initialize_env): Likewise. If user provided value is > INT_MAX,
1295 set gomp_global_icv.thread_limit_var to UINT_MAX (infinity).
1296 Initialize gomp_managed_threads_lock instead of
1297 gomp_remaining_threads_lock.
1298 (omp_get_thread_limit): Adjust for thread_limit var in
1299 icv->thread_limit_var.
1300 * target.c: Include limits.h.
1301 (resolve_device): If device_id is < -1, return NULL.
1302 (gomp_map_vars): Make sure tgt->array, tgt->to_free, tgt->tgt_start,
1303 tgt->tgt_end and k->copy_from aren't left uninitialized.
1304 (GOMP_target): Arrange for host callback to be performed in a
1305 separate initial thread and contention group, inheriting ICVs from
1306 gomp_global_icv etc.
1307 (GOMP_teams): Adjust thread_limit_var ICV.
1308 * testsuite/libgomp.c/affinity-1.c (main): Call omp_set_dynamic (0).
1309 * testsuite/libgomp.c/target-3.c: New test.
1310 * testsuite/libgomp.c/target-4.c: New test.
1311 * testsuite/libgomp.c/target-5.c: New test.
1312 * testsuite/libgomp.c/target-6.c: New test.
1313 * testsuite/libgomp.c/target-7.c: New test.
1314 * testsuite/libgomp.c/thread-limit-1.c: New test.
1315 * testsuite/libgomp.c/thread-limit-2.c: New test.
1316 * testsuite/libgomp.c/thread-limit-3.c: New test.
1318 * libgomp.h (struct gomp_team_state): Add place_partition_off
1319 and place_partition_len fields.
1320 (struct gomp_task_icv): Add bind_var field.
1321 (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
1322 gomp_places_list_len): New extern decls.
1323 (struct gomp_thread): Add place field.
1324 (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
1325 (gomp_init_thread_affinity): Add place argument.
1326 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1327 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1328 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1329 gomp_affinity_init_level, gomp_affinity_print_place): New prototypes.
1330 (gomp_team_start): Add flags argument.
1331 * team.c (struct gomp_thread_start_data): Add place field.
1332 (gomp_thread_start): Initialize thr->place.
1333 (gomp_team_start): Add flags argument. Handle OpenMP 4.0 affinity.
1334 * env.c (gomp_global_icv): Initialize bind_var field.
1335 (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
1336 (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
1337 gomp_places_list_len): New variables.
1338 (parse_bind_var, parse_one_place, parse_places_var): New functions.
1339 (parse_affinity): Rewritten to construct OMP_PLACES list with unit
1341 (handle_omp_display_env): Remove proc_bind argument. Set display
1342 to true for OMP_DISPLAY_ENV=true. Print 201307 instead of 201107
1343 as _OPENMP. Enhance printing of OMP_PROC_BIND, add printing
1344 of OMP_PLACES, don't print anything for GOMP_CPU_AFFINITY.
1345 (initialize_env): Use parse_bind_var to parse OMP_PROC_BIND
1346 instead of parse_boolean. Use parse_places_var for OMP_PLACES
1347 parsing. Don't call parse_affinity if OMP_PLACES has been
1348 successfully parsed (and call gomp_init_affinity in that case).
1349 Adjust handle_omp_display_env caller.
1350 (omp_get_proc_bind): Return bind_var ICV.
1351 * config/posix/affinity.c (gomp_init_thread_affinity): Add place
1353 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1354 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1355 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1356 gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
1357 * config/linux/proc.c (gomp_cpuset_popcount): Fix up check extern decl.
1358 (gomp_init_num_threads): If HAVE_PTHREAD_AFFINITY_NP isn't defined,
1359 fix up sizeof argument. Free and clear gomp_cpusetp if it didn't
1360 contain any logical CPUs.
1361 (get_num_procs): Check gomp_places_list instead of gomp_cpu_affinity.
1362 * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
1363 (affinity_counter): Remove.
1364 (CPU_CLR_S): Define if CPU_ALLOC_SIZE is not defined.
1365 (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
1366 silently create OMP_PLACES=threads, if it is non-NULL afterwards,
1367 bind current thread to the first place.
1368 (gomp_init_thread_affinity): Rewritten. Add place argument, just
1369 pthread_setaffinity_np to gomp_places_list[place].
1370 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1371 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1372 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1373 gomp_affinity_init_level, gomp_affinity_print_place): New functions.
1374 * parallel.c (GOMP_parallel_start): Adjust gomp_team_start caller.
1375 (GOMP_parallel): Likewise, pass through flags parameter to it.
1376 * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
1378 (GOMP_parallel_sections): Likewise, pass through flags parameter to it.
1379 * loop.c (gomp_parallel_loop_start): Add flags argument, pass it through
1381 (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
1382 GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
1383 Adjust gomp_parallel_loop_start callers.
1384 (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1385 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): Likewise, pass
1386 through flags parameter to it.
1387 * testsuite/libgomp.c/affinity-1.c: New test.
1388 * testsuite/libgomp.c++/affinity-1.C: New test.
1390 2013-10-01 Jakub Jelinek <jakub@redhat.com>
1393 * config/linux/proc.c (gomp_cpuset_size, gomp_cpusetp): New variables.
1394 (gomp_cpuset_popcount): Use CPU_COUNT_S if available, or CPU_COUNT if
1395 gomp_cpuset_size is sizeof (cpu_set_t). Use gomp_cpuset_size instead
1396 of sizeof (cpu_set_t) to determine number of iterations.
1397 (gomp_init_num_threads): Initialize gomp_cpuset_size and gomp_cpusetp
1398 here, use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size
1399 instead of sizeof (cpu_set_t) to pthread_getaffinity_np.
1400 (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
1401 is NULL. Use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size
1402 instead of sizeof (cpu_set_t) to pthread_getaffinity_np.
1403 * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
1404 (gomp_cpuset_size, gomp_cpusetp): Declare.
1405 * config/linux/affinity.c (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S): Define
1406 if CPU_ALLOC_SIZE isn't defined.
1407 (gomp_init_affinity): Don't call pthread_getaffinity_np here, instead
1408 use gomp_cpusetp computed by gomp_init_num_threads. Use CPU_*_S
1409 variants of macros with gomp_cpuset_size as set size, for cpusetnew
1410 use alloca for it if CPU_ALLOC_SIZE is defined, otherwise local
1411 fixed size variable.
1412 (gomp_init_thread_affinity): Use CPU_*_S variants of macros with
1413 gomp_cpuset_size as set size, for cpuset use alloca for it if
1414 CPU_ALLOC_SIZE is defined, otherwise local fixed size variable.
1416 2013-09-27 Jakub Jelinek <jakub@redhat.com>
1418 * libgomp.h: Include stdlib.h.
1419 (struct gomp_task_depend_entry,
1420 struct gomp_dependers_vec): New types.
1421 (struct gomp_task): Add dependers, depend_hash, depend_count,
1422 num_dependees and depend fields.
1423 (struct gomp_taskgroup): Add num_children field.
1424 (gomp_finish_task): Free depend_hash if non-NULL.
1425 * libgomp_g.h (GOMP_task): Add depend argument.
1426 * hashtab.h: New file.
1427 * task.c: Include hashtab.h.
1428 (hash_entry_type): New typedef.
1429 (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
1430 (gomp_init_task): Clear dependers, depend_hash and depend_count
1432 (GOMP_task): Add depend argument, handle depend clauses. Increment
1433 num_children field in taskgroup.
1434 (gomp_task_run_pre): Don't increment task_running_count here,
1435 nor clear task_pending bit.
1436 (gomp_task_run_post_handle_depend_hash,
1437 gomp_task_run_post_handle_dependers,
1438 gomp_task_run_post_handle_depend): New functions.
1439 (gomp_task_run_post_remove_parent): Clear in_taskwait before
1440 signalling corresponding semaphore.
1441 (gomp_task_run_post_remove_taskgroup): Decrement num_children
1442 field and make the decrement to 0 MEMMODEL_RELEASE operation,
1443 rather than storing NULL to taskgroup->children. Clear
1444 in_taskgroup_wait before signalling corresponding semaphore.
1445 (gomp_barrier_handle_tasks): Move task_running_count increment
1446 and task_pending bit clearing here. Call
1447 gomp_task_run_post_handle_depend. If more than one new tasks
1448 have been queued, wake other threads if needed.
1449 (GOMP_taskwait): Call gomp_task_run_post_handle_depend. If more
1450 than one new tasks have been queued, wake other threads if needed.
1451 After waiting on taskwait_sem, enter critical section again.
1452 (GOMP_taskgroup_start): Initialize num_children field.
1453 (GOMP_taskgroup_end): Check num_children instead of children
1454 before critical section. If children is NULL, but num_children
1455 is non-zero, wait on taskgroup_sem. Call
1456 gomp_task_run_post_handle_depend. If more than one new tasks have
1457 been queued, wake other threads if needed. After waiting on
1458 taskgroup_sem, enter critical section again.
1459 * testsuite/libgomp.c/depend-1.c: New test.
1460 * testsuite/libgomp.c/depend-2.c: New test.
1461 * testsuite/libgomp.c/depend-3.c: New test.
1462 * testsuite/libgomp.c/depend-4.c: New test.
1464 2013-09-26 Jakub Jelinek <jakub@redhat.com>
1467 * testsuite/libgomp.c/simd-6.c: New test.
1468 * testsuite/libgomp.c++/simd-8.C: New test.
1470 2013-09-25 Jakub Jelinek <jakub@redhat.com>
1472 * parallel.c (GOMP_cancellation_point, GOMP_cancel): Handle
1473 GIMPLE_CANCEL_TASKGROUP cancellation.
1474 * libgomp.h (struct gomp_task): Add next_taskgroup, prev_taskgroup,
1475 taskgroup and copy_ctors_done fields.
1476 (struct gomp_taskgroup): New type.
1477 * task.c (gomp_init_task): Initialize copy_ctors_done and taskgroup
1479 (GOMP_task): Don't start a new thread also if it's taskgroup has
1480 been cancelled. Set copy_ctors_done field if needed. Initialize
1481 taskgroup field. If copy_ctors_done and already cancelled, don't
1482 discard the task. If taskgroup is non-NULL, enqueue the task
1483 into taskgroup queue.
1484 (gomp_task_run_pre, gomp_task_run_post_remove_parent,
1485 gomp_task_run_post_remove_taskgroup): New inline functions.
1486 (gomp_barrier_handle_tasks, GOMP_taskwait): Use them.
1487 (GOMP_taskgroup_start, GOMP_taskgroup_end): Implement taskgroup
1489 * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
1490 * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
1491 * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
1492 * testsuite/libgomp.c++/cancel-for-1.C: New test.
1493 * testsuite/libgomp.c++/cancel-for-1.C: New test.
1494 * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
1495 * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
1496 * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
1497 * testsuite/libgomp.c++/cancel-test.h: New file.
1498 * testsuite/libgomp.c++/cancel-sections-1.C: New test.
1499 * testsuite/libgomp.c++/taskgroup-1.C: New test.
1500 * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
1501 * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
1502 * testsuite/libgomp.c/taskgroup-1.c: New test.
1503 * testsuite/libgomp.c/cancel-parallel-3.c (do_some_work): Use
1506 2013-09-24 Richard Henderson <rth@redhat.com>
1507 Jakub Jelinek <jakub@redhat.com>
1509 * libgomp.map (GOMP_4.0): Export GOMP_barrier_cancel,
1510 GOMP_loop_end_cancel, GOMP_sections_end_cancel.
1511 * parallel.c (GOMP_cancellation_point): Add WHICH argument, do nothing
1512 if gomp_cancel_var is false, handle workshare and parallel
1513 cancellation point, add ialias.
1514 (GOMP_cancel): Add WHICH and DO_CANCEL arguments, do nothing if
1515 gomp_cancel_var is false, call GOMP_cancellation_point if DO_CANCEL
1516 is false, handle workshare and parallel cancellation.
1517 * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
1518 (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
1519 Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
1520 (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
1521 gomp_team_barrier_cancel): New functions.
1522 * config/posix/bar.h (gomp_barrier_t): Add cancellable field.
1523 (BAR_CANCELLED): Define.
1524 (BAR_INCR): Set to 8.
1525 (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
1526 gomp_team_barrier_cancel): New prototypes.
1527 (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
1528 (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
1529 gomp_team_barrier_cancelled): New inline functions.
1530 * config/linux/bar.c (gomp_team_barrier_wait_end): Clear BAR_CANCELLED
1531 from state where needed. Set work_share_cancelled to 0 on last thread.
1532 (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
1533 gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
1535 * config/linux/bar.h (gomp_barrier_t): Add awaited_final field.
1536 (BAR_CANCELLED): Define.
1537 (BAR_INCR): Set to 8.
1538 (gomp_barrier_init): Initialize awaited_final field.
1539 (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
1540 gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
1542 (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
1543 (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
1544 gomp_team_barrier_cancelled): New inline functions.
1545 * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
1546 team->work_shares_to_free to thr->ts.work_share before calling
1548 (gomp_work_share_end_cancel): New function.
1549 * team.c (gomp_thread_start): Use gomp_team_barrier_wait_final
1550 instead of gomp_team_barrier_wait.
1551 (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled
1552 and team_cancelled fields.
1553 (gomp_team_end): Use gomp_team_barrier_wait_final instead of
1554 gomp_team_barrier_wait. If team->team_cancelled, call
1555 gomp_fini_worshare on ws chain starting at team->work_shares_to_free
1556 rather than thr->ts.work_share.
1557 * env.c (gomp_global_icv): Initialize target_data field.
1558 (gomp_cancel_var): New global variable.
1559 (handle_omp_display_env): Print cancel-var ICV.
1560 (initialize_env): Parse OMP_CANCELLATION env var.
1561 (omp_get_cancellation): Return gomp_cancel_var.
1562 * barrier.c (GOMP_barrier_cancel): New function.
1563 * libgomp.h (gomp_cancel_var): New extern decl.
1564 (struct gomp_team): Add work_shares_to_free, work_share_cancelled
1565 and team_cancelled fields.
1566 (gomp_cancel_kind): New enum.
1567 (gomp_work_share_end_cancel): New prototype.
1568 * libgomp_g.h (GOMP_barrier_cancel, GOMP_loop_end_cancel,
1569 GOMP_sections_end_cancel): New prototypes.
1570 (GOMP_cancel, GOMP_cancellation_point): Adjust prototypes.
1571 * task.c (GOMP_task): If gomp_team_barrier_cancelled, don't
1572 queue or start new tasks.
1573 (gomp_barrier_handle_tasks): If gomp_team_barrier_cancelled,
1574 don't start any new tasks, just free all tasks.
1575 * sections.c (GOMP_sections_end_cancel): New function.
1576 * loop.c (GOMP_loop_end_cancel): New function.
1577 * testsuite/libgomp.c/cancel-parallel-1.c: New test.
1578 * testsuite/libgomp.c/cancel-parallel-2.c: New test.
1579 * testsuite/libgomp.c/cancel-parallel-3.c: New test.
1580 * testsuite/libgomp.c/cancel-for-1.c: New test.
1581 * testsuite/libgomp.c/cancel-for-2.c: New test.
1582 * testsuite/libgomp.c/cancel-sections-1.c: New test.
1584 2013-09-23 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1586 * configure.ac: Add checks for plugins support.
1587 * config.h.in: Regenerated.
1588 * configure: Regenerated.
1589 * target.c (struct target_mem_desc): Add device_descr field.
1592 (struct gomp_device_descr): New.
1593 (gomp_get_num_devices): Call gomp_target_init.
1594 (resolve_device): Return device_descr instead of int.
1595 (gomp_map_vars): Add devicep argument and update the function
1597 (gomp_unmap_tgt): Likewise.
1598 (gomp_unmap_vars): Likewise.
1599 (gomp_update): Likewise.
1600 (GOMP_target): Use device_descr struct.
1601 (GOMP_target_data): Likewise.
1602 (GOMP_target_update): Likewise.
1603 (gomp_check_plugin_file_name): New.
1604 (gomp_load_plugin_for_device): New.
1605 (gomp_find_available_plugins): New.
1606 (gomp_target_init): New.
1608 2013-09-19 Jakub Jelinek <jakub@redhat.com>
1610 * libgomp_g.h (GOMP_target): Change 3rd argument to const void *.
1611 (GOMP_target_data, GOMP_target_update): Add openmp_target argument.
1612 * target.c (GOMP_target): Change fnname argument to openmp_target,
1613 with const void * type.
1614 (GOMP_target_data, GOMP_target_update): Add openmp_target argument.
1616 * testsuite/libgomp.c/simd-4.c: New test.
1617 * testsuite/libgomp.c/simd-5.c: New test.
1618 * testsuite/libgomp.c/udr-1.c: New test.
1619 * testsuite/libgomp.c/udr-2.c: New test.
1620 * testsuite/libgomp.c/udr-3.c: New test.
1621 * testsuite/libgomp.c++/udr-9.C: New test.
1623 2013-09-18 Jakub Jelinek <jakub@redhat.com>
1625 * testsuite/libgomp.c++/simd-4.C: New test.
1626 * testsuite/libgomp.c++/simd-5.C: New test.
1627 * testsuite/libgomp.c++/simd-6.C: New test.
1628 * testsuite/libgomp.c++/simd-7.C: New test.
1629 * testsuite/libgomp.c++/udr-1.C: New test.
1630 * testsuite/libgomp.c++/udr-2.C: New test.
1631 * testsuite/libgomp.c++/udr-3.C: New test.
1632 * testsuite/libgomp.c++/udr-4.C: New test.
1633 * testsuite/libgomp.c++/udr-5.C: New test.
1634 * testsuite/libgomp.c++/udr-6.C: New test.
1635 * testsuite/libgomp.c++/udr-7.C: New test.
1636 * testsuite/libgomp.c++/udr-8.C: New test.
1638 2013-09-16 Jakub Jelinek <jakub@redhat.com>
1640 * splay-tree.h: New file.
1641 * target.c: Include stdbool.h.
1642 (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
1643 (struct target_mem_desc, struct splay_tree_key_s): New structures.
1644 (splay_compare): New inline function.
1645 (gomp_get_num_devices): New function.
1646 (resolve_device): Use default_device_var ICV. Add temporarily
1647 magic testing device number 257.
1648 (dev_splay_tree, dev_env_lock): New variables.
1649 (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt,
1650 gomp_unmap_vars, gomp_update): New functions.
1651 (GOMP_target, GOMP_target_data, GOMP_target_end_data,
1652 GOMP_target_update): Add support for magic testing device number 257.
1653 * libgomp.h (struct target_mem_desc): Forward declare.
1654 (struct gomp_task_icv): Add default_device_var and target_data.
1655 (gomp_get_num_devices): New prototype.
1656 * env.c (gomp_global_icv): Add default_device_var initializer.
1657 (parse_int): New function.
1658 (handle_omp_display_env): Print OMP_DEFAULT_DEVICE.
1659 (initialize_env): Initialize default_device_var.
1660 (omp_set_default_device): Set default_device_var ICV.
1661 (omp_get_default_device): Query default_device_var ICV.
1662 (omp_get_num_devices): Call gomp_get_num_devices.
1663 (omp_get_num_teams, omp_get_team_num, omp_is_initial_device): Add
1666 2013-09-13 Jakub Jelinek <jakub@redhat.com>
1668 PR tree-optimization/58392
1669 * testsuite/libgomp.c/pr58392.c: New test.
1671 2013-09-06 Jakub Jelinek <jakub@redhat.com>
1673 * testsuite/libgomp.c/target-2.c: New test.
1674 * testsuite/libgomp.c++/target-3.C: New test.
1676 2013-09-05 Jakub Jelinek <jakub@redhat.com>
1678 * testsuite/libgomp.c++/target-2.C: New test.
1679 * testsuite/libgomp.c++/target-2-aux.cc: New file.
1681 * libgomp.map (GOMP_4.0): Add GOMP_target, GOMP_target_data,
1682 GOMP_target_end_data, GOMP_target_update and GOMP_teams.
1683 * Makefile.am (libgomp_la_SOURCES): Add target.c.
1684 * Makefile.in: Regenerated.
1685 * target.c: New file.
1686 * libgomp_g.h (GOMP_target, GOMP_target_data,
1687 GOMP_target_end_data, GOMP_target_update, GOMP_teams): New prototypes.
1688 * testsuite/libgomp.c++/for-11.C (main): Uncomment
1689 #pragma omp target teams directive.
1690 * testsuite/libgomp.c/for-3.c (main): Likewise.
1691 * testsuite/libgomp.c++/target-1.C: New test.
1692 * testsuite/libgomp.c/target-1.c: New test.
1694 2013-07-06 Jakub Jelinek <jakub@redhat.com>
1696 * testsuite/libgomp.c/for-3.c: New test.
1697 * testsuite/libgomp.c/simd-1.c: New test.
1698 * testsuite/libgomp.c/simd-2.c: New test.
1699 * testsuite/libgomp.c/simd-3.c: New test.
1701 2013-07-05 Richard Henderson <rth@redhat.com>
1703 * config/linux/bar.c (gomp_team_barrier_wait_end): Remove one more
1704 hard-coded constant.
1706 2013-07-03 Richard Henderson <rth@redhat.com>
1708 * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
1709 BAR_WAITING_FOR_TASK, BAR_INCR): New.
1710 (gomp_barrier_wait_start, gomp_barrier_last_thread,
1711 gomp_team_barrier_set_task_pending,
1712 gomp_team_barrier_clear_task_pending,
1713 gomp_team_barrier_set_waiting_for_tasks,
1714 gomp_team_barrier_waiting_for_tasks,
1715 gomp_team_barrier_done): Use them.
1716 * config/linux/bar.c (gomp_barrier_wait_end,
1717 gomp_barrier_wait_last, gomp_team_barrier_wait_end): Likewise.
1718 * config/posix/bar.h, config/posix/bar.c: Similarly.
1720 2013-07-03 Jakub Jelinek <jakub@redhat.com>
1722 * testsuite/libgomp.c++/atomic-14.C: Adjust for stricter atomic
1724 * testsuite/libgomp.c++/atomic-15.C: Likewise.
1725 * testsuite/libgomp.c/atomic-17.c: Likewise.
1727 2013-06-28 Jakub Jelinek <jakub@redhat.com>
1729 * testsuite/libgomp.c++/simd-1.C: New test.
1730 * testsuite/libgomp.c++/simd-2.C: New test.
1731 * testsuite/libgomp.c++/simd-3.C: New test.
1733 2013-06-21 Jakub Jelinek <jakub@redhat.com>
1735 * testsuite/libgomp.c/for-1.h: New file.
1736 * testsuite/libgomp.c/for-2.h: New file.
1737 * testsuite/libgomp.c/for-1.c: New test.
1738 * testsuite/libgomp.c/for-2.c: New test.
1739 * testsuite/libgomp.c++/for-9.C: New test.
1740 * testsuite/libgomp.c++/for-10.C: New test.
1741 * testsuite/libgomp.c++/for-11.C: New test.
1743 2013-06-12 Jakub Jelinek <jakub@redhat.com>
1745 * fortran.c (omp_is_initial_device): Add ialias_redirect.
1746 (omp_is_initial_device_): New function.
1747 * omp_lib.f90.in (omp_is_initial_device): New interface.
1748 * omp.h.in (omp_is_initial_device): New prototype.
1749 * libgomp.map (omp_is_initial_device, omp_is_initial_device_):
1751 * env.c (omp_is_initial_device): New function. Add ialias for it.
1752 * omp_lib.h.in (omp_is_initial_device): New external.
1754 * omp_lib.f90.in (omp_get_dynamic, omp_get_nested,
1755 omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
1756 omp_get_num_threads, omp_get_thread_num, omp_get_thread_limit,
1757 omp_set_max_active_levels, omp_get_max_active_levels,
1758 omp_get_level, omp_get_ancestor_thread_num,
1759 omp_get_team_size, omp_get_active_level, omp_in_final,
1760 omp_get_cancellation, omp_get_default_device,
1761 omp_get_num_devices, omp_get_num_teams, omp_get_team_num): Remove
1762 useless use omp_lib_kinds.
1764 2013-04-30 Jakub Jelinek <jakub@redhat.com>
1766 * testsuite/libgomp.c/atomic-17.c: New test.
1767 * testsuite/libgomp.c++/atomic-14.C: New test.
1768 * testsuite/libgomp.c++/atomic-15.C: New test.
1770 2013-04-10 Jakub Jelinek <jakub@redhat.com>
1772 * libgomp.map (omp_get_cancellation, omp_get_cancellation_,
1773 omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device,
1774 omp_set_default_device_, omp_set_default_device_8_,
1775 omp_get_default_device, omp_get_default_device_,
1776 omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams,
1777 omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export
1779 (GOMP_cancel, GOMP_cancellation_point, GOMP_parallel_loop_dynamic,
1780 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
1781 GOMP_parallel_loop_static, GOMP_parallel_sections, GOMP_parallel,
1782 GOMP_taskgroup_start, GOMP_taskgroup_end): Export @@GOMP_4.0.
1783 * parallel.c (GOMP_parallel_end): Add ialias.
1784 (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New
1786 * omp.h.in (omp_proc_bind_t): New typedef.
1787 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1788 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1789 omp_get_team_num): New prototypes.
1790 * env.c (omp_get_cancellation, omp_get_proc_bind,
1791 omp_set_default_device, omp_get_default_device, omp_get_num_devices,
1792 omp_get_num_teams, omp_get_team_num): New functions.
1793 * fortran.c (ULP, STR1, STR2, ialias_redirect): Removed.
1794 (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
1795 omp_set_default_device_8_, omp_get_default_device_,
1796 omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
1798 * libgomp.h (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect,
1799 ialias_call): Define.
1800 * libgomp_g.h (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1801 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel,
1802 GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start,
1803 GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes.
1804 * task.c (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
1805 * sections.c (GOMP_parallel_sections): New function.
1806 * loop.c (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1807 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): New
1809 (GOMP_parallel_end): Add ialias_redirect.
1810 * omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false,
1811 omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1812 omp_proc_bind_spread): New params.
1813 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1814 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1815 omp_get_team_num): New interfaces.
1816 * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
1817 omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1818 omp_proc_bind_spread): New params.
1819 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1820 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1821 omp_get_team_num): New externals.
1823 2013-03-20 Tobias Burnus <burnus@net-b.de>
1825 * libgomp.texi (Environment Variables): Minor cleanup,
1826 update section refs to OpenMP 4.0rc2.
1827 (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
1828 environment variables.
1830 2013-03-20 Tobias Burnus <burnus@net-b.de>
1832 * env.c (handle_omp_display_env): New function.
1833 (initialize_env): Use it.
1835 2013-03-20 Jakub Jelinek <jakub@redhat.com>
1837 * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
1838 * testsuite/libgomp.c/atomic-15.c: New test.
1839 * testsuite/libgomp.c/atomic-16.c: New test.
1841 * testsuite/libgomp.c++/atomic-10.C: New test.
1842 * testsuite/libgomp.c++/atomic-11.C: New test.
1843 * testsuite/libgomp.c++/atomic-12.C: New test.
1844 * testsuite/libgomp.c++/atomic-13.C: New test.
1846 Copyright (C) 2013-2014 Free Software Foundation, Inc.
1848 Copying and distribution of this file, with or without modification,
1849 are permitted in any medium without royalty provided the copyright
1850 notice and this notice are preserved.