HOME
| OPENMP API Specification: Version 5.0 November 2018

5.4.2  Context Management and Navigation

SummaryThe tool provides the OMPD library with callbacks to manage and to navigate context relationships.

5.4.2.1 ompd_callback_get_thread_context_for_thread_id_fn_t

SummaryThe ompd_callback_get_thread_context_for_thread_id_fn_t is the type signature of the callback routine that the tool provides to the OMPD library to map a thread identifier to a tool thread context.

Format

SVG-Viewer needed.

 

 
typedef ompd_rc_t 
(*ompd_callback_get_thread_context_for_thread_id_fn_t) ( 
  ompd_address_space_context_t *address_space_context, 
  ompd_thread_id_t kind, 
  ompd_size_t sizeof_thread_id, 
  const void *thread_id, 
  ompd_thread_context_t **thread_context 
);  

SVG-Viewer needed.

DescriptionThe ompd_callback_get_thread_context_for_thread_id_fn_t is the type signature of the context mapping callback routine that the tool provides. This callback maps a thread identifier to a tool thread context. The thread identifier is within the address space that address_space_context identifies. The OMPD library can use the thread context, for example, to access thread local storage.

Description of ArgumentsThe address_space_context argument is an opaque handle that the tool provides to reference an address space. The kind, sizeof_thread_id, and thread_id arguments represent a native thread identifier. On return, the thread_context argument provides an opaque handle that maps a native thread identifier to a tool thread context.

RestrictionsRoutines that use ompd_callback_get_thread_context_for_thread_id_fn_t have the following restriction:

Cross References

5.4.2.2 ompd_callback_sizeof_fn_t

SummaryThe ompd_callback_sizeof_fn_t type is the type signature of the callback routine that the tool provides to the OMPD library to determine the sizes of the primitive types in an address space.

Format

SVG-Viewer needed.

 

 
typedef ompd_rc_t (*ompd_callback_sizeof_fn_t) ( 
  ompd_address_space_context_t *address_space_context, 
  ompd_device_type_sizes_t *sizes 
);  

SVG-Viewer needed.

DescriptionThe ompd_callback_sizeof_fn_t is the type signature of the type-size query callback routine that the tool provides. This callback provides the sizes of the basic primitive types for a given address space.

Description of ArgumentsThe callback returns the sizes of the basic primitive types used by the address space context that the address_space_context argument specifies in the location to which the sizes argument points.

Cross References