diff options
| author | Joachim Protze <protze@itc.rwth-aachen.de> | 2018-12-18 08:52:30 +0000 |
|---|---|---|
| committer | Joachim Protze <protze@itc.rwth-aachen.de> | 2018-12-18 08:52:30 +0000 |
| commit | 0e0d6cdd5862d7c5e28c542fa07d6fadd07f1628 (patch) | |
| tree | 22dcaf0d7997dfa9c44037f1ccbe8b36c20daa4c /openmp/runtime/src/ompt-general.cpp | |
| parent | 1f7d4aca8dc854974d1050c80a4875b554f4af72 (diff) | |
| download | bcm5719-llvm-0e0d6cdd5862d7c5e28c542fa07d6fadd07f1628.tar.gz bcm5719-llvm-0e0d6cdd5862d7c5e28c542fa07d6fadd07f1628.zip | |
[OMPT] First chunk of final OMPT 5.0 interface updates
This patch updates the implementation of the ompt_frame_t, ompt_wait_id_t
and ompt_state_t. The final version of the OpenMP 5.0 spec added the "t"
for these types.
Furthermore the structure for ompt_frame_t changed and allows to specify
that the reenter frame belongs to the runtime.
Patch partially prepared by Simon Convent
Reviewers: hbae
llvm-svn: 349458
Diffstat (limited to 'openmp/runtime/src/ompt-general.cpp')
| -rw-r--r-- | openmp/runtime/src/ompt-general.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/openmp/runtime/src/ompt-general.cpp b/openmp/runtime/src/ompt-general.cpp index 8da561090f6..705b452d87b 100644 --- a/openmp/runtime/src/ompt-general.cpp +++ b/openmp/runtime/src/ompt-general.cpp @@ -52,8 +52,8 @@ typedef struct { const char *state_name; - omp_state_t state_id; -} omp_state_info_t; + ompt_state_t state_id; +} ompt_state_info_t; typedef struct { const char *name; @@ -73,10 +73,10 @@ enum tool_setting_e { ompt_callbacks_active_t ompt_enabled; -omp_state_info_t omp_state_info[] = { -#define omp_state_macro(state, code) {#state, state}, - FOREACH_OMP_STATE(omp_state_macro) -#undef omp_state_macro +ompt_state_info_t ompt_state_info[] = { +#define ompt_state_macro(state, code) {#state, state}, + FOREACH_OMPT_STATE(ompt_state_macro) +#undef ompt_state_macro }; kmp_mutex_impl_info_t kmp_mutex_impl_info[] = { @@ -353,7 +353,7 @@ void ompt_post_init() { kmp_info_t *root_thread = ompt_get_thread(); - ompt_set_thread_state(root_thread, omp_state_overhead); + ompt_set_thread_state(root_thread, ompt_state_overhead); if (ompt_enabled.ompt_callback_thread_begin) { ompt_callbacks.ompt_callback(ompt_callback_thread_begin)( @@ -366,7 +366,7 @@ void ompt_post_init() { NULL, NULL, task_data, ompt_task_initial, 0, NULL); } - ompt_set_thread_state(root_thread, omp_state_work_serial); + ompt_set_thread_state(root_thread, ompt_state_work_serial); } } @@ -388,13 +388,13 @@ void ompt_fini() { OMPT_API_ROUTINE int ompt_enumerate_states(int current_state, int *next_state, const char **next_state_name) { - const static int len = sizeof(omp_state_info) / sizeof(omp_state_info_t); + const static int len = sizeof(ompt_state_info) / sizeof(ompt_state_info_t); int i = 0; for (i = 0; i < len - 1; i++) { - if (omp_state_info[i].state_id == current_state) { - *next_state = omp_state_info[i + 1].state_id; - *next_state_name = omp_state_info[i + 1].state_name; + if (ompt_state_info[i].state_id == current_state) { + *next_state = ompt_state_info[i + 1].state_id; + *next_state_name = ompt_state_info[i + 1].state_name; return 1; } } @@ -482,11 +482,11 @@ OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level, team_size); } -OMPT_API_ROUTINE omp_state_t ompt_get_state(omp_wait_id_t *wait_id) { - omp_state_t thread_state = __ompt_get_state_internal(wait_id); +OMPT_API_ROUTINE ompt_state_t ompt_get_state(ompt_wait_id_t *wait_id) { + ompt_state_t thread_state = __ompt_get_state_internal(wait_id); - if (thread_state == omp_state_undefined) { - thread_state = omp_state_work_serial; + if (thread_state == ompt_state_undefined) { + thread_state = ompt_state_work_serial; } return thread_state; @@ -502,7 +502,7 @@ OMPT_API_ROUTINE ompt_data_t *ompt_get_thread_data(void) { OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type, ompt_data_t **task_data, - omp_frame_t **task_frame, + ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { return __ompt_get_task_info_internal(ancestor_level, type, task_data, |

