]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/doc/openacc-runtime-library-routines/accondevice.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / libgomp / doc / openacc-runtime-library-routines / accondevice.rst
CommitLineData
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
8acc_on_device -- Whether executing on a particular device
9*********************************************************
10
11Description:
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
19C/C++:
20 .. list-table::
21
22 * - *Prototype*:
23 - ``acc_on_device(acc_device_t devicetype);``
24
25Fortran:
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
35Reference:
36 :openacc:`2.6`, section
3ed1b4ce 37 3.2.17.