File: MPI_T_enum_get_info.3.rst

package info (click to toggle)
openmpi 5.0.8-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 201,692 kB
  • sloc: ansic: 613,078; makefile: 42,351; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (68 lines) | stat: -rw-r--r-- 1,697 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.. _mpi_t_enum_get_info:


MPI_T_enum_get_info
===================

.. include_body

:ref:`MPI_T_enum_get_info` |mdash| Query information about an enumerator


SYNTAX
------


C Syntax
^^^^^^^^

.. code-block:: c

   #include <mpi.h>

   int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len)


INPUT PARAMETERS
----------------
* ``enumtype``: Enumerator to be queried.

INPUT/OUTPUT PARAMETERS
-----------------------
* ``name_len``: Length of the string and/or buffer for name.

OUTPUT PARAMETERS
-----------------
* ``num``: number of discrete values represented by this enumeration.
* ``name``: Buffer to return the string containing the name of the category.

DESCRIPTION
-----------

:ref:`MPI_T_enum_get_info` can be used to query information about an
enumerator. The function returns the number of discrete values
represented by this enumerator in the *num* parameter.


NOTES
-----

This MPI tool interface function returns the name of the enumeration as
a string. This function takes two argument for the string: *name* which
specifies a buffer where the name of the should be stored, and
*name_len* which must initially specify the size of the buffer pointed
to by *name*. This function will copy at most *name_len* - 1 characters
of the name and sets *name_len* to the number of characters returned +
1. If *name_len* is NULL or the value specified in *name_len* is 0 the
*name* buffer is ignored and the name of the enumeration is not
returned.


ERRORS
------

:ref:`MPI_T_enum_get_info` will fail if:

* ``MPI_T_ERR_NOT_INITIALIZED``: The MPI Tools interface not initialized

* ``MPI_T_ERR_INVALID_INDEX``: The enumeration is invalid or has been deleted