1 2014-11-14 Tom de Vries <tom@codesourcery.com>
3 * Makefile.am: Add missing dependency "openacc.mod: openacc.lo".
4 * Makefile.in: Regenerate.
6 2014-11-14 Tom de Vries <tom@codesourcery.com>
8 * configure.tgt: Handle case that $enable_linux_futex is empty.
10 2014-11-14 Thomas Schwinge <thomas@codesourcery.com>
12 * libgomp.texi (Reporting Bugs): Mention the "openacc" Bugzilla
15 2014-11-13 Thomas Schwinge <thomas@codesourcery.com>
17 * testsuite/libgomp.oacc-c-c++-common/context-2.c: Fix data
20 * target.c (gomp_map_vars_existing): Error out if "force"
22 (gomp_map_vars): Actually pass kinds to gomp_map_vars_existing.
24 * testsuite/libgomp.oacc-c-c++-common/data-already-1.c: New file.
25 * testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
26 * testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
27 * testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
28 * testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
29 * testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
30 * testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
31 * testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
32 * testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
33 * testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
34 * testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
35 * testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
36 * testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
37 * testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
38 * testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
39 * testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
41 2014-11-12 Thomas Schwinge <thomas@codesourcery.com>
43 * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: New file.
44 * testsuite/libgomp.oacc-c/collapse-4.c: Turn into an execution
46 * testsuite/libgomp.oacc-c-c++-common/data-2.c: Update.
47 * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise.
49 2014-11-11 Thomas Schwinge <thomas@codesourcery.com>
51 * plugin-nvptx.c: Remove.
53 2014-11-07 Tom de Vries <tom@codesourcery.com>
55 * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Skip for shared memory
57 (main): Use acc_device_default instead of acc_device_nvidia.
59 2014-11-06 Julian Brown <julian@codesourcery.com>
61 * oacc-init.c (resolve_device, _acc_init): Fix init_device_func
63 * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_avail): Remove.
64 (host_dispatch): Don't set avail_func hook.
65 * plugin/configure.ac (libgomp-test-support.exp): Add to
67 * plugin/configure: Regenerate.
68 * testsuite/libgomp-test-support.exp.in: Move from here...
69 * plugin/libgomp-test-support.exp.in: ...to here.
70 * plugin/Makefile.in: Regenerate.
71 * testsuite/lib/libgomp.exp (libgomp-test-support.exp): Find in
73 * testsuite/Makefile.in: Regenerate.
74 * configure.ac (testsuite/libgomp-test-support.exp): Remove from
76 * config.h.in: Regenerate.
77 * configure: Regenerate.
79 2014-11-05 Julian Brown <julian@codesourcery.com>
81 * Makefile.am (SUBDIRS): Add plugin.
82 (DIST_SUBDIRS): Define.
83 (libgomp_plugin_nvptx_*): Remove nvptx support from here.
84 (libgomp_plugin_host_nonshm_*): Likewise.
85 * Makefile.in: Regenerate.
86 * configure: Regenerate.
87 * oacc-host.c: Replace with #include of plugin/plugin-host.c code,
88 move implementation to the latter.
89 * plugin/plugin-host.c: New file.
90 * plugin-nvptx.c: Copy to...
91 * plugin/plugin-nvptx.c: New file.
92 * plugin/Makefile.am: New.
93 * plugin/Makefile.in: Regenerate.
94 * plugin/aclocal.m4: Regenerate.
95 * plugin/configure: Regenerate.
97 2014-11-05 Julian Brown <julian@codesourcery.com>
99 * oacc-host.c: Add GOMP_OFFLOAD_ prefix for plugin hooks. Rename
100 device_init to init_device, device_fini to fini_device,
101 offload_register to register_image and remove extraneous "device_"
102 from device_alloc, device_free, device_dev2host, device_host2dev and
104 (host_dispatch): Use new names for hooks.
105 * oacc-init.c: Use new names for hooks, throughout.
106 * plugin-nvptx.c: Likewise.
107 * target.c: Likewise.
108 (gomp_load_plugin_for_device): Likewise. Look for new hook names.
109 * target.h (gomp_device_descr): Use new hook names.
111 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
113 * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: New file.
114 * testsuite/libgomp.oacc-fortran/data-4-2.f90: Likewise.
115 * testsuite/libgomp.oacc-fortran/data-4.f90: In one instance, use
116 the self clause instead of host clause.
118 * testsuite/libgomp.oacc-c/cache-1.c: Remove directives that are
119 expected to fail, and rename the file to...
120 * testsuite/libgomp.oacc-c-c++-common/cache-1.c: ... this.
121 * testsuite/libgomp.oacc-c++/cache-1.C: Remove file.
123 2014-11-05 James Norris <jnorris@codesourcery.com>
125 * testsuite/libgomp.oacc-c/cache-1.c: New file.
126 * testsuite/libgomp.oacc-c++/cache-1.C: Likewise.
128 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
129 James Norris <jnorris@codesourcery.com>
131 * testsuite/libgomp.oacc-c++/c++.exp: Enable
132 libgomp.oacc-c-c++-common testing.
133 * testsuite/libgomp.oacc-c/c.exp: Likewise.
134 * testsuite/libgomp.oacc-c/abort-2.c: Rename to...
135 * testsuite/libgomp.oacc-c-c++-common/abort-2.c: ... this.
136 * testsuite/libgomp.oacc-c/abort.c: Rename to...
137 * testsuite/libgomp.oacc-c-c++-common/abort.c: ... this.
138 * testsuite/libgomp.oacc-c/acc_on_device-1.c: Rename to...
139 * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: ... this.
140 * testsuite/libgomp.oacc-c/clauses-1.c: Rename to...
141 * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: ... this.
142 * testsuite/libgomp.oacc-c/clauses-2.c: Rename to...
143 * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: ... this.
144 * testsuite/libgomp.oacc-c/context-1.c: Rename to...
145 * testsuite/libgomp.oacc-c-c++-common/context-1.c: ... this.
146 * testsuite/libgomp.oacc-c/context-2.c: Rename to...
147 * testsuite/libgomp.oacc-c-c++-common/context-2.c: ... this.
148 * testsuite/libgomp.oacc-c/context-3.c: Rename to...
149 * testsuite/libgomp.oacc-c-c++-common/context-3.c: ... this.
150 * testsuite/libgomp.oacc-c/context-4.c: Rename to...
151 * testsuite/libgomp.oacc-c-c++-common/context-4.c: ... this.
152 * testsuite/libgomp.oacc-c/data-1.c: Rename to...
153 * testsuite/libgomp.oacc-c-c++-common/data-1.c: ... this.
154 * testsuite/libgomp.oacc-c/data-2.c: Rename to...
155 * testsuite/libgomp.oacc-c-c++-common/data-2.c: ... this.
156 * testsuite/libgomp.oacc-c/data-3.c: Rename to...
157 * testsuite/libgomp.oacc-c-c++-common/data-3.c: ... this.
158 * testsuite/libgomp.oacc-c/deviceptr-1.c: Rename to...
159 * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: ... this.
160 * testsuite/libgomp.oacc-c/if-1.c: Rename to...
161 * testsuite/libgomp.oacc-c-c++-common/if-1.c: ... this.
162 * testsuite/libgomp.oacc-c/kernels-1.c: Rename to...
163 * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: ... this.
164 * testsuite/libgomp.oacc-c/lib-1.c: Rename to...
165 * testsuite/libgomp.oacc-c-c++-common/lib-1.c: ... this.
166 * testsuite/libgomp.oacc-c/lib-10.c: Rename to...
167 * testsuite/libgomp.oacc-c-c++-common/lib-10.c: ... this.
168 * testsuite/libgomp.oacc-c/lib-11.c: Rename to...
169 * testsuite/libgomp.oacc-c-c++-common/lib-11.c: ... this.
170 * testsuite/libgomp.oacc-c/lib-12.c: Rename to...
171 * testsuite/libgomp.oacc-c-c++-common/lib-12.c: ... this.
172 * testsuite/libgomp.oacc-c/lib-13.c: Rename to...
173 * testsuite/libgomp.oacc-c-c++-common/lib-13.c: ... this.
174 * testsuite/libgomp.oacc-c/lib-14.c: Rename to...
175 * testsuite/libgomp.oacc-c-c++-common/lib-14.c: ... this.
176 * testsuite/libgomp.oacc-c/lib-15.c: Rename to...
177 * testsuite/libgomp.oacc-c-c++-common/lib-15.c: ... this.
178 * testsuite/libgomp.oacc-c/lib-16.c: Rename to...
179 * testsuite/libgomp.oacc-c-c++-common/lib-16.c: ... this.
180 * testsuite/libgomp.oacc-c/lib-17.c: Rename to...
181 * testsuite/libgomp.oacc-c-c++-common/lib-17.c: ... this.
182 * testsuite/libgomp.oacc-c/lib-18.c: Rename to...
183 * testsuite/libgomp.oacc-c-c++-common/lib-18.c: ... this.
184 * testsuite/libgomp.oacc-c/lib-19.c: Rename to...
185 * testsuite/libgomp.oacc-c-c++-common/lib-19.c: ... this.
186 * testsuite/libgomp.oacc-c/lib-2.c: Rename to...
187 * testsuite/libgomp.oacc-c-c++-common/lib-2.c: ... this.
188 * testsuite/libgomp.oacc-c/lib-20.c: Rename to...
189 * testsuite/libgomp.oacc-c-c++-common/lib-20.c: ... this.
190 * testsuite/libgomp.oacc-c/lib-21.c: Rename to...
191 * testsuite/libgomp.oacc-c-c++-common/lib-21.c: ... this.
192 * testsuite/libgomp.oacc-c/lib-22.c: Rename to...
193 * testsuite/libgomp.oacc-c-c++-common/lib-22.c: ... this.
194 * testsuite/libgomp.oacc-c/lib-23.c: Rename to...
195 * testsuite/libgomp.oacc-c-c++-common/lib-23.c: ... this.
196 * testsuite/libgomp.oacc-c/lib-24.c: Rename to...
197 * testsuite/libgomp.oacc-c-c++-common/lib-24.c: ... this.
198 * testsuite/libgomp.oacc-c/lib-25.c: Rename to...
199 * testsuite/libgomp.oacc-c-c++-common/lib-25.c: ... this.
200 * testsuite/libgomp.oacc-c/lib-26.c: Rename to...
201 * testsuite/libgomp.oacc-c-c++-common/lib-26.c: ... this.
202 * testsuite/libgomp.oacc-c/lib-27.c: Rename to...
203 * testsuite/libgomp.oacc-c-c++-common/lib-27.c: ... this.
204 * testsuite/libgomp.oacc-c/lib-28.c: Rename to...
205 * testsuite/libgomp.oacc-c-c++-common/lib-28.c: ... this.
206 * testsuite/libgomp.oacc-c/lib-29.c: Rename to...
207 * testsuite/libgomp.oacc-c-c++-common/lib-29.c: ... this.
208 * testsuite/libgomp.oacc-c/lib-3.c: Rename to...
209 * testsuite/libgomp.oacc-c-c++-common/lib-3.c: ... this.
210 * testsuite/libgomp.oacc-c/lib-30.c: Rename to...
211 * testsuite/libgomp.oacc-c-c++-common/lib-30.c: ... this.
212 * testsuite/libgomp.oacc-c/lib-31.c: Rename to...
213 * testsuite/libgomp.oacc-c-c++-common/lib-31.c: ... this.
214 * testsuite/libgomp.oacc-c/lib-32.c: Rename to...
215 * testsuite/libgomp.oacc-c-c++-common/lib-32.c: ... this.
216 * testsuite/libgomp.oacc-c/lib-33.c: Rename to...
217 * testsuite/libgomp.oacc-c-c++-common/lib-33.c: ... this.
218 * testsuite/libgomp.oacc-c/lib-34.c: Rename to...
219 * testsuite/libgomp.oacc-c-c++-common/lib-34.c: ... this.
220 * testsuite/libgomp.oacc-c/lib-35.c: Rename to...
221 * testsuite/libgomp.oacc-c-c++-common/lib-35.c: ... this.
222 * testsuite/libgomp.oacc-c/lib-36.c: Rename to...
223 * testsuite/libgomp.oacc-c-c++-common/lib-36.c: ... this.
224 * testsuite/libgomp.oacc-c/lib-37.c: Rename to...
225 * testsuite/libgomp.oacc-c-c++-common/lib-37.c: ... this.
226 * testsuite/libgomp.oacc-c/lib-38.c: Rename to...
227 * testsuite/libgomp.oacc-c-c++-common/lib-38.c: ... this.
228 * testsuite/libgomp.oacc-c/lib-39.c: Rename to...
229 * testsuite/libgomp.oacc-c-c++-common/lib-39.c: ... this.
230 * testsuite/libgomp.oacc-c/lib-4.c: Rename to...
231 * testsuite/libgomp.oacc-c-c++-common/lib-4.c: ... this.
232 * testsuite/libgomp.oacc-c/lib-40.c: Rename to...
233 * testsuite/libgomp.oacc-c-c++-common/lib-40.c: ... this.
234 * testsuite/libgomp.oacc-c/lib-41.c: Rename to...
235 * testsuite/libgomp.oacc-c-c++-common/lib-41.c: ... this.
236 * testsuite/libgomp.oacc-c/lib-42.c: Rename to...
237 * testsuite/libgomp.oacc-c-c++-common/lib-42.c: ... this.
238 * testsuite/libgomp.oacc-c/lib-43.c: Rename to...
239 * testsuite/libgomp.oacc-c-c++-common/lib-43.c: ... this.
240 * testsuite/libgomp.oacc-c/lib-44.c: Rename to...
241 * testsuite/libgomp.oacc-c-c++-common/lib-44.c: ... this.
242 * testsuite/libgomp.oacc-c/lib-45.c: Rename to...
243 * testsuite/libgomp.oacc-c-c++-common/lib-45.c: ... this.
244 * testsuite/libgomp.oacc-c/lib-46.c: Rename to...
245 * testsuite/libgomp.oacc-c-c++-common/lib-46.c: ... this.
246 * testsuite/libgomp.oacc-c/lib-47.c: Rename to...
247 * testsuite/libgomp.oacc-c-c++-common/lib-47.c: ... this.
248 * testsuite/libgomp.oacc-c/lib-48.c: Rename to...
249 * testsuite/libgomp.oacc-c-c++-common/lib-48.c: ... this.
250 * testsuite/libgomp.oacc-c/lib-49.c: Rename to...
251 * testsuite/libgomp.oacc-c-c++-common/lib-49.c: ... this.
252 * testsuite/libgomp.oacc-c/lib-5.c: Rename to...
253 * testsuite/libgomp.oacc-c-c++-common/lib-5.c: ... this.
254 * testsuite/libgomp.oacc-c/lib-50.c: Rename to...
255 * testsuite/libgomp.oacc-c-c++-common/lib-50.c: ... this.
256 * testsuite/libgomp.oacc-c/lib-51.c: Rename to...
257 * testsuite/libgomp.oacc-c-c++-common/lib-51.c: ... this.
258 * testsuite/libgomp.oacc-c/lib-52.c: Rename to...
259 * testsuite/libgomp.oacc-c-c++-common/lib-52.c: ... this.
260 * testsuite/libgomp.oacc-c/lib-53.c: Rename to...
261 * testsuite/libgomp.oacc-c-c++-common/lib-53.c: ... this.
262 * testsuite/libgomp.oacc-c/lib-54.c: Rename to...
263 * testsuite/libgomp.oacc-c-c++-common/lib-54.c: ... this.
264 * testsuite/libgomp.oacc-c/lib-55.c: Rename to...
265 * testsuite/libgomp.oacc-c-c++-common/lib-55.c: ... this.
266 * testsuite/libgomp.oacc-c/lib-56.c: Rename to...
267 * testsuite/libgomp.oacc-c-c++-common/lib-56.c: ... this.
268 * testsuite/libgomp.oacc-c/lib-57.c: Rename to...
269 * testsuite/libgomp.oacc-c-c++-common/lib-57.c: ... this.
270 * testsuite/libgomp.oacc-c/lib-58.c: Rename to...
271 * testsuite/libgomp.oacc-c-c++-common/lib-58.c: ... this.
272 * testsuite/libgomp.oacc-c/lib-59.c: Rename to...
273 * testsuite/libgomp.oacc-c-c++-common/lib-59.c: ... this.
274 * testsuite/libgomp.oacc-c/lib-6.c: Rename to...
275 * testsuite/libgomp.oacc-c-c++-common/lib-6.c: ... this.
276 * testsuite/libgomp.oacc-c/lib-60.c: Rename to...
277 * testsuite/libgomp.oacc-c-c++-common/lib-60.c: ... this.
278 * testsuite/libgomp.oacc-c/lib-61.c: Rename to...
279 * testsuite/libgomp.oacc-c-c++-common/lib-61.c: ... this.
280 * testsuite/libgomp.oacc-c/lib-62.c: Rename to...
281 * testsuite/libgomp.oacc-c-c++-common/lib-62.c: ... this.
282 * testsuite/libgomp.oacc-c/lib-63.c: Rename to...
283 * testsuite/libgomp.oacc-c-c++-common/lib-63.c: ... this.
284 * testsuite/libgomp.oacc-c/lib-64.c: Rename to...
285 * testsuite/libgomp.oacc-c-c++-common/lib-64.c: ... this.
286 * testsuite/libgomp.oacc-c/lib-65.c: Rename to...
287 * testsuite/libgomp.oacc-c-c++-common/lib-65.c: ... this.
288 * testsuite/libgomp.oacc-c/lib-66.c: Rename to...
289 * testsuite/libgomp.oacc-c-c++-common/lib-66.c: ... this.
290 * testsuite/libgomp.oacc-c/lib-67.c: Rename to...
291 * testsuite/libgomp.oacc-c-c++-common/lib-67.c: ... this.
292 * testsuite/libgomp.oacc-c/lib-68.c: Rename to...
293 * testsuite/libgomp.oacc-c-c++-common/lib-68.c: ... this.
294 * testsuite/libgomp.oacc-c/lib-69.c: Rename to...
295 * testsuite/libgomp.oacc-c-c++-common/lib-69.c: ... this.
296 * testsuite/libgomp.oacc-c/lib-7.c: Rename to...
297 * testsuite/libgomp.oacc-c-c++-common/lib-7.c: ... this.
298 * testsuite/libgomp.oacc-c/lib-70.c: Rename to...
299 * testsuite/libgomp.oacc-c-c++-common/lib-70.c: ... this.
300 * testsuite/libgomp.oacc-c/lib-71.c: Rename to...
301 * testsuite/libgomp.oacc-c-c++-common/lib-71.c: ... this.
302 * testsuite/libgomp.oacc-c/lib-72.c: Rename to...
303 * testsuite/libgomp.oacc-c-c++-common/lib-72.c: ... this.
304 * testsuite/libgomp.oacc-c/lib-73.c: Rename to...
305 * testsuite/libgomp.oacc-c-c++-common/lib-73.c: ... this.
306 * testsuite/libgomp.oacc-c/lib-74.c: Rename to...
307 * testsuite/libgomp.oacc-c-c++-common/lib-74.c: ... this.
308 * testsuite/libgomp.oacc-c/lib-75.c: Rename to...
309 * testsuite/libgomp.oacc-c-c++-common/lib-75.c: ... this.
310 * testsuite/libgomp.oacc-c/lib-76.c: Rename to...
311 * testsuite/libgomp.oacc-c-c++-common/lib-76.c: ... this.
312 * testsuite/libgomp.oacc-c/lib-77.c: Rename to...
313 * testsuite/libgomp.oacc-c-c++-common/lib-77.c: ... this.
314 * testsuite/libgomp.oacc-c/lib-78.c: Rename to...
315 * testsuite/libgomp.oacc-c-c++-common/lib-78.c: ... this.
316 * testsuite/libgomp.oacc-c/lib-79.c: Rename to...
317 * testsuite/libgomp.oacc-c-c++-common/lib-79.c: ... this.
318 * testsuite/libgomp.oacc-c/lib-80.c: Rename to...
319 * testsuite/libgomp.oacc-c-c++-common/lib-80.c: ... this.
320 * testsuite/libgomp.oacc-c/lib-81.c: Rename to...
321 * testsuite/libgomp.oacc-c-c++-common/lib-81.c: ... this.
322 * testsuite/libgomp.oacc-c/lib-82.c: Rename to...
323 * testsuite/libgomp.oacc-c-c++-common/lib-82.c: ... this.
324 * testsuite/libgomp.oacc-c/lib-83.c: Rename to...
325 * testsuite/libgomp.oacc-c-c++-common/lib-83.c: ... this.
326 * testsuite/libgomp.oacc-c/lib-84.c: Rename to...
327 * testsuite/libgomp.oacc-c-c++-common/lib-84.c: ... this.
328 * testsuite/libgomp.oacc-c/lib-85.c: Rename to...
329 * testsuite/libgomp.oacc-c-c++-common/lib-85.c: ... this.
330 * testsuite/libgomp.oacc-c/lib-86.c: Rename to...
331 * testsuite/libgomp.oacc-c-c++-common/lib-86.c: ... this.
332 * testsuite/libgomp.oacc-c/lib-87.c: Rename to...
333 * testsuite/libgomp.oacc-c-c++-common/lib-87.c: ... this.
334 * testsuite/libgomp.oacc-c/lib-88.c: Rename to...
335 * testsuite/libgomp.oacc-c-c++-common/lib-88.c: ... this.
336 * testsuite/libgomp.oacc-c/lib-89.c: Rename to...
337 * testsuite/libgomp.oacc-c-c++-common/lib-89.c: ... this.
338 * testsuite/libgomp.oacc-c/lib-9.c: Rename to...
339 * testsuite/libgomp.oacc-c-c++-common/lib-9.c: ... this.
340 * testsuite/libgomp.oacc-c/lib-90.c: Rename to...
341 * testsuite/libgomp.oacc-c-c++-common/lib-90.c: ... this.
342 * testsuite/libgomp.oacc-c/lib-91.c: Rename to...
343 * testsuite/libgomp.oacc-c-c++-common/lib-91.c: ... this.
344 * testsuite/libgomp.oacc-c/lib-92.c: Rename to...
345 * testsuite/libgomp.oacc-c-c++-common/lib-92.c: ... this.
346 * testsuite/libgomp.oacc-c/nested-1.c: Rename to...
347 * testsuite/libgomp.oacc-c-c++-common/nested-1.c: ... this.
348 * testsuite/libgomp.oacc-c/nested-2.c: Rename to...
349 * testsuite/libgomp.oacc-c-c++-common/nested-2.c: ... this.
350 * testsuite/libgomp.oacc-c/offset-1.c: Rename to...
351 * testsuite/libgomp.oacc-c-c++-common/offset-1.c: ... this.
352 * testsuite/libgomp.oacc-c/parallel-1.c: Rename to...
353 * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ... this.
354 * testsuite/libgomp.oacc-c/pointer-align-1.c: Rename to...
355 * testsuite/libgomp.oacc-c-c++-common/pointer-align-1.c: ... this.
356 * testsuite/libgomp.oacc-c/present-1.c: Rename to...
357 * testsuite/libgomp.oacc-c-c++-common/present-1.c: ... this.
358 * testsuite/libgomp.oacc-c/present-2.c: Rename to...
359 * testsuite/libgomp.oacc-c-c++-common/present-2.c: ... this.
360 * testsuite/libgomp.oacc-c/reduction-1.c: Rename to...
361 * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: ... this.
362 * testsuite/libgomp.oacc-c/reduction-2.c: Rename to...
363 * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: ... this.
364 * testsuite/libgomp.oacc-c/reduction-3.c: Rename to...
365 * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: ... this.
366 * testsuite/libgomp.oacc-c/reduction-4.c: Rename to...
367 * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: ... this.
368 * testsuite/libgomp.oacc-c/reduction-5.c: Rename to...
369 * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: ... this.
370 * testsuite/libgomp.oacc-c/reduction-initial-1.c: Rename to...
371 * testsuite/libgomp.oacc-c-c++-common/reduction-initial-1.c: ... this.
372 * testsuite/libgomp.oacc-c/subr.cu: Rename to...
373 * testsuite/libgomp.oacc-c-c++-common/subr.cu: ... this.
374 * testsuite/libgomp.oacc-c/subr.ptx: Rename to...
375 * testsuite/libgomp.oacc-c-c++-common/subr.ptx: ... this.
376 * testsuite/libgomp.oacc-c/timer.h: Rename to...
377 * testsuite/libgomp.oacc-c-c++-common/timer.h: ... this.
378 * testsuite/libgomp.oacc-c/update-1.c: Rename to...
379 * testsuite/libgomp.oacc-c-c++-common/update-1.c: ... this.
381 2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
383 * libgomp.texi: Update for OpenACC.
385 * target.h (struct ACC_dispatch_t): Remove avail_func. Update all
387 * oacc-host.c (openacc_avail): Likewise.
388 * plugin-nvptx.c (PTX_avail, openacc_avail): Likewise.
389 * libgomp.texi (acc_get_num_devices): Revise.
391 * testsuite/libgomp.oacc-c/goacc_kernels.c: Remove file.
392 * testsuite/libgomp.oacc-c/goacc_parallel.c: Remove file.
394 2014-11-04 Cesar Philippidis <cesar@codesourcery.com>
396 * testsuite/libgomp.oacc-fortran/routine-1.f90: New test.
397 * testsuite/libgomp.oacc-fortran/routine-2.f90: New test.
398 * testsuite/libgomp.oacc-fortran/routine-3.f90: New test.
399 * testsuite/libgomp.oacc-fortran/routine-4.f90: New test.
401 2014-11-04 Thomas Schwinge <thomas@codesourcery.com>
403 * testsuite/libgomp.oacc-c/reduction-initial-1.c
404 [ACC_DEVICE_TYPE_host_nonshm]: Remove special-casing for N.
406 2014-11-03 Cesar Philippidis <cesar@codesourcery.com>
407 Thomas Schwinge <thomas@codesourcery.com>
409 * libgomp.map (GOACC_get_thread_num): Declare.
410 (GOACC_get_num_threads): Declare.
411 * libgomp_g.h (GOACC_get_thread_num): Declare.
412 (GOACC_get_num_threads): Declare.
413 * oacc-parallel.c (GOACC_parallel): Handle num_gangs.
414 (GOACC_get_num_threads): New function.
415 (GOACC_get_thread_num): New function.
416 * oacc-ptx.h: New file.
417 * plugin-nvptx.c (ABORT_PTX): Remove macro. Move to oacc-ptx.h.
418 (ACC_ON_DEVICE_PTX): Likewise.
419 (link_ptx): Also link ptx code defined by GOACC_INTERNAL_PTX.
420 (PTX_exec): Handle gangs/CTAs.
421 * testsuite/libgomp.oacc-c/reduction-1.c: New test.
422 * testsuite/libgomp.oacc-c/reduction-2.c: New test.
423 * testsuite/libgomp.oacc-c/reduction-3.c: New test.
424 * testsuite/libgomp.oacc-c/reduction-4.c: New test.
425 * testsuite/libgomp.oacc-c/reduction-5.: New test.
426 * testsuite/libgomp.oacc-c/reduction-initial-1.c: New test.
427 * testsuite/libgomp.oacc-fortran/reduction-1.f90: New test.
428 * testsuite/libgomp.oacc-fortran/reduction-2.f90: New test.
429 * testsuite/libgomp.oacc-fortran/reduction-3.f90: New test.
430 * testsuite/libgomp.oacc-fortran/reduction-4.f90: New test.
431 * testsuite/libgomp.oacc-fortran/reduction-5.f90: New test.
432 * testsuite/libgomp.oacc-fortran/reduction-6.f90: New test.
434 2014-11-03 Cesar Philippidis <cesar@codesourcery.com>
436 * libgomp.map (GOACC_enter_exit_data): Declare as global.
437 * libgomp_g.h (GOACC_enter_exit_data): Declare.
438 (GOACC_update): Declare.
439 (gomp_acc_insert_pointer): Declare.
440 (gomp_acc_remove_pointer): Declare.
441 * oacc-mem.c (gomp_acc_insert_pointer): New function.
442 (gomp_acc_remove_pointer): New function.
443 * oacc-parallel.c (find_pset): New function.
444 (GOACC_enter_exit_data): New function.
445 (GOACC_update): Handle GOMP_MAP_TO_PSET.
446 * testsuite/libgomp.oacc-c/data-2.c: New test.
447 * testsuite/libgomp.oacc-c/data-3.c: New test.
448 * testsuite/libgomp.oacc-fortran/data-1.f90: New test.
449 * testsuite/libgomp.oacc-fortran/data-2.f90: New test.
450 * testsuite/libgomp.oacc-fortran/data-3.f90: New test.
451 * testsuite/libgomp.oacc-fortran/data-4.f90: New test.
453 2014-10-31 Cesar Philippidis <cesar@codesourcery.com>
455 * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: New test.
456 * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: New test.
457 * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: New test.
459 2014-10-31 Thomas Schwinge <thomas@codesourcery.com>
461 * configure.ac (CUDA_DRIVER_INCLUDE, CUDA_DRIVER_LIB): New
462 substituted variables.
463 (testsuite/libgomp-test-support.exp): Instantiate file.
464 * Makefile.in: Regenerate.
465 * configure: Likewise.
466 * testsuite/Makefile.in: Likewise.
467 * testsuite/libgomp-test-support.exp.in: New file.
468 * testsuite/lib/libgomp.exp: Load it.
469 (libgomp_init): For build-tree testing, add the CUDA paths to
470 ALWAYS_CFLAGS and always_ld_library_path.
472 2014-10-30 Julian Brown <julian@codesourcery.com>
474 * target.c (gomp_map_vars): Remove MM argument.
475 (GOMP_target, GOMP_target_data): Update calls to gomp_map_vars.
476 * oacc-mem.c (acc_map_data, present_create_copy): Update calls to
478 * oacc-parallel.c (GOACC_parallel, GOACC_data_start): Likewise.
479 * target.h (gomp_map_vars): Update prototype.
481 2014-10-30 Julian Brown <julian@codesourcery.com>
483 * oacc-host.c (DEBUG): Remove undefine.
484 * plugin-nvptx.c (DEBUG, DISABLE_ASYNC): Remove comment-out macro
486 * target.c (dump_mappings): Remove debugging function.
488 2014-10-30 Julian Brown <julian@codesourcery.com>
490 * target.c (gomp_load_plugin_for_device): Only call get_caps once.
491 (gomp_find_available_plugins): ...and don't call it again here.
493 2014-10-30 Julian Brown <julian@codesourcery.com>
495 * env.c (goacc_notify_var): New.
496 (initialize_env): Use above instead of
497 gomp_global_icv.acc_notify_var.
498 * error.c (gomp_vnotify): Use goacc_notify_var.
499 (gomp_notify): Fix formatting.
500 * libgomp.h (gomp_task_icv): Remove acc_notify_var field.
501 (goacc_notify_var): Add extern declaration.
503 2014-10-30 Julian Brown <julian@codesourcery.com>
505 * env.c (goacc_parse_device_num): Remove.
506 (initialize_env): Use parse_int instead of goacc_parse_device_num.
507 * oacc-init.c (lazy_open): Add bounds check for device number.
509 2014-10-30 Julian Brown <julian@codesourcery.com>
511 * env.c (oacc-int.h): Include.
512 * libgomp-plugin.h (GOMP_PLUGIN_async_unmap_vars): Don't declare
514 * libgomp.map (PLUGIN_1.0): Add GOMP_PLUGIN_acc_thread symbol.
515 * oacc-async.c (oacc-int.h): Include.
516 (acc_async_test, acc_async_test_all, acc_wait, acc_wait_async)
517 (acc_wait_all, acc_wait_all_async): Use base_dev not ACC_dev.
518 * oacc-cuda.c (oacc-int.h): Include.
519 (acc_get_current_cuda_device, acc_get_current_cuda_context)
520 (acc_get_cuda_stream): Use base_dev not ACC_dev.
521 (acc_set_cuda_stream): Call ACC_lazy_initialize, use base_dev not
523 * oacc-host.c (oacc-plugin.h, oacc-int.h): Include one or the
524 other, depending on HOST_NONSHM_PLUGIN setting.
525 (openacc_create_thread_data, openacc_destroy_thread_data): New.
526 (host_dispatch): Initialize create_thread_data_func,
527 destroy_thread_data_func hooks.
528 * oacc-init.c (oacc-int.h): Include.
529 (acc_device_lock): Make static.
530 (ACC_dev, ACC_handle, handle_num, struct ACC_context, ACC_contexts):
532 (base_dev, goacc_threads, goacc_thread_lock, goacc_cleanup_key):
534 (goacc_tls_data, goacc_tls_key): Define one or the other, depending
536 (dispatchers): Add comment.
537 (ACC_register): Only register 0th device.
538 (close_handle): Remove.
539 (_acc_init): Add comment. Don't use ACC_dev.
540 (goacc_new_thread, goacc_destroy_thread): New.
541 (lazy_open): Update comment. Remove code relating to contexts and
542 memory maps. Create thread-specific data if necessary.
543 (acc_init): Use base_dev not ACC_dev.
544 (_acc_shutdown): Don't call close_handle. Use base_dev not ACC_dev.
545 Free target-specific TLS data and close devices that are open at
546 the time of shutdown.
547 (lazy_init): Add comment. Use base_dev not ACC_dev.
548 (lazy_init_and_open): Add comment. Use base_dev not ACC_dev.
549 (acc_get_num_devices, acc_get_device_type, acc_get_device_num): Use
550 base_dev not ACC_dev.
551 (acc_set_device_num): Likewise. If switching device number,
552 de-associate previous device number from the current thread, but do
553 not close the device.
554 (acc_on_device): Check type for device for current thread, not
556 (ACC_runtime_initialize): Initialize goacc_tls_key,
557 goacc_cleanup_key, base_dev, goacc_threads, goacc_thread_lock. Don't
558 initialize ACC_contexts.
559 (saved_bound_dev): Remove.
560 (ACC_save_and_set_bind, ACC_restore_bind): Use goacc_thread.
561 (ACC_lazy_initialize): Use base_dev, goacc_thread instead of
563 * oacc-int.h (struct ACC_dispatch_t): Don't declare here.
564 (struct goacc_thread): New.
565 (goacc_tls_data): Define for HAVE_TLS.
566 (goacc_tls_key): Define for !HAVE_TLS.
567 (goacc_thread): New (versions with and without HAVE_TLS).
568 (ACC_mem_open, ACC_mem_close, ACC_resolve_device, ACC_dev)
569 (ACC_handle, struct memmap_t, ACC_memmap): Remove.
570 (base_dev): Add extern declaration.
571 * oacc-mem.c (oacc-int.h, assert.h): Include.
572 (ACC_memmap, ACC_mem_open, ACC_mem_close): Remove.
573 (lookup_host): Change memmap_t argument to struct
575 (lookup_dev): Change memmap_t argument to struct target_mem_desc.
576 Use list_count not refcount for iterating over mapped elements.
577 (acc_malloc): Use base_dev not ACC_dev.
578 (acc_free): Update call to lookup_dev. Use base_dev not ACC_dev.
579 (acc_memcpy_to_device, acc_memcpy_from_device): Use base_dev not
581 (acc_deviceptr, acc_is_present): Update call to lookup_host.
582 (acc_hostptr): Update call to lookup_dev.
583 (acc_map_data): Look up thread device instead of using ACC_dev,
584 update calls to lookup_host, lookup_dev. Use data environment in
586 (acc_unmap_data): Update call to lookup_host. Remove mapped data
587 from data environment not ACC_memmap.
588 (present_create_copy): Update call to lookup_host. Use data
589 environment instead of list in ACC_memmap.
590 (delete_copyout): Update call to lookup_host. Look up device in
591 current thread info instead of using ACC_dev.
592 (update_dev_host): Look up device in current thread info instead of
594 * oacc-parallel.c (oacc-int.h): Include.
595 (struct devgeom, devgeom, dump_devaddrs): Remove.
596 (select_acc_device): Call ACC_lazy_initialize earlier.
597 (GOACC_parallel): Use device for current thread instead of ACC_dev.
598 Use memory map from current device.
599 (GOACC_data_start): Likewise. Use thread info block for mapped data.
600 (GOACC_data_end): Use thread info block for mapped data.
601 (goacc_wait): Use device for current thread instead of ACC_dev.
602 (GOACC_update): Likewise. Formatting fixes.
603 * oacc-plugin.c (ACC_plugin_register): Remove.
604 (oacc-int.h): Include.
605 (GOMP_PLUGIN_acc_thread): New.
606 * oacc-plugin.h (target.h): Don't include.
607 (ACC_plugin_register): Remove.
608 (GOMP_PLUGIN_async_unmap_vars, GOMP_PLUGIN_acc_thread): Add extern
610 * plugin-nvptx.c (oacc-plugin.h): Include.
611 (current_stream, PTX_dev, PTX_devices): Remove.
612 (struct nvptx_thread): New.
613 (nvptx_thread): New function.
614 (select_stream_for_async): Locate ptx_dev in device-specific TLS
615 data instead of using TLS PTX_dev variable.
616 (PTX_init): Don't initialize PTX_devices.
617 (PTX_open_device): Remove PTX_devices list handling. Tweak context
619 (PTX_close_device): Remove PTX_devices list handling. Find PTX
620 device info via function argument instead of global TLS variable.
621 (PTX_get_num_devices): Make callable when backend has not been
623 (event_gc): Find PTX device info, current stream via nvptx_thread.
624 (event_add, PTX_exec, PTX_host2dev, PTX_dev2host)
625 (PTX_async_test_all, PTX_wait_all, PTX_wait_all_async)
626 (PTX_get_current_cuda_device, PTX_get_current_cuda_context)
627 (PTX_get_cuda_stream, PTX_set_cuda_stream, openacc_close_device)
628 (openacc_set_device_num, openacc_register_async_cleanup)
629 (openacc_async_set_async): Likewise.
630 (openacc_create_thread_data, openacc_destroy_thread_data): New.
631 * target.c (oacc-int.h): Include.
632 (gomp_fini_device): Split out memory-map freeing into...
633 (gomp_free_memmap): ...this new function.
634 (gomp_load_plugin_for_device): Initialize
635 openacc.create_thread_data_func, openacc.destroy_thread_data_func
637 (gomp_find_available_plugins): Initialize one target_device_descr
639 * target.h (oacc-int.h): Don't include.
640 (ACC_dispatch_t): Declare here. Add data_environ, ord fields.
641 Update comment for mem_map field.
642 (gomp_free_memmap): Add prototype.
644 2014-10-28 Thomas Schwinge <thomas@codesourcery.com>
646 * testsuite/libgomp.oacc-c/c.exp (ld_library_path, ALWAYS_CFLAGS):
647 Don't refer to CUDA installation in /opt/nvidia/cuda-5.5/.
649 * oacc-init.c: Don't use <sys/queue.h>'s SLIST_*.
650 * plugin-nvptx.c: Likewise.
652 2014-10-23 Thomas Schwinge <thomas@codesourcery.com>
654 * testsuite/libgomp.oacc-c/reduction-initial-1.c: New file.
656 2014-10-20 Cesar Philippidis <cesar@codesourcery.com>
658 * (GOACC_update): Declare.
660 2014-10-20 Julian Brown <julian@codesourcery.com>
662 * oacc-host.c (openacc_register_async_cleanup): New.
663 (host_dispatch): Initialise register_async_cleanup_func entry.
664 * oacc-int.h (struct ACC_dispatch_t): Add
665 register_async_cleanup_func hook.
666 * oacc-parallel.c (GOACC_parallel): Call
667 register_async_cleanup_func hook after queuing asynchronous
669 * plugin-nvptx.c (enum PTX_event_type): Add PTX_EVT_ASYNC_CLEANUP.
670 (struct PTX_event): Remove tgt field.
671 (event_gc): Don't do async cleanup in PTX_EVT_KNL, do it in
672 PTX_EVT_ASYNC_CLEANUP instead.
673 (event_add): Remove tgt argument. Support PTX_EVT_ASYNC_CLEANUP
675 (PTX_exec, PTX_host2dev, PTX_dev2host, PTX_wait_async)
676 (PTX_wait_all_async): Update calls to event_add.
677 (openacc_register_async_cleanup): New.
678 (PTX_async_test): Call event_gc on success path.
679 (PTX_async_test_all): Likewise.
680 * target.c (gomp_load_plugin_for_device): Initialise
681 register_async_cleanup hook.
683 2014-10-20 Julian Brown <julian@codesourcery.com>
685 * Makefile.am (AM_CPPFLAGS): Fix search path for locating
687 * Makefile.in: Regenerate.
689 2014-10-20 Julian Brown <julian@codesourcery.com>
691 * libgomp-plugin.c (gomp_plugin_*): Rename to...
692 (GOMP_PLUGIN_*): This.
693 * libgomp-plugin.h: Likewise.
694 * libgomp.map: Likewise.
695 * oacc-host.c (GOMP): Use GOMP_PLUGIN_ in macro expansion.
696 * oacc-plugin.c (gomp_plugin_*): Rename to...
697 (GOMP_PLUGIN_*): This.
698 * plugin-nvptx.c: Likewise.
700 2014-10-17 Thomas Schwinge <thomas@codesourcery.com>
701 James Norris <jnorris@codesourcery.com>
703 * libgomp.texi: Outline documentation for OpenACC.
705 2014-10-17 James Norris <jnorris@codesourcery.com>
706 Thomas Schwinge <thomas@codesourcery.com>
707 Tom de Vries <tom@codesourcery.com>
708 Cesar Philippidis <cesar@codesourcery.com>
710 * testsuite/Makefile.in: Regenerated.
711 * testsuite/lib/libgomp.exp
712 (check_effective_target_openacc_nvidia_accel_present)
713 (check_effective_target_openacc_nvidia_accel_selected): New
715 * testsuite/libgomp.oacc-fortran/fortran.exp: New exp file.
716 * testsuite/libgomp.oacc-fortran/*.f: New tests.
717 * testsuite/libgomp.oacc-fortran/*.f90: Likewise.
718 * testsuite/libgomp.oacc-c/c.exp: New exp file.
719 * testsuite/libgomp.oacc-c/subr.ptx: New file.
720 * testsuite/libgomp.oacc-c/subr.cu: New file.
721 * testsuite/libgomp.oacc-c/timer.h: New file.
722 * testsuite/libgomp.oacc-c/*.c: New tests.
723 * testsuite/libgomp.oacc-c++/c++.exp: New exp file.
725 2014-10-17 Nathan Sidwell <nathan@codesourcery.com>
726 James Norris <jnorris@codesourcery.com>
727 Thomas Schwinge <thomas@codesourcery.com>
728 Tom de Vries <tom@codesourcery.com>
729 Julian Brown <julian@codesourcery.com>
731 * Makefile.am (AM_CPPFLAGS): Search in ../include also.
732 (libgomp_plugin_nvptx_version_info, libgomp_plugin_nvptx_la_SOURCES)
733 (libgomp_plugin_nvptx_la_CPPFLAGS, libgomp_plugin_nvptx_la_LDFLAGS)
734 (libgomp_plugin_nvptx_la_LIBADD)
735 (libgomp_plugin_nvptx_la_LIBTOOLFLAGS): Set variables if
736 PLUGIN_NVPTX is defined.
737 (toolexeclib_LTLIBRARIES): Add nonshm-host
738 and (conditionally) nvidia plugins.
739 (libgomp_plugin_nonshm_host_version_info)
740 (libgomp_plugin_nonshm_host_la_SOURCES)
741 (libgomp_plugin_nonshm_host_la_CPPFLAGS)
742 (libgomp_plugin_nonshm_host_la_LDFLAGS)
743 (libgomp_plugin_nonshm_host_la_LIBTOOLFLAGS): Set variables.
744 (libgomp_la_SOURCES): Add oacc-parallel.c, splay-tree.c,
745 oacc-host.c, oacc-init.c, oacc-mem.c, oacc-async.c, oacc-plugin.c,
746 oacc-cuda.c, libgomp-plugin.c.
747 (nodist_libsubinclude_HEADERS): Add openacc.h,
748 ../include/gomp-constants.h.
749 * Makefile.in: Regenerate.
750 * config.h.in: Regenerate.
751 * configure.ac: Add TODOs for OpenACC in various places.
752 (CUDA_DRIVER_CPPFLAGS, CUDA_DRIVER_LDFLAGS): Initialize.
753 (--with-cuda-driver, --with-cuda-driver-include)
754 (--with-cuda-driver-lib, --enable-offload-targets): Implement new
756 (PLUGIN_NVPTX, PLUGIN_NVPTX_CPPFLAGS, PLUGIN_NVPTX_LDFLAGS)
757 (PLUGIN_NVPTX_LIBS): Initialize variables.
758 * configure: Regenerate.
759 * env.c (target.h): Include.
760 (goacc_device_num, goacc_device_type): New globals.
761 (goacc_parse_device_num, goacc_parse_device_type): New functions.
762 (initialize_env): Parse GCC_ACC_NOTIFY, ACC_DEVICE_TYPE,
763 ACC_DEVICE_NUM environment variables.
764 * error.c (gomp_verror, gomp_vfatal, gomp_vnotify, gomp_notify):
766 (gomp_fatal): Make global.
767 * libgomp.h (stdarg.h): Include.
768 (struct gomp_memory_mapping): Forward declaration.
769 (struct gomp_task_icv): Add acc_notify_var member.
770 (goacc_device_num, goacc_device_type): Add extern declarations.
771 (gomp_vnotify, gomp_notify, gomp_verror, gomp_vfatal): Add
773 (gomp_init_targets_once): Add prototype.
774 * libgomp.map (OACC_2.0): New symbol version. Add public acc_*
776 (PLUGIN_1.0): New symbol version. Add gomp plugin interface
778 * libgomp_g.h (GOACC_kernels, GOACC_parallel): Update prototypes.
779 (GOACC_wait): Add prototype.
780 * target.c (limits.h, stdbool.h, stdlib.h): Don't include.
781 (oacc-plugin.h, gomp-constants.h, stdio.h, assert.h): Include.
782 (splay_tree_node, splay_tree, splay_tree_key, target_mem_desc)
783 (splay_tree_key_s, enum target_type, gomp_device_descr): Don't
785 (splay-tree.h): Include.
787 (splay_compare): Change linkage to hidden not static.
788 (gomp_init_targets_once): New function.
789 (gomp_get_num_devices): Use above.
790 (dump_mappings): New function (for debugging).
791 (get_kind): New function.
792 (gomp_map_vars): Add gomp_memory_mapping (mm), is_openacc
793 parameters. Change KINDS to void *. Use lock from memory map
794 not device. Use macros from gomp-constants.h instead of
795 hard-coded values. Support OpenACC-specific mappings.
796 (gomp_copy_from_async): New function.
797 (gomp_unmap_vars): Add DO_COPYFROM argument. Only copy memory
798 back from device if it is true. Use lock from memory map not
800 (gomp_update): Add mm, is_openacc args. Use lock from
801 memory map not device. Use macros from gomp-constants.h not
803 (gomp_register_image_for_device): Add forward
805 (GOMP_offload_register): Change TARGET_DATA type to
806 void **. Check realloc result.
807 (gomp_init_device): Change linkage to hidden not static. Tweak mem
809 (gomp_fini_device): New function.
810 (GOMP_target): Adjust lazy initialization, check target
811 capabilities for OpenMP 4.0 support. Add locking around splay tree
812 lookup. Add new arg to gomp_unmap_vars call.
813 (GOMP_target_data): Tweak lazy initialization. Add new args to
814 gomp_map_vars, gomp_unmap_vars calls.
815 (GOMP_target_update): Tweak lazy initialization. Add new args to
817 (gomp_load_plugin_for_device): Initialize device_fini and
818 OpenACC-specific plugin hooks.
819 (gomp_register_images_for_device): Rename to...
820 (gomp_register_image_for_device): This, and register a single
821 device only, and only if it has not already had images registered.
822 (gomp_find_available_plugins): Rearrange to fix plugin loading and
823 initialization for OpenACC. Prefer a device with
824 TARGET_CAP_OPENMP_400 for OpenMP.
825 * target.h: New file.
826 * splay-tree.h: Move bulk of implementation to...
827 * splay-tree.c: New file.
828 * libgomp-plugin.c: New file.
829 * libgomp-plugin.h: New file.
830 * oacc-async.c: New file.
831 * oacc-cuda.c: New file.
832 * oacc-host.c: New file.
833 * oacc-init.c: New file.
834 * oacc-mem.c: New file.
835 * oacc-parallel.c: New file.
836 * oacc-plugin.c: New file.
837 * plugin-nvptx.c: New file.
838 * oacc-int.h: New file.
839 * openacc.f90: New file.
840 * openacc.h: New file.
841 * openacc_lib.h: New file.
843 2014-10-09 Thomas Schwinge <thomas@codesourcery.com>
845 * testsuite/libgomp.oacc-c/collapse-4.c: New file, moved from
846 gcc/testsuite/gcc.dg/goacc/collapse.c.
848 2014-09-23 Thomas Schwinge <thomas@codesourcery.com>
850 * libgomp.map (OACC_2.0): Add acc_on_device, acc_on_device_.
851 * fortran.c: Include "openacc.h".
852 (acc_on_device_): New function.
853 * oacc-parallel.c: Include "openacc.h".
854 (acc_on_device): New function.
855 * openacc.f90 (acc_device_kind, acc_device_none)
856 (acc_device_default, acc_device_host, acc_device_not_host): New
858 (acc_on_device): New function declaration.
859 * openacc_lib.h (acc_device_kind, acc_device_none)
860 (acc_device_default, acc_device_host, acc_device_not_host): New
862 (acc_on_device): New function declaration.
863 * openacc.h (acc_device_t): New enum.
864 (acc_on_device): New function declaration.
865 * testsuite/libgomp.oacc-c/acc_on_device-1.c: New file.
866 * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
867 * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
868 * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.
870 2014-07-09 Thomas Schwinge <thomas@codesourcery.com>
871 Jakub Jelinek <jakub@redhat.com>
873 * target.c (gomp_map_vars, gomp_unmap_vars, gomp_update): Support
874 NULL mappings as well as mapping kind OMP_CLAUSE_MAP_TO_PSET.
875 Also, some code reformatting.
877 2014-06-06 Thomas Schwinge <thomas@codesourcery.com>
878 James Norris <jnorris@codesourcery.com>
880 * libgomp.map (GOACC_2.0): Add GOACC_update.
881 * oacc-parallel.c (GOACC_update): New function.
883 2014-03-18 Ilya Verbin <ilya.verbin@intel.com>
885 * libgomp.map (GOMP_4.0.1): New symbol version.
886 Add GOMP_offload_register.
887 * plugin-host.c (device_available): Replace with:
888 (get_num_devices): This.
890 (offload_register): Ditto.
891 (device_init): Ditto.
892 (device_get_table): Ditto.
894 * target.c (target_type): New enum.
895 (offload_image_descr): New struct.
896 (offload_images, num_offload_images): New globals.
897 (struct gomp_device_descr): Remove device_available_func.
898 Add type, is_initialized, get_type_func, get_num_devices_func,
899 offload_register_func, device_init_func, device_get_table_func,
901 (mapping_table): New struct.
902 (GOMP_offload_register): New function.
903 (gomp_init_device): Ditto.
904 (GOMP_target): Add device initialization and lookup for target fn.
905 (GOMP_target_data): Add device initialization.
906 (GOMP_target_update): Ditto.
907 (gomp_load_plugin_for_device): Take handles for get_type,
908 get_num_devices, offload_register, device_init, device_get_table,
909 device_run functions.
910 (gomp_register_images_for_device): New function.
911 (gomp_find_available_plugins): Add registration of offload images.
913 2014-03-18 Thomas Schwinge <thomas@codesourcery.com>
915 * libgomp_g.h (GOACC_kernels, GOACC_parallel): Add three
916 additional int arguments.
917 * oacc-parallel.c (GOACC_kernels, GOACC_parallel): Handle these.
918 * testsuite/libgomp.oacc-c/goacc_kernels.c: Adjust.
919 * testsuite/libgomp.oacc-c/goacc_parallel.c: Likewise.
921 2014-02-28 Thomas Schwinge <thomas@codesourcery.com>
923 * testsuite/libgomp.oacc-c/goacc_kernels.c: New file.
924 * testsuite/libgomp.oacc-c/kernels-1.c: Likewise.
925 * testsuite/libgomp.oacc-c/parallel-1.c: Add one missing test.
927 * libgomp.map (GOACC_2.0): Add GOACC_kernels.
928 * libgomp_g.h (GOACC_kernels): New prototype.
929 * oacc-parallel.c (GOACC_kernels): New function.
931 2014-02-21 Thomas Schwinge <thomas@codesourcery.com>
933 * testsuite/libgomp.oacc-c/data-1.c: New file.
935 * libgomp.map (GOACC_2.0): Add GOACC_data_end, GOACC_data_start.
936 * libgomp_g.h (GOACC_data_start, GOACC_data_end): New prototypes.
937 * oacc-parallel.c (GOACC_data_start, GOACC_data_end): New
940 2014-02-20 Thomas Schwinge <thomas@codesourcery.com>
942 * target.c (gomp_load_plugin_for_device): Don't call dlcose if
945 2014-02-20 Thomas Schwinge <thomas@codesourcery.com>
946 James Norris <jnorris@codesourcery.com>
948 * plugin-host.c: New file.
949 * target.c (struct gomp_device_descr): Add device_alloc_func,
950 device_free_func, device_dev2host_func, device_host2dev_func
952 (gomp_load_plugin_for_device): Load these.
953 (gomp_map_vars, gomp_unmap_tgt, gomp_unmap_vars, gomp_update): Use
955 (resolve_device, gomp_find_available_plugins): Remove ID 257 hack.
957 2014-02-17 Ilya Verbin <ilya.verbin@intel.com>
959 * target.c (gomp_map_vars_existing): Don't update copy_from for the
962 2014-01-28 Thomas Schwinge <thomas@codesourcery.com>
964 * testsuite/libgomp.oacc-c/parallel-1.c: Extend.
966 2013-12-18 Thomas Schwinge <thomas@codesourcery.com>
968 * libgomp_g.h (GOACC_parallel): Switch kinds array to unsigned
970 * oacc-parallel.c (GOACC_parallel): Likewise, and catch
973 2013-11-08 Thomas Schwinge <thomas@codesourcery.com>
976 * target.c (gomp_find_available_plugins): Don't skip device 257
979 2013-11-07 Thomas Schwinge <thomas@codesourcery.com>
981 * oacc-parallel.c: New file.
982 * Makefile.am (libgomp_la_SOURCES): Add it.
983 * Makefile.in: Regenerate.
984 * libgomp.map (GOACC_2.0): Add GOACC_parallel.
985 * libgomp_g.h (GOACC_parallel): New declaration.
986 * testsuite/libgomp.oacc-c/goacc_parallel.c: New file.
987 * testsuite/libgomp.oacc-c/parallel-1.c: New file.
989 * libgomp.map (GOACC_2.0): New symbol version.
991 * openacc.f90 (openacc_version): New integer parameter.
992 * openacc_lib.h (openacc_version): Likewise.
993 * testsuite/libgomp.oacc-fortran/openacc_version-1.f: New file.
994 * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
996 * libgomp.map (OACC_2.0): New symbol version.
997 * Makefile.am (nodist_libsubinclude_HEADERS): Add openacc.h.
998 (nodist_finclude_HEADERS): Add openacc_lib.h, openacc.f90,
999 openacc.mod, and openacc_kinds.mod.
1000 (openacc_kinds.mod): New target.
1001 (%.mod): New target, generalized from omp_lib.mod.
1002 * Makefile.in: Regenerate.
1003 * openacc.f90: New file.
1004 * openacc.h: Likewise.
1005 * openacc_lib.h: Likewise.
1006 * testsuite/libgomp.oacc-c++/c++.exp: Likewise.
1007 * testsuite/libgomp.oacc-c/c.exp: Likewise.
1008 * testsuite/libgomp.oacc-c/lib-1.c: Likewise.
1009 * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
1010 * testsuite/libgomp.oacc-fortran/lib-1.f90: Likewise.
1011 * testsuite/libgomp.oacc-fortran/lib-2.f: Likewise.
1012 * testsuite/libgomp.oacc-fortran/lib-3.f: Likewise.
1014 Backport from trunk, r204519:
1016 * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
1018 * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
1019 * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
1020 * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
1021 * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
1024 Backport from trunk, r204518:
1026 * libgomp_g.h: Include <stddef.h> for size_t.
1028 Backport from trunk, r204517:
1030 * libgomp.spec.in: Update comment about libgomp's dependencies.
1031 * configure.ac: Likewise.
1032 * configure: Regenerate.
1034 2013-10-10 Jakub Jelinek <jakub@redhat.com>
1036 * testsuite/libgomp.c++/udr-6.C: Remove UDR + on type F.
1038 2013-10-08 Jakub Jelinek <jakub@redhat.com>
1040 * testsuite/libgomp.c/thread-limit-1.c (main): Check if
1041 cnt isn't bigger than 6 at any point in time, sleep 10ms after
1042 incrementing it and then atomically decrement.
1043 * testsuite/libgomp.c/thread-limit-2.c (main): Likewise.
1045 * libgomp.h (struct gomp_team): Add task_queued_count field.
1046 Add comments about task_{,queued_,running_}count.
1047 * team.c (gomp_new_team): Clear task_queued_count.
1048 * task.c (GOMP_task): Increment task_queued_count.
1049 (gomp_task_run_pre): Decrement task_queued_count. If it is
1050 decremented to zero, call gomp_team_barrier_clear_task_pending.
1051 (gomp_task_run_post_handle_dependers): Increment task_queued_count.
1052 (gomp_barrier_handle_tasks): Don't call
1053 gomp_team_barrier_clear_task_pending here.
1055 * testsuite/libgomp.c/udr-2.c (main): Remove unused variable i.
1056 * testsuite/libgomp.c/udr-3.c (main): Initialize i to 0.
1057 * testsuite/libgomp.c++/udr-8.C (main): Likewise.
1059 * testsuite/libgomp.c/affinity-1.c (min_cpusetsize): New variable.
1060 (pthread_getaffinity_np): Set it when setting contig_cpucount.
1061 (print_affinity): Use it for size, only use sysconf value if that is not
1062 set and if it is smaller than sizeof (cpu_set_t), use sizeof (cpu_set_t).
1064 2013-10-07 Jakub Jelinek <jakub@redhat.com>
1066 * testsuite/libgomp.c/affinity-1.c (main): Fork even if
1067 contig_cpucount is > 8.
1070 * config/linux/proc.c: Include errno.h.
1071 (gomp_get_cpuset_size): New variable.
1072 (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
1074 (gomp_init_num_threads): If CPU_ALLOC_SIZE is defined and
1075 pthread_getaffinity_np returned EINVAL, increase gomp_cpuset_size
1076 and retry. After successful pthread_getaffinity_np copy
1077 gomp_cpuset_size to gomp_get_cpuset_size and try to find out
1078 minimum gomp_cpuset_size that covers all the CPUs set in gomp_cpusetp.
1079 (get_num_procs): Pass gomp_get_cpuset_size rather than gomp_cpuset_size
1080 to pthread_getaffinity_np, adjust gomp_cpuset_popcount caller.
1081 * config/linux/proc.h (gomp_cpuset_popcount): Add cpusetsize argument.
1082 * config/linux/affinity.c (gomp_affinity_finalize_place_list,
1083 gomp_affinity_init_level): Adjust gomp_cpuset_popcount callers.
1084 * testsuite/libgomp.c/affinity-1.c (pthread_getaffinity_np): Set
1085 contig_cpucount from the first successful pthread_getaffinity_np
1086 call, rather than just first call.
1088 2013-10-04 Jakub Jelinek <jakub@redhat.com>
1090 * libgomp.h (struct gomp_task_icv): Add thread_limit_var.
1091 (gomp_thread_limit_var, gomp_remaining_threads_count,
1092 gomp_remaining_threads_lock): Remove.
1093 (gomp_managed_threads_lock): New variable.
1094 (struct gomp_thread_pool): Add threads_busy field.
1095 (gomp_free_thread): New prototype.
1096 * parallel.c (gomp_resolve_num_threads): Adjust for
1097 thread_limit now being in icv->thread_limit_var. Use
1098 UINT_MAX instead of ULONG_MAX as infinity. If not nested,
1099 just return minimum of max_num_threads and icv->thread_limit_var
1100 and if thr->thread_pool, set threads_busy to the returned value.
1101 Otherwise, don't update atomically gomp_remaining_threads_count,
1102 but instead thr->thread_pool->threads_busy.
1103 (GOMP_parallel_end): Adjust for thread_limit now being in
1104 icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
1105 infinity. Adjust threads_busy in the pool rather than
1106 gomp_remaining_threads_count. Remember team->nthreads and call
1107 gomp_team_end before adjusting threads_busy, if not nested
1108 afterwards, just set it to 1 non-atomically.
1109 * team.c (gomp_thread_start): Clear thr->thread_pool and
1110 thr->task before returning.
1111 (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
1112 before calling pthread_exit.
1113 (gomp_free_thread): No longer static. Use
1114 gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
1115 (gomp_team_start): Set thr->thread_pool->threads_busy to
1116 nthreads immediately after creating new pool. Use
1117 gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
1118 (gomp_team_end): Use gomp_managed_threads_lock instead of
1119 gomp_remaining_threads_lock.
1120 (initialize_team): Don't call gomp_sem_init here.
1121 * env.c (gomp_global_icv): Initialize thread_limit_var field.
1122 (gomp_thread_limit_var, gomp_remaining_threads_count,
1123 gomp_remaining_threads_lock): Remove.
1124 (gomp_managed_threads_locks): New variable.
1125 (handle_omp_display_env): Adjust for thread_limit var being
1127 (initialize_env): Likewise. If user provided value is > INT_MAX,
1128 set gomp_global_icv.thread_limit_var to UINT_MAX (infinity).
1129 Initialize gomp_managed_threads_lock instead of
1130 gomp_remaining_threads_lock.
1131 (omp_get_thread_limit): Adjust for thread_limit var in
1132 icv->thread_limit_var.
1133 * target.c: Include limits.h.
1134 (resolve_device): If device_id is < -1, return NULL.
1135 (gomp_map_vars): Make sure tgt->array, tgt->to_free, tgt->tgt_start,
1136 tgt->tgt_end and k->copy_from aren't left uninitialized.
1137 (GOMP_target): Arrange for host callback to be performed in a
1138 separate initial thread and contention group, inheriting ICVs from
1139 gomp_global_icv etc.
1140 (GOMP_teams): Adjust thread_limit_var ICV.
1141 * testsuite/libgomp.c/affinity-1.c (main): Call omp_set_dynamic (0).
1142 * testsuite/libgomp.c/target-3.c: New test.
1143 * testsuite/libgomp.c/target-4.c: New test.
1144 * testsuite/libgomp.c/target-5.c: New test.
1145 * testsuite/libgomp.c/target-6.c: New test.
1146 * testsuite/libgomp.c/target-7.c: New test.
1147 * testsuite/libgomp.c/thread-limit-1.c: New test.
1148 * testsuite/libgomp.c/thread-limit-2.c: New test.
1149 * testsuite/libgomp.c/thread-limit-3.c: New test.
1151 * libgomp.h (struct gomp_team_state): Add place_partition_off
1152 and place_partition_len fields.
1153 (struct gomp_task_icv): Add bind_var field.
1154 (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
1155 gomp_places_list_len): New extern decls.
1156 (struct gomp_thread): Add place field.
1157 (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
1158 (gomp_init_thread_affinity): Add place argument.
1159 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1160 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1161 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1162 gomp_affinity_init_level, gomp_affinity_print_place): New prototypes.
1163 (gomp_team_start): Add flags argument.
1164 * team.c (struct gomp_thread_start_data): Add place field.
1165 (gomp_thread_start): Initialize thr->place.
1166 (gomp_team_start): Add flags argument. Handle OpenMP 4.0 affinity.
1167 * env.c (gomp_global_icv): Initialize bind_var field.
1168 (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
1169 (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
1170 gomp_places_list_len): New variables.
1171 (parse_bind_var, parse_one_place, parse_places_var): New functions.
1172 (parse_affinity): Rewritten to construct OMP_PLACES list with unit
1174 (handle_omp_display_env): Remove proc_bind argument. Set display
1175 to true for OMP_DISPLAY_ENV=true. Print 201307 instead of 201107
1176 as _OPENMP. Enhance printing of OMP_PROC_BIND, add printing
1177 of OMP_PLACES, don't print anything for GOMP_CPU_AFFINITY.
1178 (initialize_env): Use parse_bind_var to parse OMP_PROC_BIND
1179 instead of parse_boolean. Use parse_places_var for OMP_PLACES
1180 parsing. Don't call parse_affinity if OMP_PLACES has been
1181 successfully parsed (and call gomp_init_affinity in that case).
1182 Adjust handle_omp_display_env caller.
1183 (omp_get_proc_bind): Return bind_var ICV.
1184 * config/posix/affinity.c (gomp_init_thread_affinity): Add place
1186 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1187 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1188 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1189 gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
1190 * config/linux/proc.c (gomp_cpuset_popcount): Fix up check extern decl.
1191 (gomp_init_num_threads): If HAVE_PTHREAD_AFFINITY_NP isn't defined,
1192 fix up sizeof argument. Free and clear gomp_cpusetp if it didn't
1193 contain any logical CPUs.
1194 (get_num_procs): Check gomp_places_list instead of gomp_cpu_affinity.
1195 * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
1196 (affinity_counter): Remove.
1197 (CPU_CLR_S): Define if CPU_ALLOC_SIZE is not defined.
1198 (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
1199 silently create OMP_PLACES=threads, if it is non-NULL afterwards,
1200 bind current thread to the first place.
1201 (gomp_init_thread_affinity): Rewritten. Add place argument, just
1202 pthread_setaffinity_np to gomp_places_list[place].
1203 (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
1204 gomp_affinity_remove_cpu, gomp_affinity_copy_place,
1205 gomp_affinity_same_place, gomp_affinity_finalize_place_list,
1206 gomp_affinity_init_level, gomp_affinity_print_place): New functions.
1207 * parallel.c (GOMP_parallel_start): Adjust gomp_team_start caller.
1208 (GOMP_parallel): Likewise, pass through flags parameter to it.
1209 * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
1211 (GOMP_parallel_sections): Likewise, pass through flags parameter to it.
1212 * loop.c (gomp_parallel_loop_start): Add flags argument, pass it through
1214 (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
1215 GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
1216 Adjust gomp_parallel_loop_start callers.
1217 (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1218 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): Likewise, pass
1219 through flags parameter to it.
1220 * testsuite/libgomp.c/affinity-1.c: New test.
1221 * testsuite/libgomp.c++/affinity-1.C: New test.
1223 2013-10-01 Jakub Jelinek <jakub@redhat.com>
1226 * config/linux/proc.c (gomp_cpuset_size, gomp_cpusetp): New variables.
1227 (gomp_cpuset_popcount): Use CPU_COUNT_S if available, or CPU_COUNT if
1228 gomp_cpuset_size is sizeof (cpu_set_t). Use gomp_cpuset_size instead
1229 of sizeof (cpu_set_t) to determine number of iterations.
1230 (gomp_init_num_threads): Initialize gomp_cpuset_size and gomp_cpusetp
1231 here, use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size
1232 instead of sizeof (cpu_set_t) to pthread_getaffinity_np.
1233 (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
1234 is NULL. Use gomp_cpusetp instead of &cpuset and pass gomp_cpuset_size
1235 instead of sizeof (cpu_set_t) to pthread_getaffinity_np.
1236 * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
1237 (gomp_cpuset_size, gomp_cpusetp): Declare.
1238 * config/linux/affinity.c (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S): Define
1239 if CPU_ALLOC_SIZE isn't defined.
1240 (gomp_init_affinity): Don't call pthread_getaffinity_np here, instead
1241 use gomp_cpusetp computed by gomp_init_num_threads. Use CPU_*_S
1242 variants of macros with gomp_cpuset_size as set size, for cpusetnew
1243 use alloca for it if CPU_ALLOC_SIZE is defined, otherwise local
1244 fixed size variable.
1245 (gomp_init_thread_affinity): Use CPU_*_S variants of macros with
1246 gomp_cpuset_size as set size, for cpuset use alloca for it if
1247 CPU_ALLOC_SIZE is defined, otherwise local fixed size variable.
1249 2013-09-27 Jakub Jelinek <jakub@redhat.com>
1251 * libgomp.h: Include stdlib.h.
1252 (struct gomp_task_depend_entry,
1253 struct gomp_dependers_vec): New types.
1254 (struct gomp_task): Add dependers, depend_hash, depend_count,
1255 num_dependees and depend fields.
1256 (struct gomp_taskgroup): Add num_children field.
1257 (gomp_finish_task): Free depend_hash if non-NULL.
1258 * libgomp_g.h (GOMP_task): Add depend argument.
1259 * hashtab.h: New file.
1260 * task.c: Include hashtab.h.
1261 (hash_entry_type): New typedef.
1262 (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
1263 (gomp_init_task): Clear dependers, depend_hash and depend_count
1265 (GOMP_task): Add depend argument, handle depend clauses. Increment
1266 num_children field in taskgroup.
1267 (gomp_task_run_pre): Don't increment task_running_count here,
1268 nor clear task_pending bit.
1269 (gomp_task_run_post_handle_depend_hash,
1270 gomp_task_run_post_handle_dependers,
1271 gomp_task_run_post_handle_depend): New functions.
1272 (gomp_task_run_post_remove_parent): Clear in_taskwait before
1273 signalling corresponding semaphore.
1274 (gomp_task_run_post_remove_taskgroup): Decrement num_children
1275 field and make the decrement to 0 MEMMODEL_RELEASE operation,
1276 rather than storing NULL to taskgroup->children. Clear
1277 in_taskgroup_wait before signalling corresponding semaphore.
1278 (gomp_barrier_handle_tasks): Move task_running_count increment
1279 and task_pending bit clearing here. Call
1280 gomp_task_run_post_handle_depend. If more than one new tasks
1281 have been queued, wake other threads if needed.
1282 (GOMP_taskwait): Call gomp_task_run_post_handle_depend. If more
1283 than one new tasks have been queued, wake other threads if needed.
1284 After waiting on taskwait_sem, enter critical section again.
1285 (GOMP_taskgroup_start): Initialize num_children field.
1286 (GOMP_taskgroup_end): Check num_children instead of children
1287 before critical section. If children is NULL, but num_children
1288 is non-zero, wait on taskgroup_sem. Call
1289 gomp_task_run_post_handle_depend. If more than one new tasks have
1290 been queued, wake other threads if needed. After waiting on
1291 taskgroup_sem, enter critical section again.
1292 * testsuite/libgomp.c/depend-1.c: New test.
1293 * testsuite/libgomp.c/depend-2.c: New test.
1294 * testsuite/libgomp.c/depend-3.c: New test.
1295 * testsuite/libgomp.c/depend-4.c: New test.
1297 2013-09-26 Jakub Jelinek <jakub@redhat.com>
1300 * testsuite/libgomp.c/simd-6.c: New test.
1301 * testsuite/libgomp.c++/simd-8.C: New test.
1303 2013-09-25 Jakub Jelinek <jakub@redhat.com>
1305 * parallel.c (GOMP_cancellation_point, GOMP_cancel): Handle
1306 GIMPLE_CANCEL_TASKGROUP cancellation.
1307 * libgomp.h (struct gomp_task): Add next_taskgroup, prev_taskgroup,
1308 taskgroup and copy_ctors_done fields.
1309 (struct gomp_taskgroup): New type.
1310 * task.c (gomp_init_task): Initialize copy_ctors_done and taskgroup
1312 (GOMP_task): Don't start a new thread also if it's taskgroup has
1313 been cancelled. Set copy_ctors_done field if needed. Initialize
1314 taskgroup field. If copy_ctors_done and already cancelled, don't
1315 discard the task. If taskgroup is non-NULL, enqueue the task
1316 into taskgroup queue.
1317 (gomp_task_run_pre, gomp_task_run_post_remove_parent,
1318 gomp_task_run_post_remove_taskgroup): New inline functions.
1319 (gomp_barrier_handle_tasks, GOMP_taskwait): Use them.
1320 (GOMP_taskgroup_start, GOMP_taskgroup_end): Implement taskgroup
1322 * testsuite/libgomp.c++/cancel-parallel-1.C: New test.
1323 * testsuite/libgomp.c++/cancel-parallel-2.C: New test.
1324 * testsuite/libgomp.c++/cancel-parallel-3.C: New test.
1325 * testsuite/libgomp.c++/cancel-for-1.C: New test.
1326 * testsuite/libgomp.c++/cancel-for-1.C: New test.
1327 * testsuite/libgomp.c++/cancel-taskgroup-1.C: New test.
1328 * testsuite/libgomp.c++/cancel-taskgroup-2.C: New test.
1329 * testsuite/libgomp.c++/cancel-taskgroup-3.C: New test.
1330 * testsuite/libgomp.c++/cancel-test.h: New file.
1331 * testsuite/libgomp.c++/cancel-sections-1.C: New test.
1332 * testsuite/libgomp.c++/taskgroup-1.C: New test.
1333 * testsuite/libgomp.c/cancel-taskgroup-1.c: New test.
1334 * testsuite/libgomp.c/cancel-taskgroup-2.c: New test.
1335 * testsuite/libgomp.c/taskgroup-1.c: New test.
1336 * testsuite/libgomp.c/cancel-parallel-3.c (do_some_work): Use
1339 2013-09-24 Richard Henderson <rth@redhat.com>
1340 Jakub Jelinek <jakub@redhat.com>
1342 * libgomp.map (GOMP_4.0): Export GOMP_barrier_cancel,
1343 GOMP_loop_end_cancel, GOMP_sections_end_cancel.
1344 * parallel.c (GOMP_cancellation_point): Add WHICH argument, do nothing
1345 if gomp_cancel_var is false, handle workshare and parallel
1346 cancellation point, add ialias.
1347 (GOMP_cancel): Add WHICH and DO_CANCEL arguments, do nothing if
1348 gomp_cancel_var is false, call GOMP_cancellation_point if DO_CANCEL
1349 is false, handle workshare and parallel cancellation.
1350 * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
1351 (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
1352 Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
1353 (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
1354 gomp_team_barrier_cancel): New functions.
1355 * config/posix/bar.h (gomp_barrier_t): Add cancellable field.
1356 (BAR_CANCELLED): Define.
1357 (BAR_INCR): Set to 8.
1358 (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
1359 gomp_team_barrier_cancel): New prototypes.
1360 (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
1361 (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
1362 gomp_team_barrier_cancelled): New inline functions.
1363 * config/linux/bar.c (gomp_team_barrier_wait_end): Clear BAR_CANCELLED
1364 from state where needed. Set work_share_cancelled to 0 on last thread.
1365 (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
1366 gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
1368 * config/linux/bar.h (gomp_barrier_t): Add awaited_final field.
1369 (BAR_CANCELLED): Define.
1370 (BAR_INCR): Set to 8.
1371 (gomp_barrier_init): Initialize awaited_final field.
1372 (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
1373 gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
1375 (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
1376 (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
1377 gomp_team_barrier_cancelled): New inline functions.
1378 * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
1379 team->work_shares_to_free to thr->ts.work_share before calling
1381 (gomp_work_share_end_cancel): New function.
1382 * team.c (gomp_thread_start): Use gomp_team_barrier_wait_final
1383 instead of gomp_team_barrier_wait.
1384 (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled
1385 and team_cancelled fields.
1386 (gomp_team_end): Use gomp_team_barrier_wait_final instead of
1387 gomp_team_barrier_wait. If team->team_cancelled, call
1388 gomp_fini_worshare on ws chain starting at team->work_shares_to_free
1389 rather than thr->ts.work_share.
1390 * env.c (gomp_global_icv): Initialize target_data field.
1391 (gomp_cancel_var): New global variable.
1392 (handle_omp_display_env): Print cancel-var ICV.
1393 (initialize_env): Parse OMP_CANCELLATION env var.
1394 (omp_get_cancellation): Return gomp_cancel_var.
1395 * barrier.c (GOMP_barrier_cancel): New function.
1396 * libgomp.h (gomp_cancel_var): New extern decl.
1397 (struct gomp_team): Add work_shares_to_free, work_share_cancelled
1398 and team_cancelled fields.
1399 (gomp_cancel_kind): New enum.
1400 (gomp_work_share_end_cancel): New prototype.
1401 * libgomp_g.h (GOMP_barrier_cancel, GOMP_loop_end_cancel,
1402 GOMP_sections_end_cancel): New prototypes.
1403 (GOMP_cancel, GOMP_cancellation_point): Adjust prototypes.
1404 * task.c (GOMP_task): If gomp_team_barrier_cancelled, don't
1405 queue or start new tasks.
1406 (gomp_barrier_handle_tasks): If gomp_team_barrier_cancelled,
1407 don't start any new tasks, just free all tasks.
1408 * sections.c (GOMP_sections_end_cancel): New function.
1409 * loop.c (GOMP_loop_end_cancel): New function.
1410 * testsuite/libgomp.c/cancel-parallel-1.c: New test.
1411 * testsuite/libgomp.c/cancel-parallel-2.c: New test.
1412 * testsuite/libgomp.c/cancel-parallel-3.c: New test.
1413 * testsuite/libgomp.c/cancel-for-1.c: New test.
1414 * testsuite/libgomp.c/cancel-for-2.c: New test.
1415 * testsuite/libgomp.c/cancel-sections-1.c: New test.
1417 2013-09-23 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1419 * configure.ac: Add checks for plugins support.
1420 * config.h.in: Regenerated.
1421 * configure: Regenerated.
1422 * target.c (struct target_mem_desc): Add device_descr field.
1425 (struct gomp_device_descr): New.
1426 (gomp_get_num_devices): Call gomp_target_init.
1427 (resolve_device): Return device_descr instead of int.
1428 (gomp_map_vars): Add devicep argument and update the function
1430 (gomp_unmap_tgt): Likewise.
1431 (gomp_unmap_vars): Likewise.
1432 (gomp_update): Likewise.
1433 (GOMP_target): Use device_descr struct.
1434 (GOMP_target_data): Likewise.
1435 (GOMP_target_update): Likewise.
1436 (gomp_check_plugin_file_name): New.
1437 (gomp_load_plugin_for_device): New.
1438 (gomp_find_available_plugins): New.
1439 (gomp_target_init): New.
1441 2013-09-19 Jakub Jelinek <jakub@redhat.com>
1443 * libgomp_g.h (GOMP_target): Change 3rd argument to const void *.
1444 (GOMP_target_data, GOMP_target_update): Add openmp_target argument.
1445 * target.c (GOMP_target): Change fnname argument to openmp_target,
1446 with const void * type.
1447 (GOMP_target_data, GOMP_target_update): Add openmp_target argument.
1449 * testsuite/libgomp.c/simd-4.c: New test.
1450 * testsuite/libgomp.c/simd-5.c: New test.
1451 * testsuite/libgomp.c/udr-1.c: New test.
1452 * testsuite/libgomp.c/udr-2.c: New test.
1453 * testsuite/libgomp.c/udr-3.c: New test.
1454 * testsuite/libgomp.c++/udr-9.C: New test.
1456 2013-09-18 Jakub Jelinek <jakub@redhat.com>
1458 * testsuite/libgomp.c++/simd-4.C: New test.
1459 * testsuite/libgomp.c++/simd-5.C: New test.
1460 * testsuite/libgomp.c++/simd-6.C: New test.
1461 * testsuite/libgomp.c++/simd-7.C: New test.
1462 * testsuite/libgomp.c++/udr-1.C: New test.
1463 * testsuite/libgomp.c++/udr-2.C: New test.
1464 * testsuite/libgomp.c++/udr-3.C: New test.
1465 * testsuite/libgomp.c++/udr-4.C: New test.
1466 * testsuite/libgomp.c++/udr-5.C: New test.
1467 * testsuite/libgomp.c++/udr-6.C: New test.
1468 * testsuite/libgomp.c++/udr-7.C: New test.
1469 * testsuite/libgomp.c++/udr-8.C: New test.
1471 2013-09-16 Jakub Jelinek <jakub@redhat.com>
1473 * splay-tree.h: New file.
1474 * target.c: Include stdbool.h.
1475 (splay_tree_node, splay_tree, splay_tree_key): New typedefs.
1476 (struct target_mem_desc, struct splay_tree_key_s): New structures.
1477 (splay_compare): New inline function.
1478 (gomp_get_num_devices): New function.
1479 (resolve_device): Use default_device_var ICV. Add temporarily
1480 magic testing device number 257.
1481 (dev_splay_tree, dev_env_lock): New variables.
1482 (gomp_map_vars_existing, gomp_map_vars, gomp_unmap_tgt,
1483 gomp_unmap_vars, gomp_update): New functions.
1484 (GOMP_target, GOMP_target_data, GOMP_target_end_data,
1485 GOMP_target_update): Add support for magic testing device number 257.
1486 * libgomp.h (struct target_mem_desc): Forward declare.
1487 (struct gomp_task_icv): Add default_device_var and target_data.
1488 (gomp_get_num_devices): New prototype.
1489 * env.c (gomp_global_icv): Add default_device_var initializer.
1490 (parse_int): New function.
1491 (handle_omp_display_env): Print OMP_DEFAULT_DEVICE.
1492 (initialize_env): Initialize default_device_var.
1493 (omp_set_default_device): Set default_device_var ICV.
1494 (omp_get_default_device): Query default_device_var ICV.
1495 (omp_get_num_devices): Call gomp_get_num_devices.
1496 (omp_get_num_teams, omp_get_team_num, omp_is_initial_device): Add
1499 2013-09-13 Jakub Jelinek <jakub@redhat.com>
1501 PR tree-optimization/58392
1502 * testsuite/libgomp.c/pr58392.c: New test.
1504 2013-09-06 Jakub Jelinek <jakub@redhat.com>
1506 * testsuite/libgomp.c/target-2.c: New test.
1507 * testsuite/libgomp.c++/target-3.C: New test.
1509 2013-09-05 Jakub Jelinek <jakub@redhat.com>
1511 * testsuite/libgomp.c++/target-2.C: New test.
1512 * testsuite/libgomp.c++/target-2-aux.cc: New file.
1514 * libgomp.map (GOMP_4.0): Add GOMP_target, GOMP_target_data,
1515 GOMP_target_end_data, GOMP_target_update and GOMP_teams.
1516 * Makefile.am (libgomp_la_SOURCES): Add target.c.
1517 * Makefile.in: Regenerated.
1518 * target.c: New file.
1519 * libgomp_g.h (GOMP_target, GOMP_target_data,
1520 GOMP_target_end_data, GOMP_target_update, GOMP_teams): New prototypes.
1521 * testsuite/libgomp.c++/for-11.C (main): Uncomment
1522 #pragma omp target teams directive.
1523 * testsuite/libgomp.c/for-3.c (main): Likewise.
1524 * testsuite/libgomp.c++/target-1.C: New test.
1525 * testsuite/libgomp.c/target-1.c: New test.
1527 2013-07-06 Jakub Jelinek <jakub@redhat.com>
1529 * testsuite/libgomp.c/for-3.c: New test.
1530 * testsuite/libgomp.c/simd-1.c: New test.
1531 * testsuite/libgomp.c/simd-2.c: New test.
1532 * testsuite/libgomp.c/simd-3.c: New test.
1534 2013-07-05 Richard Henderson <rth@redhat.com>
1536 * config/linux/bar.c (gomp_team_barrier_wait_end): Remove one more
1537 hard-coded constant.
1539 2013-07-03 Richard Henderson <rth@redhat.com>
1541 * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
1542 BAR_WAITING_FOR_TASK, BAR_INCR): New.
1543 (gomp_barrier_wait_start, gomp_barrier_last_thread,
1544 gomp_team_barrier_set_task_pending,
1545 gomp_team_barrier_clear_task_pending,
1546 gomp_team_barrier_set_waiting_for_tasks,
1547 gomp_team_barrier_waiting_for_tasks,
1548 gomp_team_barrier_done): Use them.
1549 * config/linux/bar.c (gomp_barrier_wait_end,
1550 gomp_barrier_wait_last, gomp_team_barrier_wait_end): Likewise.
1551 * config/posix/bar.h, config/posix/bar.c: Similarly.
1553 2013-07-03 Jakub Jelinek <jakub@redhat.com>
1555 * testsuite/libgomp.c++/atomic-14.C: Adjust for stricter atomic
1557 * testsuite/libgomp.c++/atomic-15.C: Likewise.
1558 * testsuite/libgomp.c/atomic-17.c: Likewise.
1560 2013-06-28 Jakub Jelinek <jakub@redhat.com>
1562 * testsuite/libgomp.c++/simd-1.C: New test.
1563 * testsuite/libgomp.c++/simd-2.C: New test.
1564 * testsuite/libgomp.c++/simd-3.C: New test.
1566 2013-06-21 Jakub Jelinek <jakub@redhat.com>
1568 * testsuite/libgomp.c/for-1.h: New file.
1569 * testsuite/libgomp.c/for-2.h: New file.
1570 * testsuite/libgomp.c/for-1.c: New test.
1571 * testsuite/libgomp.c/for-2.c: New test.
1572 * testsuite/libgomp.c++/for-9.C: New test.
1573 * testsuite/libgomp.c++/for-10.C: New test.
1574 * testsuite/libgomp.c++/for-11.C: New test.
1576 2013-06-12 Jakub Jelinek <jakub@redhat.com>
1578 * fortran.c (omp_is_initial_device): Add ialias_redirect.
1579 (omp_is_initial_device_): New function.
1580 * omp_lib.f90.in (omp_is_initial_device): New interface.
1581 * omp.h.in (omp_is_initial_device): New prototype.
1582 * libgomp.map (omp_is_initial_device, omp_is_initial_device_):
1584 * env.c (omp_is_initial_device): New function. Add ialias for it.
1585 * omp_lib.h.in (omp_is_initial_device): New external.
1587 * omp_lib.f90.in (omp_get_dynamic, omp_get_nested,
1588 omp_in_parallel, omp_get_max_threads, omp_get_num_procs,
1589 omp_get_num_threads, omp_get_thread_num, omp_get_thread_limit,
1590 omp_set_max_active_levels, omp_get_max_active_levels,
1591 omp_get_level, omp_get_ancestor_thread_num,
1592 omp_get_team_size, omp_get_active_level, omp_in_final,
1593 omp_get_cancellation, omp_get_default_device,
1594 omp_get_num_devices, omp_get_num_teams, omp_get_team_num): Remove
1595 useless use omp_lib_kinds.
1597 2013-04-30 Jakub Jelinek <jakub@redhat.com>
1599 * testsuite/libgomp.c/atomic-17.c: New test.
1600 * testsuite/libgomp.c++/atomic-14.C: New test.
1601 * testsuite/libgomp.c++/atomic-15.C: New test.
1603 2013-04-10 Jakub Jelinek <jakub@redhat.com>
1605 * libgomp.map (omp_get_cancellation, omp_get_cancellation_,
1606 omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device,
1607 omp_set_default_device_, omp_set_default_device_8_,
1608 omp_get_default_device, omp_get_default_device_,
1609 omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams,
1610 omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export
1612 (GOMP_cancel, GOMP_cancellation_point, GOMP_parallel_loop_dynamic,
1613 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
1614 GOMP_parallel_loop_static, GOMP_parallel_sections, GOMP_parallel,
1615 GOMP_taskgroup_start, GOMP_taskgroup_end): Export @@GOMP_4.0.
1616 * parallel.c (GOMP_parallel_end): Add ialias.
1617 (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New
1619 * omp.h.in (omp_proc_bind_t): New typedef.
1620 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1621 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1622 omp_get_team_num): New prototypes.
1623 * env.c (omp_get_cancellation, omp_get_proc_bind,
1624 omp_set_default_device, omp_get_default_device, omp_get_num_devices,
1625 omp_get_num_teams, omp_get_team_num): New functions.
1626 * fortran.c (ULP, STR1, STR2, ialias_redirect): Removed.
1627 (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
1628 omp_set_default_device_8_, omp_get_default_device_,
1629 omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
1631 * libgomp.h (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect,
1632 ialias_call): Define.
1633 * libgomp_g.h (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1634 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel,
1635 GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start,
1636 GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes.
1637 * task.c (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
1638 * sections.c (GOMP_parallel_sections): New function.
1639 * loop.c (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
1640 GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): New
1642 (GOMP_parallel_end): Add ialias_redirect.
1643 * omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false,
1644 omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1645 omp_proc_bind_spread): New params.
1646 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1647 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1648 omp_get_team_num): New interfaces.
1649 * omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
1650 omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
1651 omp_proc_bind_spread): New params.
1652 (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
1653 omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
1654 omp_get_team_num): New externals.
1656 2013-03-20 Tobias Burnus <burnus@net-b.de>
1658 * libgomp.texi (Environment Variables): Minor cleanup,
1659 update section refs to OpenMP 4.0rc2.
1660 (OMP_DISPLAY_ENV, GOMP_SPINCOUNT): Document these
1661 environment variables.
1663 2013-03-20 Tobias Burnus <burnus@net-b.de>
1665 * env.c (handle_omp_display_env): New function.
1666 (initialize_env): Use it.
1668 2013-03-20 Jakub Jelinek <jakub@redhat.com>
1670 * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
1671 * testsuite/libgomp.c/atomic-15.c: New test.
1672 * testsuite/libgomp.c/atomic-16.c: New test.
1674 * testsuite/libgomp.c++/atomic-10.C: New test.
1675 * testsuite/libgomp.c++/atomic-11.C: New test.
1676 * testsuite/libgomp.c++/atomic-12.C: New test.
1677 * testsuite/libgomp.c++/atomic-13.C: New test.
1679 Copyright (C) 2013-2014 Free Software Foundation, Inc.
1681 Copying and distribution of this file, with or without modification,
1682 are permitted in any medium without royalty provided the copyright
1683 notice and this notice are preserved.