Sandra Loosemore wrote:
I find the part about the "associated named constant" really confusing; I am not sure those are for property identifiers or property values. Can you give an example, or actually list the named constants individually?

Well, the property is called 'dev_num'; the identifier (named constant) is 'omp_ipr_dev_num', which is an enum in C/C++ and a parameter in Fortran.

* * *

To obtain the name to a property (range: omp_ipr_first to omp_get_num_interop_properties()), you can call:

printf ("%s\n", omp_get_interop_name (obj, -5));

printf ("%s\n", omp_get_interop_name (obj, omp_ipr_dev_num));

will print "dev_num" (twice).

In the second call, the named constant is used.

* * *

A typical code to obtain the property would be:

int dev_num = omp_get_interop_int (obj, omp_ipr_dev_num, NULL);

* * *

Regarding:

+To each listed property, an associated named constant exists with prefix
+@code{omp_ipr_}.  Note that @code{device_num} is the OpenMP device number +while @code{device} is the HIP device number or HSA device handle.

Any suggestion how to handle this best?

Listing both the property name and the named constant seems to be a bit pointless – and I fear linebreaks will appear in the table when viewed as 'info' file.

I could remove the first quoted sentence, but it might help the user when calling the API function.

For the string-valued constants in the table, please include the quotes, unless those are identifiers instead of string literal.

Using nice quotes like in ‘…’ as with @samp (in info, HTML, PDF it appears as such)—or just, e.g.,  "amd" or 'nvidia', i.e. plain quotes?

Tobias

Reply via email to