]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
1 | .. |
2 | Copyright 1988-2022 Free Software Foundation, Inc. | |
3 | This is part of the GCC manual. | |
4 | For copying conditions, see the copyright.rst file. | |
5 | ||
6 | .. _acc_on_device: | |
7 | ||
8 | acc_on_device -- Whether executing on a particular device | |
9 | ********************************************************* | |
10 | ||
11 | Description: | |
12 | This function returns whether the program is executing on a particular | |
13 | device specified in :samp:`{devicetype}`. In C/C++ a non-zero value is | |
14 | returned to indicate the device is executing on the specified device type. | |
15 | In Fortran, ``true`` will be returned. If the program is not executing | |
16 | on the specified device type C/C++ will return a zero, while Fortran will | |
17 | return ``false``. | |
18 | ||
19 | C/C++: | |
20 | .. list-table:: | |
21 | ||
22 | * - *Prototype*: | |
23 | - ``acc_on_device(acc_device_t devicetype);`` | |
24 | ||
25 | Fortran: | |
26 | .. list-table:: | |
27 | ||
28 | * - *Interface*: | |
29 | - ``function acc_on_device(devicetype)`` | |
30 | * - | |
31 | - ``integer(acc_device_kind) devicetype`` | |
32 | * - | |
33 | - ``logical acc_on_device`` | |
34 | ||
35 | Reference: | |
36 | :openacc:`2.6`, section | |
3ed1b4ce | 37 | 3.2.17. |