Skip to content

Commit 158f5d0

Browse files
committed
[OpenMP] [NFC] Remove KMP_NESTED_HOT_TEAMS macro
The feature was introduced back in 2014 and has been on ever since.
1 parent ea0761f commit 158f5d0

File tree

5 files changed

+52
-126
lines changed

5 files changed

+52
-126
lines changed

openmp/runtime/src/kmp.h

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,6 @@ class kmp_stats_list;
169169
#define USE_FAST_MEMORY 3
170170
#endif
171171

172-
#ifndef KMP_NESTED_HOT_TEAMS
173-
#define KMP_NESTED_HOT_TEAMS 0
174-
#define USE_NESTED_HOT_ARG(x)
175-
#else
176-
#if KMP_NESTED_HOT_TEAMS
177-
#define USE_NESTED_HOT_ARG(x) , x
178-
#else
179-
#define USE_NESTED_HOT_ARG(x)
180-
#endif
181-
#endif
182-
183172
// Assume using BGET compare_exchange instruction instead of lock by default.
184173
#ifndef USE_CMP_XCHG_FOR_BGET
185174
#define USE_CMP_XCHG_FOR_BGET 1
@@ -2940,14 +2929,12 @@ typedef struct kmp_free_list {
29402929
// sync list)
29412930
} kmp_free_list_t;
29422931
#endif
2943-
#if KMP_NESTED_HOT_TEAMS
29442932
// Hot teams array keeps hot teams and their sizes for given thread. Hot teams
29452933
// are not put in teams pool, and they don't put threads in threads pool.
29462934
typedef struct kmp_hot_team_ptr {
29472935
kmp_team_p *hot_team; // pointer to hot_team of given nesting level
29482936
kmp_int32 hot_team_nth; // number of threads allocated for the hot_team
29492937
} kmp_hot_team_ptr_t;
2950-
#endif
29512938
typedef struct kmp_teams_size {
29522939
kmp_int32 nteams; // number of teams in a league
29532940
kmp_int32 nth; // number of threads in each team of the league
@@ -3022,9 +3009,7 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info {
30223009
int th_nt_sev; // error severity for strict modifier
30233010
const char *th_nt_msg; // error message for strict modifier
30243011
int th_set_nested_nth_sz;
3025-
#if KMP_NESTED_HOT_TEAMS
30263012
kmp_hot_team_ptr_t *th_hot_teams; /* array of hot teams */
3027-
#endif
30283013
kmp_proc_bind_t
30293014
th_set_proc_bind; /* if != proc_bind_default, use request for next fork */
30303015
kmp_teams_size_t
@@ -3580,10 +3565,8 @@ extern int __kmp_dflt_max_active_levels;
35803565
extern bool __kmp_dflt_max_active_levels_set;
35813566
extern int __kmp_dispatch_num_buffers; /* max possible dynamic loops in
35823567
concurrent execution per team */
3583-
#if KMP_NESTED_HOT_TEAMS
35843568
extern int __kmp_hot_teams_mode;
35853569
extern int __kmp_hot_teams_max_level;
3586-
#endif
35873570

35883571
#if KMP_MIC_SUPPORTED
35893572
extern enum mic_type __kmp_mic_type;
@@ -4067,16 +4050,16 @@ extern void __kmp_suspend_uninitialize_thread(kmp_info_t *th);
40674050

40684051
extern kmp_info_t *__kmp_allocate_thread(kmp_root_t *root, kmp_team_t *team,
40694052
int tid);
4070-
extern kmp_team_t *
4071-
__kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc,
4053+
extern kmp_team_t *__kmp_allocate_team(kmp_root_t *root, int new_nproc,
4054+
int max_nproc,
40724055
#if OMPT_SUPPORT
4073-
ompt_data_t ompt_parallel_data,
4056+
ompt_data_t ompt_parallel_data,
40744057
#endif
4075-
kmp_proc_bind_t proc_bind, kmp_internal_control_t *new_icvs,
4076-
int argc USE_NESTED_HOT_ARG(kmp_info_t *thr));
4058+
kmp_proc_bind_t proc_bind,
4059+
kmp_internal_control_t *new_icvs,
4060+
int argc, kmp_info_t *thr);
40774061
extern void __kmp_free_thread(kmp_info_t *);
4078-
extern void __kmp_free_team(kmp_root_t *,
4079-
kmp_team_t *USE_NESTED_HOT_ARG(kmp_info_t *));
4062+
extern void __kmp_free_team(kmp_root_t *, kmp_team_t *, kmp_info_t *);
40804063
extern kmp_team_t *__kmp_reap_team(kmp_team_t *);
40814064

40824065
/* ------------------------------------------------------------------------ */

openmp/runtime/src/kmp_config.h.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
# define BUILD_I8 1
115115
#endif
116116

117-
#define KMP_NESTED_HOT_TEAMS 1
118117
#define KMP_ADJUST_BLOCKTIME 1
119118
#define BUILD_PARALLEL_ORDERED 1
120119
#define KMP_ASM_INTRINS 1

openmp/runtime/src/kmp_global.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,9 @@ int __kmp_tp_cached = 0;
135135
int __kmp_dispatch_num_buffers = KMP_DFLT_DISP_NUM_BUFF;
136136
int __kmp_dflt_max_active_levels = 1; // Nesting off by default
137137
bool __kmp_dflt_max_active_levels_set = false; // Don't override set value
138-
#if KMP_NESTED_HOT_TEAMS
139138
int __kmp_hot_teams_mode = 0; /* 0 - free extra threads when reduced */
140139
/* 1 - keep extra threads when reduced */
141140
int __kmp_hot_teams_max_level = 1; /* nesting level of hot teams */
142-
#endif
143141
enum library_type __kmp_library = library_none;
144142
enum sched_type __kmp_sched =
145143
kmp_sch_default; /* scheduling method for runtime scheduling */

0 commit comments

Comments
 (0)