HOME
| OPENMP API Specification: Version 5.0 November 2018

5.5.6  Parallel Region Handles

5.5.6.1 ompd_get_curr_parallel_handle

SummaryThe ompd_get_curr_parallel_handle function obtains a pointer to the parallel handle for an OpenMP thread’s current parallel region.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_get_curr_parallel_handle( 
  ompd_thread_handle_t *thread_handle, 
  ompd_parallel_handle_t **parallel_handle 
);  

SVG-Viewer needed.

DescriptionThe ompd_get_curr_parallel_handle function enables the tool to obtain a pointer to the parallel handle for the current parallel region that is associated with an OpenMP thread. This call is meaningful only if the associated thread is stopped. The parallel handle must be released by calling ompd_rel_parallel_handle.

Description of ArgumentsThe thread_handle argument is an opaque handle for a thread and selects the thread on which to operate. On return, the parallel_handle argument is set to a handle for the parallel region that the associated thread is currently executing, if any.

Cross References

5.5.6.2 ompd_get_enclosing_parallel_handle

SummaryThe ompd_get_enclosing_parallel_handle function obtains a pointer to the parallel handle for an enclosing parallel region.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_get_enclosing_parallel_handle( 
  ompd_parallel_handle_t *parallel_handle, 
  ompd_parallel_handle_t **enclosing_parallel_handle 
);  

SVG-Viewer needed.

DescriptionThe ompd_get_enclosing_parallel_handle function enables a tool to obtain a pointer to the parallel handle for the parallel region that encloses the parallel region that parallel_handle specifies. This call is meaningful only if at least one thread in the parallel region is stopped. A pointer to the parallel handle for the enclosing region is returned in the location to which enclosing_parallel_handle points. After the call, the tool owns the handle; the tool must release the handle with ompd_rel_parallel_handle when it is no longer required.

Description of ArgumentsThe parallel_handle argument is an opaque handle for a parallel region that selects the parallel region on which to operate. On return, the enclosing_parallel_handle argument is set to a handle for the parallel region that encloses the selected parallel region.

Cross References

5.5.6.3 ompd_get_task_parallel_handle

SummaryThe ompd_get_task_parallel_handle function obtains a pointer to the parallel handle for the parallel region that encloses a task region.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_get_task_parallel_handle( 
  ompd_task_handle_t *task_handle, 
  ompd_parallel_handle_t **task_parallel_handle 
);  

SVG-Viewer needed.

DescriptionThe ompd_get_task_parallel_handle function enables a tool to obtain a pointer to the parallel handle for the parallel region that encloses the task region that task_handle specifies. This call is meaningful only if at least one thread in the parallel region is stopped. A pointer to the parallel regions handle is returned in the location to which task_parallel_handle points. The tool owns that parallel handle, which it must release with ompd_rel_parallel_handle.

Description of ArgumentsThe task_handle argument is an opaque handle that selects the task on which to operate. On return, the parallel_handle argument is set to a handle for the parallel region that encloses the selected task.

Cross References

5.5.6.4 ompd_rel_parallel_handle

SummaryThe ompd_rel_parallel_handle function releases a parallel region handle.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_rel_parallel_handle( 
  ompd_parallel_handle_t *parallel_handle 
);  

SVG-Viewer needed.

DescriptionParallel region handles are opaque so tools cannot release them directly. Instead, a tool must pass a parallel region handle to the ompd_rel_parallel_handle function for disposal when finished with it.

Description of ArgumentsThe parallel_handle argument is an opaque handle to be released.

Cross References

5.5.6.5 ompd_parallel_handle_compare

SummaryThe ompd_parallel_handle_compare function compares two parallel region handles.

Format

SVG-Viewer needed.

 

 
ompd_rc_t ompd_parallel_handle_compare( 
  ompd_parallel_handle_t *parallel_handle_1, 
  ompd_parallel_handle_t *parallel_handle_2, 
  int *cmp_value 
);  

SVG-Viewer needed.

DescriptionThe internal structure of parallel region handles is opaque to tools. While tools can easily compare pointers to parallel region handles, they cannot determine whether handles at two different addresses refer to the same underlying parallel region and, instead must use the ompd_parallel_handle_compare function. On success, ompd_parallel_handle_compare returns a signed integer value in the location to which cmp_value points that indicates how the underlying parallel regions compare. A value less than, equal to, or greater than 0 indicates that the region corresponding to parallel_handle_1 is, respectively, less than, equal to, or greater than that corresponding to parallel_handle_2. This function is provided since the means by which parallel region handles are ordered is implementation defined.

Description of ArgumentsThe parallel_handle_1 and parallel_handle_2 arguments are opaque handles that correspond to parallel regions. On return the cmp_value argument points to a signed integer value that indicates how the underlying parallel regions compare.

Cross References