]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/doc/openacc-runtime-library-routines/accgetproperty.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / libgomp / doc / openacc-runtime-library-routines / accgetproperty.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.. index:: acc_get_property, acc_get_property_string
7
8.. _acc_get_property:
9
10acc_get_property -- Get device property.
11****************************************
12
13Description
14 These routines return the value of the specified :samp:`{property}` for the
15 device being queried according to :samp:`{devicenum}` and :samp:`{devicetype}`.
16 Integer-valued and string-valued properties are returned by
17 ``acc_get_property`` and ``acc_get_property_string`` respectively.
18 The Fortran ``acc_get_property_string`` subroutine returns the string
19 retrieved in its fourth argument while the remaining entry points are
20 functions, which pass the return value as their result.
21
22 Note for Fortran, only: the OpenACC technical committee corrected and, hence,
23 modified the interface introduced in OpenACC 2.6. The kind-value parameter
24 ``acc_device_property`` has been renamed to ``acc_device_property_kind``
25 for consistency and the return type of the ``acc_get_property`` function is
26 now a ``c_size_t`` integer instead of a ``acc_device_property`` integer.
27 The parameter ``acc_device_property`` will continue to be provided,
28 but might be removed in a future version of GCC.
29
30C/C++:
31 .. list-table::
32
33 * - *Prototype*:
34 - ``size_t acc_get_property(int devicenum, acc_device_t devicetype, acc_device_property_t property);``
35 * - *Prototype*:
36 - ``const char *acc_get_property_string(int devicenum, acc_device_t devicetype, acc_device_property_t property);``
37
38Fortran:
39 .. list-table::
40
41 * - *Interface*:
42 - ``function acc_get_property(devicenum, devicetype, property)``
43 * - *Interface*:
44 - ``subroutine acc_get_property_string(devicenum, devicetype, property, string)``
45 * -
46 - ``use ISO_C_Binding, only: c_size_t``
47 * -
48 - ``integer devicenum``
49 * -
50 - ``integer(kind=acc_device_kind) devicetype``
51 * -
52 - ``integer(kind=acc_device_property_kind) property``
53 * -
54 - ``integer(kind=c_size_t) acc_get_property``
55 * -
56 - ``character(*) string``
57
58Reference:
59 :openacc:`2.6`, section
3ed1b4ce 60 3.2.6.