Merge openmp release_80 branch r356034 (effectively, 8.0.0 rc5).
PR: 236062 MFC after: 1 month X-MFC-With: r344779
This commit is contained in:
commit
cc471ead66
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345233
@ -450,9 +450,6 @@ OMPT_API_ROUTINE ompt_set_result_t ompt_set_callback(ompt_callbacks_t which,
|
||||
|
||||
OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_t which,
|
||||
ompt_callback_t *callback) {
|
||||
if (!ompt_enabled.enabled)
|
||||
return ompt_get_callback_failure;
|
||||
|
||||
switch (which) {
|
||||
|
||||
#define ompt_event_macro(event_name, callback_type, event_id) \
|
||||
@ -460,7 +457,7 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_t which,
|
||||
if (ompt_event_implementation_status(event_name)) { \
|
||||
ompt_callback_t mycb = \
|
||||
(ompt_callback_t)ompt_callbacks.ompt_callback(event_name); \
|
||||
if (ompt_enabled.event_name && mycb) { \
|
||||
if (mycb) { \
|
||||
*callback = mycb; \
|
||||
return ompt_get_callback_success; \
|
||||
} \
|
||||
@ -483,15 +480,11 @@ OMPT_API_ROUTINE int ompt_get_callback(ompt_callbacks_t which,
|
||||
OMPT_API_ROUTINE int ompt_get_parallel_info(int ancestor_level,
|
||||
ompt_data_t **parallel_data,
|
||||
int *team_size) {
|
||||
if (!ompt_enabled.enabled)
|
||||
return 0;
|
||||
return __ompt_get_parallel_info_internal(ancestor_level, parallel_data,
|
||||
team_size);
|
||||
}
|
||||
|
||||
OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wait_id) {
|
||||
if (!ompt_enabled.enabled)
|
||||
return ompt_state_work_serial;
|
||||
int thread_state = __ompt_get_state_internal(wait_id);
|
||||
|
||||
if (thread_state == ompt_state_undefined) {
|
||||
@ -506,8 +499,6 @@ OMPT_API_ROUTINE int ompt_get_state(ompt_wait_id_t *wait_id) {
|
||||
****************************************************************************/
|
||||
|
||||
OMPT_API_ROUTINE ompt_data_t *ompt_get_thread_data(void) {
|
||||
if (!ompt_enabled.enabled)
|
||||
return NULL;
|
||||
return __ompt_get_thread_data_internal();
|
||||
}
|
||||
|
||||
@ -516,8 +507,6 @@ OMPT_API_ROUTINE int ompt_get_task_info(int ancestor_level, int *type,
|
||||
ompt_frame_t **task_frame,
|
||||
ompt_data_t **parallel_data,
|
||||
int *thread_num) {
|
||||
if (!ompt_enabled.enabled)
|
||||
return 0;
|
||||
return __ompt_get_task_info_internal(ancestor_level, type, task_data,
|
||||
task_frame, parallel_data, thread_num);
|
||||
}
|
||||
@ -592,7 +581,7 @@ OMPT_API_ROUTINE int ompt_get_place_num(void) {
|
||||
#if !KMP_AFFINITY_SUPPORTED
|
||||
return -1;
|
||||
#else
|
||||
if (!ompt_enabled.enabled || __kmp_get_gtid() < 0)
|
||||
if (__kmp_get_gtid() < 0)
|
||||
return -1;
|
||||
|
||||
int gtid;
|
||||
@ -613,7 +602,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int place_nums_size,
|
||||
#if !KMP_AFFINITY_SUPPORTED
|
||||
return 0;
|
||||
#else
|
||||
if (!ompt_enabled.enabled || __kmp_get_gtid() < 0)
|
||||
if (__kmp_get_gtid() < 0)
|
||||
return 0;
|
||||
|
||||
int i, gtid, place_num, first_place, last_place, start, end;
|
||||
@ -648,7 +637,7 @@ OMPT_API_ROUTINE int ompt_get_partition_place_nums(int place_nums_size,
|
||||
****************************************************************************/
|
||||
|
||||
OMPT_API_ROUTINE int ompt_get_proc_id(void) {
|
||||
if (!ompt_enabled.enabled || __kmp_get_gtid() < 0)
|
||||
if (__kmp_get_gtid() < 0)
|
||||
return -1;
|
||||
#if KMP_OS_LINUX
|
||||
return sched_getcpu();
|
||||
|
Loading…
Reference in New Issue
Block a user