ompd_rc_t ompd_enumerate_icvs (
ompd_address_space_handle_t *handle,
ompd_icv_id_t current,
ompd_icv_id_t *next_id,
const char **next_icv_name,
ompd_scope_t *next_scope,
int *more
);
Summary The ompd_enumerate_icvs function enumerates ICVs.
Description An OpenMP implementation must support all ICVs listed in Section 2.4.1. An OpenMP implementation may support additional implementation-specific variables. An implementation may store ICVs in a different scope than Table 2.3 indicates. The ompd_enumerate_icvs function enables a tool to enumerate the ICVs that an OpenMP implementation supports and their related scopes. The ICVs num-procs-var, thread-num-var, final-task-var, implicit-task-var and team-size-var must also be available with an ompd- prefix.
When the current argument is set to the identifier of a supported ICV, ompd_enumerate_icvs assigns the value, string name, and scope of the next ICV in the enumeration to the locations to which the next_id, next_icv_name, and next_scope arguments point. On return, the third-party tool owns the next_icv_name string. The OMPD library uses the memory allocation callback that the tool provides to allocate the string storage; the tool is responsible for releasing the memory.
On return, the location to which the more argument points has the value of 1 whenever one or more ICV are left in the enumeration. On return, that location has the value 0 when current is the last ICV in the enumeration.
Description of Arguments The address_space_handle argument identifies the address space. The current argument must be an ICV that the OpenMP implementation supports. To begin enumerating the ICVs, a tool should pass ompd_icv_undefined as the value of current. Subsequent calls to ompd_enumerate_icvs should pass the value returned by the call in the next_id output argument. On return, the next_id argument points to an integer with the value of the ID of the next ICV in the enumeration. On return, the next_icv_name argument points to a character string with the name of the next ICV. On return, the next_scope argument points to the scope enum value of the scope of the next ICV. On return, the more_enums argument points to an integer with the value of 1 when more ICVs are left to enumerate and the value of 0 when no more ICVs are left.
Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5 or the following return code:
Summary The ompd_get_icv_from_scope function returns the value of an ICV.
Description The ompd_get_icv_from_scope function provides access to the ICVs that ompd_enumerate_icvs identifies.
Description of Arguments The handle argument provides an OpenMP scope handle. The scope argument specifies the kind of scope provided in handle. The icv_id argument specifies the ID of the requested ICV. On return, the icv_value argument points to a location with the value of the requested ICV.
Constraints on Arguments The provided handle must match the scope as defined in Section 5.3.10.
The provided scope must match the scope for icv_id as requested by ompd_enumerate_icvs.
Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5 or any of the following return codes:
Summary The ompd_get_icv_string_from_scope function returns the value of an ICV.
Description The ompd_get_icv_string_from_scope function provides access to the ICVs that ompd_enumerate_icvs identifies.
Description of Arguments The handle argument provides an OpenMP scope handle. The scope argument specifies the kind of scope provided in handle. The icv_id argument specifies the ID of the requested ICV. On return, the icv_string argument points to a string representation of the requested ICV.
On return, the third-party tool owns the icv_string string. The OMPD library allocates the string storage with the memory allocation callback that the tool provides. The tool is responsible for releasing the memory.
Constraints on Arguments The provided handle must match the scope as defined in Section 5.3.10.
The provided scope must match the scope for icv_id as requested by ompd_enumerate_icvs.
Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5 or the following return code:
Summary The ompd_get_tool_data function provides access to the OMPT data variable stored for each OpenMP scope.
Description The ompd_get_tool_data function provides access to the OMPT tool data stored for each scope. If the runtime library does not support OMPT then the function returns ompd_rc_unsupported.
Description of Arguments The handle argument provides an OpenMP scope handle. The scope argument specifies the kind of scope provided in handle. On return, the value argument points to the value field of the ompt_data_t union stored for the selected scope. On return, the ptr argument points to the ptr field of the ompt_data_t union stored for the selected scope.
Description of Return Codes This routine must return any of the general return codes listed at the beginning of Section 5.5 or the following return code: