1 2014-10-28 Thomas Schwinge <thomas@codesourcery.com>
3 * testsuite/libgomp.oacc-c/c.exp (ld_library_path, ALWAYS_CFLAGS):
4 Don't refer to CUDA installation in /opt/nvidia/cuda-5.5/.
6 * oacc-init.c: Don't use <sys/queue.h>'s SLIST_*.
7 * plugin-nvptx.c: Likewise.
9 2014-10-23 Thomas Schwinge <thomas@codesourcery.com>
11 * testsuite/libgomp.oacc-c/reduction-initial-1.c: New file.
13 2014-10-20 Cesar Philippidis <cesar@codesourcery.com>
15 * (GOACC_update): Declare.
17 2014-10-20 Julian Brown <julian@codesourcery.com>
19 * oacc-host.c (openacc_register_async_cleanup): New.
20 (host_dispatch): Initialise register_async_cleanup_func entry.
21 * oacc-int.h (struct ACC_dispatch_t): Add
22 register_async_cleanup_func hook.
23 * oacc-parallel.c (GOACC_parallel): Call
24 register_async_cleanup_func hook after queuing asynchronous
26 * plugin-nvptx.c (enum PTX_event_type): Add PTX_EVT_ASYNC_CLEANUP.
27 (struct PTX_event): Remove tgt field.
28 (event_gc): Don't do async cleanup in PTX_EVT_KNL, do it in
29 PTX_EVT_ASYNC_CLEANUP instead.
30 (event_add): Remove tgt argument. Support PTX_EVT_ASYNC_CLEANUP
32 (PTX_exec, PTX_host2dev, PTX_dev2host, PTX_wait_async)
33 (PTX_wait_all_async): Update calls to event_add.
34 (openacc_register_async_cleanup): New.
35 (PTX_async_test): Call event_gc on success path.
36 (PTX_async_test_all): Likewise.
37 * target.c (gomp_load_plugin_for_device): Initialise
38 register_async_cleanup hook.
40 2014-10-20 Julian Brown <julian@codesourcery.com>
42 * Makefile.am (AM_CPPFLAGS): Fix search path for locating
44 * Makefile.in: Regenerate.
46 2014-10-20 Julian Brown <julian@codesourcery.com>
48 * libgomp-plugin.c (gomp_plugin_*): Rename to...
49 (GOMP_PLUGIN_*): This.
50 * libgomp-plugin.h: Likewise.
51 * libgomp.map: Likewise.
52 * oacc-host.c (GOMP): Use GOMP_PLUGIN_ in macro expansion.
53 * oacc-plugin.c (gomp_plugin_*): Rename to...
54 (GOMP_PLUGIN_*): This.
55 * plugin-nvptx.c: Likewise.
57 2014-10-17 Thomas Schwinge <thomas@codesourcery.com>
58 James Norris <jnorris@codesourcery.com>
60 * libgomp.texi: Outline documentation for OpenACC.
62 2014-10-17 James Norris <jnorris@codesourcery.com>
63 Thomas Schwinge <thomas@codesourcery.com>
64 Tom de Vries <tom@codesourcery.com>
65 Cesar Philippidis <cesar@codesourcery.com>
67 * testsuite/Makefile.in: Regenerated.
68 * testsuite/lib/libgomp.exp
69 (check_effective_target_openacc_nvidia_accel_present)
70 (check_effective_target_openacc_nvidia_accel_selected): New
72 * testsuite/libgomp.oacc-fortran/fortran.exp: New exp file.
73 * testsuite/libgomp.oacc-fortran/*.f: New tests.
74 * testsuite/libgomp.oacc-fortran/*.f90: Likewise.
75 * testsuite/libgomp.oacc-c/c.exp: New exp file.
76 * testsuite/libgomp.oacc-c/subr.ptx: New file.
77 * testsuite/libgomp.oacc-c/subr.cu: New file.
78 * testsuite/libgomp.oacc-c/timer.h: New file.
79 * testsuite/libgomp.oacc-c/*.c: New tests.
80 * testsuite/libgomp.oacc-c++/c++.exp: New exp file.
82 2014-10-17 Nathan Sidwell <nathan@codesourcery.com>
83 James Norris <jnorris@codesourcery.com>
84 Thomas Schwinge <thomas@codesourcery.com>
85 Tom de Vries <tom@codesourcery.com>
86 Julian Brown <julian@codesourcery.com>
88 * Makefile.am (AM_CPPFLAGS): Search in ../include also.
89 (libgomp_plugin_nvptx_version_info, libgomp_plugin_nvptx_la_SOURCES)
90 (libgomp_plugin_nvptx_la_CPPFLAGS, libgomp_plugin_nvptx_la_LDFLAGS)
91 (libgomp_plugin_nvptx_la_LIBADD)
92 (libgomp_plugin_nvptx_la_LIBTOOLFLAGS): Set variables if
93 PLUGIN_NVPTX is defined.
94 (toolexeclib_LTLIBRARIES): Add nonshm-host
95 and (conditionally) nvidia plugins.
96 (libgomp_plugin_nonshm_host_version_info)
97 (libgomp_plugin_nonshm_host_la_SOURCES)
98 (libgomp_plugin_nonshm_host_la_CPPFLAGS)
99 (libgomp_plugin_nonshm_host_la_LDFLAGS)
100 (libgomp_plugin_nonshm_host_la_LIBTOOLFLAGS): Set variables.
101 (libgomp_la_SOURCES): Add oacc-parallel.c, splay-tree.c,
102 oacc-host.c, oacc-init.c, oacc-mem.c, oacc-async.c, oacc-plugin.c,
103 oacc-cuda.c, libgomp-plugin.c.
104 (nodist_libsubinclude_HEADERS): Add openacc.h,
105 ../include/gomp-constants.h.
106 * Makefile.in: Regenerate.
107 * config.h.in: Regenerate.
108 * configure.ac: Add TODOs for OpenACC in various places.
109 (CUDA_DRIVER_CPPFLAGS, CUDA_DRIVER_LDFLAGS): Initialize.
110 (--with-cuda-driver, --with-cuda-driver-include)
111 (--with-cuda-driver-lib, --enable-offload-targets): Implement new
113 (PLUGIN_NVPTX, PLUGIN_NVPTX_CPPFLAGS, PLUGIN_NVPTX_LDFLAGS)
114 (PLUGIN_NVPTX_LIBS): Initialize variables.
115 * configure: Regenerate.
116 * env.c (target.h): Include.
117 (goacc_device_num, goacc_device_type): New globals.
118 (goacc_parse_device_num, goacc_parse_device_type): New functions.
119 (initialize_env): Parse GCC_ACC_NOTIFY, ACC_DEVICE_TYPE,
120 ACC_DEVICE_NUM environment variables.
121 * error.c (gomp_verror, gomp_vfatal, gomp_vnotify, gomp_notify):
123 (gomp_fatal): Make global.
124 * libgomp.h (stdarg.h): Include.
125 (struct gomp_memory_mapping): Forward declaration.
126 (struct gomp_task_icv): Add acc_notify_var member.
127 (goacc_device_num, goacc_device_type): Add extern declarations.
128 (gomp_vnotify, gomp_notify, gomp_verror, gomp_vfatal): Add
130 (gomp_init_targets_once): Add prototype.
131 * libgomp.map (OACC_2.0): New symbol version. Add public acc_*
133 (PLUGIN_1.0): New symbol version. Add gomp plugin interface
135 * libgomp_g.h (GOACC_kernels, GOACC_parallel): Update prototypes.
136 (GOACC_wait): Add prototype.
137 * target.c (limits.h, stdbool.h, stdlib.h): Don't include.
138 (oacc-plugin.h, gomp-constants.h, stdio.h, assert.h): Include.
139 (splay_tree_node, splay_tree, splay_tree_key, target_mem_desc)
140 (splay_tree_key_s, enum target_type, gomp_device_descr): Don't
142 (splay-tree.h): Include.
144 (splay_compare): Change linkage to hidden not static.
145 (gomp_init_targets_once): New function.
146 (gomp_get_num_devices): Use above.
147 (dump_mappings): New function (for debugging).
148 (get_kind): New function.
149 (gomp_map_vars): Add gomp_memory_mapping (mm), is_openacc
150 parameters. Change KINDS to void *. Use lock from memory map
151 not device. Use macros from gomp-constants.h instead of
152 hard-coded values. Support OpenACC-specific mappings.
153 (gomp_copy_from_async): New function.
154 (gomp_unmap_vars): Add DO_COPYFROM argument. Only copy memory
155 back from device if it is true. Use lock from memory map not
157 (gomp_update): Add mm, is_openacc args. Use lock from
158 memory map not device. Use macros from gomp-constants.h not
160 (gomp_register_image_for_device): Add forward
162 (GOMP_offload_register): Change TARGET_DATA type to
163 void **. Check realloc result.
164 (gomp_init_device): Change linkage to hidden not static. Tweak mem
166 (gomp_fini_device): New function.
167 (GOMP_target): Adjust lazy initialization, check target
168 capabilities for OpenMP 4.0 support. Add locking around splay tree
169 lookup. Add new arg to gomp_unmap_vars call.
170 (GOMP_target_data): Tweak lazy initialization. Add new args to
171 gomp_map_vars, gomp_unmap_vars calls.
172 (GOMP_target_update): Tweak lazy initialization. Add new args to
174 (gomp_load_plugin_for_device): Initialize device_fini and
175 OpenACC-specific plugin hooks.
176 (gomp_register_images_for_device): Rename to...
177 (gomp_register_image_for_device): This, and register a single
178 device only, and only if it has not already had images registered.
179 (gomp_find_available_plugins): Rearrange to fix plugin loading and
180 initialization for OpenACC. Prefer a device with
181 TARGET_CAP_OPENMP_400 for OpenMP.
182 * target.h: New file.
183 * splay-tree.h: Move bulk of implementation to...
184 * splay-tree.c: New file.
185 * libgomp-plugin.c: New file.
186 * libgomp-plugin.h: New file.
187 * oacc-async.c: New file.
188 * oacc-cuda.c: New file.
189 * oacc-host.c: New file.
190 * oacc-init.c: New file.
191 * oacc-mem.c: New file.
192 * oacc-parallel.c: New file.
193 * oacc-plugin.c: New file.
194 * plugin-nvptx.c: New file.
195 * oacc-int.h: New file.
196 * openacc.f90: New file.
197 * openacc.h: New file.
198 * openacc_lib.h: New file.
200 2014-10-09 Thomas Schwinge <thomas@codesourcery.com>
202 * testsuite/libgomp.oacc-c/collapse-4.c: New file, moved from
203 gcc/testsuite/gcc.dg/goacc/collapse.c.
205 2014-09-23 Thomas Schwinge <thomas@codesourcery.com>
207 * libgomp.map (OACC_2.0): Add acc_on_device, acc_on_device_.
208 * fortran.c: Include "openacc.h".
209 (acc_on_device_): New function.
210 * oacc-parallel.c: Include "openacc.h".
211 (acc_on_device): New function.
212 * openacc.f90 (acc_device_kind, acc_device_none)
213 (acc_device_default, acc_device_host, acc_device_not_host): New
215 (acc_on_device): New function declaration.
216 * openacc_lib.h (acc_device_kind, acc_device_none)
217 (acc_device_default, acc_device_host, acc_device_not_host): New
219 (acc_on_device): New function declaration.
220 * openacc.h (acc_device_t): New enum.
221 (acc_on_device): New function declaration.
222 * testsuite/libgomp.oacc-c/acc_on_device-1.c: New file.
223 * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
224 * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
225 * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
227 2014-07-09 Thomas Schwinge <thomas@codesourcery.com>
228 Jakub Jelinek <jakub@redhat.com>
230 * target.c (gomp_map_vars, gomp_unmap_vars, gomp_update): Support
231 NULL mappings as well as mapping kind OMP_CLAUSE_MAP_TO_PSET.
232 Also, some code reformatting.
234 2014-06-06 Thomas Schwinge <thomas@codesourcery.com>
235 James Norris <jnorris@codesourcery.com>
237 * libgomp.map (GOACC_2.0): Add GOACC_update.
238 * oacc-parallel.c (GOACC_update): New function.
240 2014-03-18 Ilya Verbin <ilya.verbin@intel.com>
242 * libgomp.map (GOMP_4.0.1): New symbol version.
243 Add GOMP_offload_register.
244 * plugin-host.c (device_available): Replace with:
245 (get_num_devices): This.
247 (offload_register): Ditto.
248 (device_init): Ditto.
249 (device_get_table): Ditto.
251 * target.c (target_type): New enum.
252 (offload_image_descr): New struct.
253 (offload_images, num_offload_images): New globals.
254 (struct gomp_device_descr): Remove device_available_func.
255 Add type, is_initialized, get_type_func, get_num_devices_func,
256 offload_register_func, device_init_func, device_get_table_func,
258 (mapping_table): New struct.
259 (GOMP_offload_register): New function.
260 (gomp_init_device): Ditto.
261 (GOMP_target): Add device initialization and lookup for target fn.
262 (GOMP_target_data): Add device initialization.
263 (GOMP_target_update): Ditto.
264 (gomp_load_plugin_for_device): Take handles for get_type,
265 get_num_devices, offload_register, device_init, device_get_table,
266 device_run functions.
267 (gomp_register_images_for_device): New function.
268 (gomp_find_available_plugins): Add registration of offload images.
270 2014-03-18 Thomas Schwinge <thomas@codesourcery.com>
272 * libgomp_g.h (GOACC_kernels, GOACC_parallel): Add three
273 additional int arguments.
274 * oacc-parallel.c (GOACC_kernels, GOACC_parallel): Handle these.
275 * testsuite/libgomp.oacc-c/goacc_kernels.c: Adjust.
276 * testsuite/libgomp.oacc-c/goacc_parallel.c: Likewise.
278 2014-02-28 Thomas Schwinge <thomas@codesourcery.com>
280 * testsuite/libgomp.oacc-c/goacc_kernels.c: New file.
281 * testsuite/libgomp.oacc-c/kernels-1.c: Likewise.
282 * testsuite/libgomp.oacc-c/parallel-1.c: Add one missing test.
284 * libgomp.map (GOACC_2.0): Add GOACC_kernels.
285 * libgomp_g.h (GOACC_kernels): New prototype.
286 * oacc-parallel.c (GOACC_kernels): New function.
288 2014-02-21 Thomas Schwinge <thomas@codesourcery.com>
290 * testsuite/libgomp.oacc-c/data-1.c: New file.
292 * libgomp.map (GOACC_2.0): Add GOACC_data_end, GOACC_data_start.
293 * libgomp_g.h (GOACC_data_start, GOACC_data_end): New prototypes.
294 * oacc-parallel.c (GOACC_data_start, GOACC_data_end): New
297 2014-02-20 Thomas Schwinge <thomas@codesourcery.com>
299 * target.c (gomp_load_plugin_for_device): Don't call dlcose if
302 2014-02-20 Thomas Schwinge <thomas@codesourcery.com>
303 James Norris <jnorris@codesourcery.com>
305 * plugin-host.c: New file.
306 * target.c (struct gomp_device_descr): Add device_alloc_func,
307 device_free_func, device_dev2host_func, device_host2dev_func
309 (gomp_load_plugin_for_device): Load these.
310 (gomp_map_vars, gomp_unmap_tgt, gomp_unmap_vars, gomp_update): Use
312 (resolve_device, gomp_find_available_plugins): Remove ID 257 hack.
314 2014-02-17 Ilya Verbin <ilya.verbin@intel.com>
316 * target.c (gomp_map_vars_existing): Don't update copy_from for the
319 2014-01-28 Thomas Schwinge <thomas@codesourcery.com>
321 * testsuite/libgomp.oacc-c/parallel-1.c: Extend.
323 2013-12-18 Thomas Schwinge <thomas@codesourcery.com>
325 * libgomp_g.h (GOACC_parallel): Switch kinds array to unsigned
327 * oacc-parallel.c (GOACC_parallel): Likewise, and catch
330 2013-11-08 Thomas Schwinge <thomas@codesourcery.com>
333 * target.c (gomp_find_available_plugins): Don't skip device 257
336 2013-11-07 Thomas Schwinge <thomas@codesourcery.com>
338 * oacc-parallel.c: New file.
339 * Makefile.am (libgomp_la_SOURCES): Add it.
340 * Makefile.in: Regenerate.
341 * libgomp.map (GOACC_2.0): Add GOACC_parallel.
342 * libgomp_g.h (GOACC_parallel): New declaration.
343 * testsuite/libgomp.oacc-c/goacc_parallel.c: New file.
344 * testsuite/libgomp.oacc-c/parallel-1.c: New file.
346 * libgomp.map (GOACC_2.0): New symbol version.
348 * openacc.f90 (openacc_version): New integer parameter.
349 * openacc_lib.h (openacc_version): Likewise.
350 * testsuite/libgomp.oacc-fortran/openacc_version-1.f: New file.
351 * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
353 * libgomp.map (OACC_2.0): New symbol version.
354 * Makefile.am (nodist_libsubinclude_HEADERS): Add openacc.h.
355 (nodist_finclude_HEADERS): Add openacc_lib.h, openacc.f90,
356 openacc.mod, and openacc_kinds.mod.
357 (openacc_kinds.mod): New target.
358 (%.mod): New target, generalized from omp_lib.mod.
359 * Makefile.in: Regenerate.
360 * openacc.f90: New file.
361 * openacc.h: Likewise.
362 * openacc_lib.h: Likewise.
363 * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
364 * testsuite/libgomp.oacc-c/c.exp: Likewise.
365 * testsuite/libgomp.oacc-c/lib-1.c: Likewise.
366 * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
367 * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
368 * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
369 * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
371 Backport from trunk, r204519:
373 * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
375 * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
376 * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
377 * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
378 * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
381 Backport from trunk, r204518:
383 * libgomp_g.h: Include <stddef.h> for size_t.
385 Backport from trunk, r204517:
387 * libgomp.spec.in: Update comment about libgomp's dependencies.
388 * configure.ac: Likewise.
389 * configure: Regenerate.
391 2013-10-10 Jakub Jelinek <jakub@redhat.com>
393 * testsuite/libgomp.c++/udr-6.C: Remove UDR + on type F.
395 2013-10-08 Jakub Jelinek <jakub@redhat.com>
397 * testsuite/libgomp.c/thread-limit-1.c (main): Check if
398 cnt isn't bigger than 6 at any point in time, sleep 10ms after
399 incrementing it and then atomically decrement.
400 * testsuite/libgomp.c/thread-limit-2.c (main): Likewise.
402 * libgomp.h (struct gomp_team): Add task_queued_count field.
403 Add comments about task_{,queued_,running_}count.
404 * team.c (gomp_new_team): Clear task_queued_count.
405 * task.c (GOMP_task): Increment task_queued_count.
406 (gomp_task_run_pre): Decrement task_queued_count. If it is
407 decremented to zero, call gomp_team_barrier_clear_task_pending.
408 (gomp_task_run_post_handle_dependers): Increment task_queued_count.
409 (gomp_barrier_handle_tasks): Don't call
410 gomp_team_barrier_clear_task_pending here.
412 * testsuite/libgomp.c/udr-2.c (main): Remove unused variable i.
413 * testsuite/libgomp.c/udr-3.c (main): Initialize i to 0.
414 * testsuite/libgomp.c++/udr-8.C (main): Likewise.
416 * testsuite/libgomp.c/affinity-1.c (min_cpusetsize): New variable.
417 (pthread_getaffinity_np): Set it when setting contig_cpucount.
418 (print_affinity): Use it for size, only use sysconf value if that is not
419 set and if it is smaller than sizeof (cpu_set_t), use sizeof (cpu_set_t).
421 2013-10-07 Jakub Jelinek <jakub@redhat.com>
423 * testsuite/libgomp.c/affinity-1.c (main): Fork even if
424 contig_cpucount is > 8.
427 * config/linux/proc.c: Include errno.h.
428 (gomp_get_cpuset_size): New variable.
429 (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
431 (gomp_init_num_threads): If CPU_ALLOC_SIZE is defined and
432 pthread_getaffinity_np returned EINVAL, increase gomp_cpuset_size
433 and retry. After successful pthread_getaffinity_np copy
434 gomp_cpuset_size to gomp_get_cpuset_size and try to find out
435 minimum gomp_cpuset_size that covers all the CPUs set in gomp_cpusetp.
436 (get_num_procs): Pass gomp_get_cpuset_size rather than gomp_cpuset_size
437 to pthread_getaffinity_np, adjust gomp_cpuset_popcount caller.
438 * config/linux/proc.h (gomp_cpuset_popcount): Add cpusetsize argument.
439 * config/linux/affinity.c (gomp_affinity_finalize_place_list,
440 gomp_affinity_init_level): Adjust gomp_cpuset_popcount callers.
441 * testsuite/libgomp.c/affinity-1.c (pthread_getaffinity_np): Set
442 contig_cpucount from the first successful pthread_getaffinity_np
443 call, rather than just first call.
445 2013-10-04 Jakub Jelinek <jakub@redhat.com>
447 * libgomp.h (struct gomp_task_icv): Add thread_limit_var.
448 (gomp_thread_limit_var, gomp_remaining_threads_count,
449 gomp_remaining_threads_lock): Remove.
450 (gomp_managed_threads_lock): New variable.
451 (struct gomp_thread_pool): Add threads_busy field.
452 (gomp_free_thread): New prototype.
453 * parallel.c (gomp_resolve_num_threads): Adjust for
454 thread_limit now being in icv->thread_limit_var. Use
455 UINT_MAX instead of ULONG_MAX as infinity. If not nested,
456 just return minimum of max_num_threads and icv->thread_limit_var
457 and if thr->thread_pool, set threads_busy to the returned value.
458 Otherwise, don't update atomically gomp_remaining_threads_count,
459 but instead thr->thread_pool->threads_busy.
460 (GOMP_parallel_end): Adjust for thread_limit now being in
461 icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
462 infinity. Adjust threads_busy in the pool rather than
463 gomp_remaining_threads_count. Remember team->nthreads and call
464 gomp_team_end before adjusting threads_busy, if not nested
465 afterwards, just set it to 1 non-atomically.
466 * team.c (gomp_thread_start): Clear thr->thread_pool and
467 thr->task before returning.
468 (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
469 before calling pthread_exit.
470 (gomp_free_thread): No longer static. Use
471 gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
472 (gomp_team_start): Set thr->thread_pool->threads_busy to
473 nthreads immediately after creating new pool. Use
474 gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
475 (gomp_team_end): Use gomp_managed_threads_lock instead of
476 gomp_remaining_threads_lock.
477 (initialize_team): Don't call gomp_sem_init here.
478 * env.c (gomp_global_icv): Initialize thread_limit_var field.
479 (gomp_thread_limit_var, gomp_remaining_threads_count,
480 gomp_remaining_threads_lock): Remove.
481 (gomp_managed_threads_locks): New variable.
482 (handle_omp_display_env): Adjust for thread_limit var being
484 (initialize_env): Likewise. If user provided value is > INT_MAX,
485 set gomp_global_icv.thread_limit_var to UINT_MAX (infinity).
486 Initialize gomp_managed_threads_lock instead of
487 gomp_remaining_threads_lock.
488 (omp_get_thread_limit): Adjust for thread_limit var in
489 icv->thread_limit_var.
490 * target.c: Include limits.h.
491 (resolve_device): If device_id is < -1, return NULL.
492 (gomp_map_vars): Make sure tgt->array, tgt->to_free, tgt->tgt_start,
493 tgt->tgt_end and k->copy_from aren't left uninitialized.
494 (GOMP_target): Arrange for host callback to be performed in a
495 separate initial thread and contention group, inheriting ICVs from
497 (GOMP_teams): Adjust thread_limit_var ICV.
498 * testsuite/libgomp.c/affinity-1.c (main): Call omp_set_dynamic (0).
499 * testsuite/libgomp.c/target-3.c: New test.
500 * testsuite/libgomp.c/target-4.c: New test.
501 * testsuite/libgomp.c/target-5.c: New test.
502 * testsuite/libgomp.c/target-6.c: New test.
503 * testsuite/libgomp.c/target-7.c: New test.
504 * testsuite/libgomp.c/thread-limit-1.c: New test.
505 * testsuite/libgomp.c/thread-limit-2.c: New test.
506 * testsuite/libgomp.c/thread-limit-3.c: New test.
508 * libgomp.h (struct gomp_team_state): Add place_partition_off
509 and place_partition_len fields.
510 (struct gomp_task_icv): Add bind_var field.
511 (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
512 gomp_places_list_len): New extern decls.
513 (struct gomp_thread): Add place field.
514 (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
515 (gomp_init_thread_affinity): Add place argument.
516 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
517 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
518 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
519 gomp_affinity_init_level, gomp_affinity_print_place): New prototypes.
520 (gomp_team_start): Add flags argument.
521 * team.c (struct gomp_thread_start_data): Add place field.
522 (gomp_thread_start): Initialize thr->place.
523 (gomp_team_start): Add flags argument. Handle OpenMP 4.0 affinity.
524 * env.c (gomp_global_icv): Initialize bind_var field.
525 (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
526 (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
527 gomp_places_list_len): New variables.
528 (parse_bind_var, parse_one_place, parse_places_var): New functions.
529 (parse_affinity): Rewritten to construct OMP_PLACES list with unit
531 (handle_omp_display_env): Remove proc_bind argument. Set display
532 to true for OMP_DISPLAY_ENV=true. Print 201307 instead of 201107
533 as _OPENMP. Enhance printing of OMP_PROC_BIND, add printing
534 of OMP_PLACES, don't print anything for GOMP_CPU_AFFINITY.
535 (initialize_env): Use parse_bind_var to parse OMP_PROC_BIND
536 instead of parse_boolean. Use parse_places_var for OMP_PLACES
537 parsing. Don't call parse_affinity if OMP_PLACES has been
538 successfully parsed (and call gomp_init_affinity in that case).
539 Adjust handle_omp_display_env caller.
540 (omp_get_proc_bind): Return bind_var ICV.
541 * config/posix/affinity.c (gomp_init_thread_affinity): Add place
543 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
544 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
545 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
546 gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
547 * config/linux/proc.c (gomp_cpuset_popcount): Fix up check extern decl.
548 (gomp_init_num_threads): If HAVE_PTHREAD_AFFINITY_NP isn't defined,
549 fix up sizeof argument. Free and clear gomp_cpusetp if it didn't
550 contain any logical CPUs.
551 (get_num_procs): Check gomp_places_list instead of gomp_cpu_affinity.
552 * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
553 (affinity_counter): Remove.
554 (CPU_CLR_S): Define if CPU_ALLOC_SIZE is not defined.
555 (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
556 silently create OMP_PLACES=threads, if it is non-NULL afterwards,
557 bind current thread to the first place.
558 (gomp_init_thread_affinity): Rewritten. Add place argument, just
559 pthread_setaffinity_np to gomp_places_list[place].
560 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
561 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
562 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
563 gomp_affinity_init_level, gomp_affinity_print_place): New functions.
564 * parallel.c (GOMP_parallel_start): Adjust gomp_team_start caller.
565 (GOMP_parallel): Likewise, pass through flags parameter to it.
566 * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
568 (GOMP_parallel_sections): Likewise, pass through flags parameter to it.
569 * loop.c (gomp_parallel_loop_start): Add flags argument, pass it through
571 (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
572 GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
573 Adjust gomp_parallel_loop_start callers.
574 (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
575 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): Likewise, pass
576 through flags parameter to it.
577 * testsuite/libgomp.c/affinity-1.c: New test.
578 * testsuite/libgomp.c++/affinity-1.C: New test.
580 2013-10-01 Jakub Jelinek <jakub@redhat.com>
583 * config/linux/proc.c (gomp_cpuset_size, gomp_cpusetp): New variables.
584 (gomp_cpuset_popcount): Use CPU_COUNT_S if available, or CPU_COUNT if
585 gomp_cpuset_size is sizeof (cpu_set_t). Use gomp_cpuset_size instead
586 of sizeof (cpu_set_t) to determine number of iterations.
587 (gomp_init_num_threads): Initialize gomp_cpuset_size and gomp_cpusetp
588 here, use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size
589 instead of sizeof (cpu_set_t) to pthread_getaffinity_np.
590 (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
591 is NULL. Use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size
592 instead of sizeof (cpu_set_t) to pthread_getaffinity_np.
593 * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
594 (gomp_cpuset_size, gomp_cpusetp): Declare.
595 * config/linux/affinity.c (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S): Define
596 if CPU_ALLOC_SIZE isn't defined.
597 (gomp_init_affinity): Don't call pthread_getaffinity_np here, instead
598 use gomp_cpusetp computed by gomp_init_num_threads. Use CPU_*_S
599 variants of macros with gomp_cpuset_size as set size, for cpusetnew
600 use alloca for it if CPU_ALLOC_SIZE is defined, otherwise local
602 (gomp_init_thread_affinity): Use CPU_*_S variants of macros with
603 gomp_cpuset_size as set size, for cpuset use alloca for it if
604 CPU_ALLOC_SIZE is defined, otherwise local fixed size variable.
606 2013-09-27 Jakub Jelinek <jakub@redhat.com>
608 * libgomp.h: Include stdlib.h.
609 (struct gomp_task_depend_entry,
610 struct gomp_dependers_vec): New types.
611 (struct gomp_task): Add dependers, depend_hash, depend_count,
612 num_dependees and depend fields.
613 (struct gomp_taskgroup): Add num_children field.
614 (gomp_finish_task): Free depend_hash if non-NULL.
615 * libgomp_g.h (GOMP_task): Add depend argument.
616 * hashtab.h: New file.
617 * task.c: Include hashtab.h.
618 (hash_entry_type): New typedef.
619 (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
620 (gomp_init_task): Clear dependers, depend_hash and depend_count
622 (GOMP_task): Add depend argument, handle depend clauses. Increment
623 num_children field in taskgroup.
624 (gomp_task_run_pre): Don't increment task_running_count here,
625 nor clear task_pending bit.
626 (gomp_task_run_post_handle_depend_hash,
627 gomp_task_run_post_handle_dependers,
628 gomp_task_run_post_handle_depend): New functions.
629 (gomp_task_run_post_remove_parent): Clear in_taskwait before
630 signalling corresponding semaphore.
631 (gomp_task_run_post_remove_taskgroup): Decrement num_children
632 field and make the decrement to 0 MEMMODEL_RELEASE operation,
633 rather than storing NULL to taskgroup->children. Clear
634 in_taskgroup_wait before signalling corresponding semaphore.
635 (gomp_barrier_handle_tasks): Move task_running_count increment
636 and task_pending bit clearing here. Call
637 gomp_task_run_post_handle_depend. If more than one new tasks
638 have been queued, wake other threads if needed.
639 (GOMP_taskwait): Call gomp_task_run_post_handle_depend. If more
640 than one new tasks have been queued, wake other threads if needed.
641 After waiting on taskwait_sem, enter critical section again.
642 (GOMP_taskgroup_start): Initialize num_children field.
643 (GOMP_taskgroup_end): Check num_children instead of children
644 before critical section. If children is NULL, but num_children
645 is non-zero, wait on taskgroup_sem. Call
646 gomp_task_run_post_handle_depend. If more than one new tasks have
647 been queued, wake other threads if needed. After waiting on
648 taskgroup_sem, enter critical section again.
649 * testsuite/libgomp.c/depend-1.c: New test.
650 * testsuite/libgomp.c/depend-2.c: New test.
651 * testsuite/libgomp.c/depend-3.c: New test.
652 * testsuite/libgomp.c/depend-4.c: New test.
654 2013-09-26 Jakub Jelinek <jakub@redhat.com>
657 * testsuite/libgomp.c/simd-6.c: New test.
658 * testsuite/libgomp.c++/simd-8.C: New test.
660 2013-09-25 Jakub Jelinek <jakub@redhat.com>
662 * parallel.c (GOMP_cancellation_point, GOMP_cancel): Handle
663 GIMPLE_CANCEL_TASKGROUP cancellation.
664 * libgomp.h (struct gomp_task): Add next_taskgroup, prev_taskgroup,
665 taskgroup and copy_ctors_done fields.
666 (struct gomp_taskgroup): New type.
667 * task.c (gomp_init_task): Initialize copy_ctors_done and taskgroup
669 (GOMP_task): Don't start a new thread also if it's taskgroup has
670 been cancelled. Set copy_ctors_done field if needed. Initialize
671 taskgroup field. If copy_ctors_done and already cancelled, don't
672 discard the task. If taskgroup is non-NULL, enqueue the task
673 into taskgroup queue.
674 (gomp_task_run_pre, gomp_task_run_post_remove_parent,
675 gomp_task_run_post_remove_taskgroup): New inline functions.
676 (gomp_barrier_handle_tasks, GOMP_taskwait): Use them.
677 (GOMP_taskgroup_start, GOMP_taskgroup_end): Implement taskgroup
679 * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
680 * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
681 * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
682 * testsuite/libgomp.c++/cancel-for-1.C: New test.
683 * testsuite/libgomp.c++/cancel-for-1.C: New test.
684 * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
685 * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
686 * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
687 * testsuite/libgomp.c++/cancel-test.h: New file.
688 * testsuite/libgomp.c++/cancel-sections-1.C: New test.
689 * testsuite/libgomp.c++/taskgroup-1.C: New test.
690 * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
691 * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
692 * testsuite/libgomp.c/taskgroup-1.c: New test.
693 * testsuite/libgomp.c/cancel-parallel-3.c (do_some_work): Use
696 2013-09-24 Richard Henderson <rth@redhat.com>
697 Jakub Jelinek <jakub@redhat.com>
699 * libgomp.map (GOMP_4.0): Export GOMP_barrier_cancel,
700 GOMP_loop_end_cancel, GOMP_sections_end_cancel.
701 * parallel.c (GOMP_cancellation_point): Add WHICH argument, do nothing
702 if gomp_cancel_var is false, handle workshare and parallel
703 cancellation point, add ialias.
704 (GOMP_cancel): Add WHICH and DO_CANCEL arguments, do nothing if
705 gomp_cancel_var is false, call GOMP_cancellation_point if DO_CANCEL
706 is false, handle workshare and parallel cancellation.
707 * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
708 (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
709 Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
710 (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
711 gomp_team_barrier_cancel): New functions.
712 * config/posix/bar.h (gomp_barrier_t): Add cancellable field.
713 (BAR_CANCELLED): Define.
714 (BAR_INCR): Set to 8.
715 (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
716 gomp_team_barrier_cancel): New prototypes.
717 (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
718 (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
719 gomp_team_barrier_cancelled): New inline functions.
720 * config/linux/bar.c (gomp_team_barrier_wait_end): Clear BAR_CANCELLED
721 from state where needed. Set work_share_cancelled to 0 on last thread.
722 (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
723 gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
725 * config/linux/bar.h (gomp_barrier_t): Add awaited_final field.
726 (BAR_CANCELLED): Define.
727 (BAR_INCR): Set to 8.
728 (gomp_barrier_init): Initialize awaited_final field.
729 (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
730 gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
732 (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
733 (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
734 gomp_team_barrier_cancelled): New inline functions.
735 * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
736 team->work_shares_to_free to thr->ts.work_share before calling
738 (gomp_work_share_end_cancel): New function.
739 * team.c (gomp_thread_start): Use gomp_team_barrier_wait_final
740 instead of gomp_team_barrier_wait.
741 (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled
742 and team_cancelled fields.
743 (gomp_team_end): Use gomp_team_barrier_wait_final instead of
744 gomp_team_barrier_wait. If team->team_cancelled, call
745 gomp_fini_worshare on ws chain starting at team->work_shares_to_free
746 rather than thr->ts.work_share.
747 * env.c (gomp_global_icv): Initialize target_data field.
748 (gomp_cancel_var): New global variable.
749 (handle_omp_display_env): Print cancel-var ICV.
750 (initialize_env): Parse OMP_CANCELLATION env var.
751 (omp_get_cancellation): Return gomp_cancel_var.
752 * barrier.c (GOMP_barrier_cancel): New function.
753 * libgomp.h (gomp_cancel_var): New extern decl.
754 (struct gomp_team): Add work_shares_to_free, work_share_cancelled
755 and team_cancelled fields.
756 (gomp_cancel_kind): New enum.
757 (gomp_work_share_end_cancel): New prototype.
758 * libgomp_g.h (GOMP_barrier_cancel, GOMP_loop_end_cancel,
759 GOMP_sections_end_cancel): New prototypes.
760 (GOMP_cancel, GOMP_cancellation_point): Adjust prototypes.
761 * task.c (GOMP_task): If gomp_team_barrier_cancelled, don't
762 queue or start new tasks.
763 (gomp_barrier_handle_tasks): If gomp_team_barrier_cancelled,
764 don't start any new tasks, just free all tasks.
765 * sections.c (GOMP_sections_end_cancel): New function.
766 * loop.c (GOMP_loop_end_cancel): New function.
767 * testsuite/libgomp.c/cancel-parallel-1.c: New test.
768 * testsuite/libgomp.c/cancel-parallel-2.c: New test.
769 * testsuite/libgomp.c/cancel-parallel-3.c: New test.
770 * testsuite/libgomp.c/cancel-for-1.c: New test.
771 * testsuite/libgomp.c/cancel-for-2.c: New test.
772 * testsuite/libgomp.c/cancel-sections-1.c: New test.
774 2013-09-23 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
776 * configure.ac: Add checks for plugins support.
777 * config.h.in: Regenerated.
778 * configure: Regenerated.
779 * target.c (struct target_mem_desc): Add device_descr field.
782 (struct gomp_device_descr): New.
783 (gomp_get_num_devices): Call gomp_target_init.
784 (resolve_device): Return device_descr instead of int.
785 (gomp_map_vars): Add devicep argument and update the function
787 (gomp_unmap_tgt): Likewise.
788 (gomp_unmap_vars): Likewise.
789 (gomp_update): Likewise.
790 (GOMP_target): Use device_descr struct.
791 (GOMP_target_data): Likewise.
792 (GOMP_target_update): Likewise.
793 (gomp_check_plugin_file_name): New.
794 (gomp_load_plugin_for_device): New.
795 (gomp_find_available_plugins): New.
796 (gomp_target_init): New.
798 2013-09-19 Jakub Jelinek <jakub@redhat.com>
800 * libgomp_g.h (GOMP_target): Change 3rd argument to const void *.
801 (GOMP_target_data, GOMP_target_update): Add openmp_target argument.
802 * target.c (GOMP_target): Change fnname argument to openmp_target,
803 with const void * type.
804 (GOMP_target_data, GOMP_target_update): Add openmp_target argument.
806 * testsuite/libgomp.c/simd-4.c: New test.
807 * testsuite/libgomp.c/simd-5.c: New test.
808 * testsuite/libgomp.c/udr-1.c: New test.
809 * testsuite/libgomp.c/udr-2.c: New test.
810 * testsuite/libgomp.c/udr-3.c: New test.
811 * testsuite/libgomp.c++/udr-9.C: New test.
813 2013-09-18 Jakub Jelinek <jakub@redhat.com>
815 * testsuite/libgomp.c++/simd-4.C: New test.
816 * testsuite/libgomp.c++/simd-5.C: New test.
817 * testsuite/libgomp.c++/simd-6.C: New test.
818 * testsuite/libgomp.c++/simd-7.C: New test.
819 * testsuite/libgomp.c++/udr-1.C: New test.
820 * testsuite/libgomp.c++/udr-2.C: New test.
821 * testsuite/libgomp.c++/udr-3.C: New test.
822 * testsuite/libgomp.c++/udr-4.C: New test.
823 * testsuite/libgomp.c++/udr-5.C: New test.
824 * testsuite/libgomp.c++/udr-6.C: New test.
825 * testsuite/libgomp.c++/udr-7.C: New test.
826 * testsuite/libgomp.c++/udr-8.C: New test.
828 2013-09-16 Jakub Jelinek <jakub@redhat.com>
830 * splay-tree.h: New file.
831 * target.c: Include stdbool.h.
832 (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
833 (struct target_mem_desc, struct splay_tree_key_s): New structures.
834 (splay_compare): New inline function.
835 (gomp_get_num_devices): New function.
836 (resolve_device): Use default_device_var ICV. Add temporarily
837 magic testing device number 257.
838 (dev_splay_tree, dev_env_lock): New variables.
839 (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt,
840 gomp_unmap_vars, gomp_update): New functions.
841 (GOMP_target, GOMP_target_data, GOMP_target_end_data,
842 GOMP_target_update): Add support for magic testing device number 257.
843 * libgomp.h (struct target_mem_desc): Forward declare.
844 (struct gomp_task_icv): Add default_device_var and target_data.
845 (gomp_get_num_devices): New prototype.
846 * env.c (gomp_global_icv): Add default_device_var initializer.
847 (parse_int): New function.
848 (handle_omp_display_env): Print OMP_DEFAULT_DEVICE.
849 (initialize_env): Initialize default_device_var.
850 (omp_set_default_device): Set default_device_var ICV.
851 (omp_get_default_device): Query default_device_var ICV.
852 (omp_get_num_devices): Call gomp_get_num_devices.
853 (omp_get_num_teams, omp_get_team_num, omp_is_initial_device): Add
856 2013-09-13 Jakub Jelinek <jakub@redhat.com>
858 PR tree-optimization/58392
859 * testsuite/libgomp.c/pr58392.c: New test.
861 2013-09-06 Jakub Jelinek <jakub@redhat.com>
863 * testsuite/libgomp.c/target-2.c: New test.
864 * testsuite/libgomp.c++/target-3.C: New test.
866 2013-09-05 Jakub Jelinek <jakub@redhat.com>
868 * testsuite/libgomp.c++/target-2.C: New test.
869 * testsuite/libgomp.c++/target-2-aux.cc: New file.
871 * libgomp.map (GOMP_4.0): Add GOMP_target, GOMP_target_data,
872 GOMP_target_end_data, GOMP_target_update and GOMP_teams.
873 * Makefile.am (libgomp_la_SOURCES): Add target.c.
874 * Makefile.in: Regenerated.
875 * target.c: New file.
876 * libgomp_g.h (GOMP_target, GOMP_target_data,
877 GOMP_target_end_data, GOMP_target_update, GOMP_teams): New prototypes.
878 * testsuite/libgomp.c++/for-11.C (main): Uncomment
879 #pragma omp target teams directive.
880 * testsuite/libgomp.c/for-3.c (main): Likewise.
881 * testsuite/libgomp.c++/target-1.C: New test.
882 * testsuite/libgomp.c/target-1.c: New test.
884 2013-07-06 Jakub Jelinek <jakub@redhat.com>
886 * testsuite/libgomp.c/for-3.c: New test.
887 * testsuite/libgomp.c/simd-1.c: New test.
888 * testsuite/libgomp.c/simd-2.c: New test.
889 * testsuite/libgomp.c/simd-3.c: New test.
891 2013-07-05 Richard Henderson <rth@redhat.com>
893 * config/linux/bar.c (gomp_team_barrier_wait_end): Remove one more
896 2013-07-03 Richard Henderson <rth@redhat.com>
898 * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
899 BAR_WAITING_FOR_TASK, BAR_INCR): New.
900 (gomp_barrier_wait_start, gomp_barrier_last_thread,
901 gomp_team_barrier_set_task_pending,
902 gomp_team_barrier_clear_task_pending,
903 gomp_team_barrier_set_waiting_for_tasks,
904 gomp_team_barrier_waiting_for_tasks,
905 gomp_team_barrier_done): Use them.
906 * config/linux/bar.c (gomp_barrier_wait_end,
907 gomp_barrier_wait_last, gomp_team_barrier_wait_end): Likewise.
908 * config/posix/bar.h, config/posix/bar.c: Similarly.
910 2013-07-03 Jakub Jelinek <jakub@redhat.com>
912 * testsuite/libgomp.c++/atomic-14.C: Adjust for stricter atomic
914 * testsuite/libgomp.c++/atomic-15.C: Likewise.
915 * testsuite/libgomp.c/atomic-17.c: Likewise.
917 2013-06-28 Jakub Jelinek <jakub@redhat.com>
919 * testsuite/libgomp.c++/simd-1.C: New test.
920 * testsuite/libgomp.c++/simd-2.C: New test.
921 * testsuite/libgomp.c++/simd-3.C: New test.
923 2013-06-21 Jakub Jelinek <jakub@redhat.com>
925 * testsuite/libgomp.c/for-1.h: New file.
926 * testsuite/libgomp.c/for-2.h: New file.
927 * testsuite/libgomp.c/for-1.c: New test.
928 * testsuite/libgomp.c/for-2.c: New test.
929 * testsuite/libgomp.c++/for-9.C: New test.
930 * testsuite/libgomp.c++/for-10.C: New test.
931 * testsuite/libgomp.c++/for-11.C: New test.
933 2013-06-12 Jakub Jelinek <jakub@redhat.com>
935 * fortran.c (omp_is_initial_device): Add ialias_redirect.
936 (omp_is_initial_device_): New function.
937 * omp_lib.f90.in (omp_is_initial_device): New interface.
938 * omp.h.in (omp_is_initial_device): New prototype.
939 * libgomp.map (omp_is_initial_device, omp_is_initial_device_):
941 * env.c (omp_is_initial_device): New function. Add ialias for it.
942 * omp_lib.h.in (omp_is_initial_device): New external.
944 * omp_lib.f90.in (omp_get_dynamic, omp_get_nested,
945 omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
946 omp_get_num_threads, omp_get_thread_num, omp_get_thread_limit,
947 omp_set_max_active_levels, omp_get_max_active_levels,
948 omp_get_level, omp_get_ancestor_thread_num,
949 omp_get_team_size, omp_get_active_level, omp_in_final,
950 omp_get_cancellation, omp_get_default_device,
951 omp_get_num_devices, omp_get_num_teams, omp_get_team_num): Remove
952 useless use omp_lib_kinds.
954 2013-04-30 Jakub Jelinek <jakub@redhat.com>
956 * testsuite/libgomp.c/atomic-17.c: New test.
957 * testsuite/libgomp.c++/atomic-14.C: New test.
958 * testsuite/libgomp.c++/atomic-15.C: New test.
960 2013-04-10 Jakub Jelinek <jakub@redhat.com>
962 * libgomp.map (omp_get_cancellation, omp_get_cancellation_,
963 omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device,
964 omp_set_default_device_, omp_set_default_device_8_,
965 omp_get_default_device, omp_get_default_device_,
966 omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams,
967 omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export
969 (GOMP_cancel, GOMP_cancellation_point, GOMP_parallel_loop_dynamic,
970 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
971 GOMP_parallel_loop_static, GOMP_parallel_sections, GOMP_parallel,
972 GOMP_taskgroup_start, GOMP_taskgroup_end): Export @@GOMP_4.0.
973 * parallel.c (GOMP_parallel_end): Add ialias.
974 (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New
976 * omp.h.in (omp_proc_bind_t): New typedef.
977 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
978 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
979 omp_get_team_num): New prototypes.
980 * env.c (omp_get_cancellation, omp_get_proc_bind,
981 omp_set_default_device, omp_get_default_device, omp_get_num_devices,
982 omp_get_num_teams, omp_get_team_num): New functions.
983 * fortran.c (ULP, STR1, STR2, ialias_redirect): Removed.
984 (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
985 omp_set_default_device_8_, omp_get_default_device_,
986 omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
988 * libgomp.h (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect,
989 ialias_call): Define.
990 * libgomp_g.h (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
991 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel,
992 GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start,
993 GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes.
994 * task.c (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
995 * sections.c (GOMP_parallel_sections): New function.
996 * loop.c (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
997 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): New
999 (GOMP_parallel_end): Add ialias_redirect.
1000 * omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false,
1001 omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1002 omp_proc_bind_spread): New params.
1003 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1004 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1005 omp_get_team_num): New interfaces.
1006 * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
1007 omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1008 omp_proc_bind_spread): New params.
1009 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1010 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1011 omp_get_team_num): New externals.
1013 2013-03-20 Tobias Burnus <burnus@net-b.de>
1015 * libgomp.texi (Environment Variables): Minor cleanup,
1016 update section refs to OpenMP 4.0rc2.
1017 (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
1018 environment variables.
1020 2013-03-20 Tobias Burnus <burnus@net-b.de>
1022 * env.c (handle_omp_display_env): New function.
1023 (initialize_env): Use it.
1025 2013-03-20 Jakub Jelinek <jakub@redhat.com>
1027 * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
1028 * testsuite/libgomp.c/atomic-15.c: New test.
1029 * testsuite/libgomp.c/atomic-16.c: New test.
1031 * testsuite/libgomp.c++/atomic-10.C: New test.
1032 * testsuite/libgomp.c++/atomic-11.C: New test.
1033 * testsuite/libgomp.c++/atomic-12.C: New test.
1034 * testsuite/libgomp.c++/atomic-13.C: New test.
1036 Copyright (C) 2013-2014 Free Software Foundation, Inc.
1038 Copying and distribution of this file, with or without modification,
1039 are permitted in any medium without royalty provided the copyright
1040 notice and this notice are preserved.