LLVM OpenMP* Runtime Library
ompt-specific.h
1 #ifndef OMPT_SPECIFIC_H
2 #define OMPT_SPECIFIC_H
3 
4 #include "kmp.h"
5 
6 void __ompt_team_assign_id(kmp_team_t *team, ompt_parallel_id_t ompt_pid);
7 void __ompt_thread_assign_wait_id(void *variable);
8 
9 void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, kmp_info_t *thr,
10  int gtid, void *microtask,
11  ompt_parallel_id_t ompt_pid);
12 
13 void __ompt_lw_taskteam_link(ompt_lw_taskteam_t *lwt, kmp_info_t *thr);
14 
15 ompt_lw_taskteam_t * __ompt_lw_taskteam_unlink(kmp_info_t *thr);
16 
17 ompt_parallel_id_t __ompt_parallel_id_new(int gtid);
18 ompt_task_id_t __ompt_task_id_new(int gtid);
19 
20 ompt_team_info_t *__ompt_get_teaminfo(int depth, int *size);
21 
22 ompt_task_info_t *__ompt_get_taskinfo(int depth);
23 
24 inline kmp_info_t *
25 ompt_get_thread_gtid(int gtid)
26 {
27  return (gtid >= 0) ? __kmp_thread_from_gtid(gtid) : NULL;
28 }
29 
30 inline kmp_info_t *
31 ompt_get_thread()
32 {
33  int gtid = __kmp_gtid_get_specific();
34  return ompt_get_thread_gtid(gtid);
35 }
36 
37 
38 void __ompt_thread_begin(ompt_thread_type_t thread_type, int gtid);
39 
40 void __ompt_thread_end(ompt_thread_type_t thread_type, int gtid);
41 
42 
43 int __ompt_get_parallel_team_size_internal(int ancestor_level);
44 
45 ompt_task_id_t __ompt_get_task_id_internal(int depth);
46 
47 ompt_frame_t *__ompt_get_task_frame_internal(int depth);
48 
49 #endif