typedef int (*ompt_initialize_t) (
ompt_function_lookup_t lookup,
int initial_device_num,
ompt_data_t *tool_data
);
Summary A callback with type signature ompt_initialize_t initializes use of the OMPT interface.
Description To use the OMPT interface, an implementation of ompt_start_tool must return a non-null pointer to an ompt_start_tool_result_t structure that contains a pointer to a tool initializer function with type signature ompt_initialize_t. An OpenMP implementation will call the initializer after fully initializing itself but before beginning execution of any OpenMP construct or runtime library routine.
The initializer returns a non-zero value if it succeeds; otherwise the OMPT interface state changes to inactive as described in Section 4.2.3.
Description of Arguments The lookup argument is a callback to an OpenMP runtime routine that must be used to obtain a pointer to each runtime entry point in the OMPT interface. The initial_device_num argument provides the value of omp_get_initial_device(). The tool_data argument is a pointer to the tool_data field in the ompt_start_tool_result_t structure that ompt_start_tool returned.
Summary A tool implements a finalizer with the type signature ompt_finalize_t to finalize its use of the OMPT interface.
Description To use the OMPT interface, an implementation of ompt_start_tool must return a non-null pointer to an ompt_start_tool_result_t structure that contains a non-null pointer to a tool finalizer with type signature ompt_finalize_t. An OpenMP implementation must call the tool finalizer after the last OMPT event as the OpenMP implementation shuts down.
Description of Arguments The tool_data argument is a pointer to the tool_data field in the ompt_start_tool_result_t structure returned by ompt_start_tool.