re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000")
[official-gcc.git] / libgomp / oacc-async.c
blob08b7c5e1945781adabad04fc9ad594315b031e0e
1 /* OpenACC Runtime Library Definitions.
3 Copyright (C) 2013-2015 Free Software Foundation, Inc.
5 Contributed by Mentor Embedded.
7 This file is part of the GNU Offloading and Multi Processing Library
8 (libgomp).
10 Libgomp is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3, or (at your option)
13 any later version.
15 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 more details.
20 Under Section 7 of GPL version 3, you are granted additional
21 permissions described in the GCC Runtime Library Exception, version
22 3.1, as published by the Free Software Foundation.
24 You should have received a copy of the GNU General Public License and
25 a copy of the GCC Runtime Library Exception along with this program;
26 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
27 <http://www.gnu.org/licenses/>. */
30 #include "openacc.h"
31 #include "libgomp.h"
32 #include "oacc-int.h"
34 int
35 acc_async_test (int async)
37 if (async < acc_async_sync)
38 gomp_fatal ("invalid async argument: %d", async);
40 return base_dev->openacc.async_test_func (async);
43 int
44 acc_async_test_all (void)
46 return base_dev->openacc.async_test_all_func ();
49 void
50 acc_wait (int async)
52 if (async < acc_async_sync)
53 gomp_fatal ("invalid async argument: %d", async);
55 base_dev->openacc.async_wait_func (async);
58 void
59 acc_wait_async (int async1, int async2)
61 base_dev->openacc.async_wait_async_func (async1, async2);
64 void
65 acc_wait_all (void)
67 base_dev->openacc.async_wait_all_func ();
70 void
71 acc_wait_all_async (int async)
73 if (async < acc_async_sync)
74 gomp_fatal ("invalid async argument: %d", async);
76 base_dev->openacc.async_wait_all_async_func (async);