[Openmp-commits] [openmp] r317636 - Cleanup version symbol macros and attributes/declspecs
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Tue Nov 7 15:32:14 PST 2017
Author: jlpeyton
Date: Tue Nov 7 15:32:13 2017
New Revision: 317636
URL: http://llvm.org/viewvc/llvm-project?rev=317636&view=rev
Log:
Cleanup version symbol macros and attributes/declspecs
1) Get rid of xaliasify, xexpand and xversionify for KMP_EXPAND_NAME and
KMP_VERSION_SYMBOL. KMP_VERSION_SYMBOL is a combination of xaliasify and
xversionify.
2) Put all attribute and __declspec definitions in kmp_os.h
Differential Revision: https://reviews.llvm.org/D39516
Modified:
openmp/trunk/CREDITS.txt
openmp/trunk/runtime/src/kmp.h
openmp/trunk/runtime/src/kmp_ftn_entry.h
openmp/trunk/runtime/src/kmp_ftn_os.h
openmp/trunk/runtime/src/kmp_global.cpp
openmp/trunk/runtime/src/kmp_gsupport.cpp
openmp/trunk/runtime/src/kmp_os.h
openmp/trunk/runtime/src/kmp_stats.h
openmp/trunk/runtime/src/ompt-general.cpp
openmp/trunk/runtime/src/ompt-specific.cpp
openmp/trunk/runtime/src/z_Linux_util.cpp
Modified: openmp/trunk/CREDITS.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/CREDITS.txt?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/CREDITS.txt (original)
+++ openmp/trunk/CREDITS.txt Tue Nov 7 15:32:13 2017
@@ -8,6 +8,10 @@ beautification by scripts. The fields a
(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
(S).
+N: Adam Azarchs
+W: 10xgenomics.com
+D: Bug fix for lock code
+
N: Carlo Bertolli
W: http://ibm.com
D: IBM contributor to PowerPC support in CMake files and elsewhere.
Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Tue Nov 7 15:32:13 2017
@@ -2896,13 +2896,7 @@ extern int __kmp_gtid_mode; /* Method of
extern int
__kmp_adjust_gtid_mode; /* If true, adjust method based on #threads */
#ifdef KMP_TDATA_GTID
-#if KMP_OS_WINDOWS
-extern __declspec(
- thread) int __kmp_gtid; /* This thread's gtid, if __kmp_gtid_mode == 3 */
-#else
-extern __thread int __kmp_gtid;
-#endif /* KMP_OS_WINDOWS - workaround because Intel(R) Many Integrated Core \
- compiler 20110316 doesn't accept __declspec */
+extern KMP_THREAD_LOCAL int __kmp_gtid;
#endif
extern int __kmp_tls_gtid_min; /* #threads below which use sp search for gtid */
extern int __kmp_foreign_tp; // If true, separate TP var for each foreign thread
Modified: openmp/trunk/runtime/src/kmp_ftn_entry.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_ftn_entry.h?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_ftn_entry.h (original)
+++ openmp/trunk/runtime/src/kmp_ftn_entry.h Tue Nov 7 15:32:13 2017
@@ -309,7 +309,7 @@ int FTN_STDCALL FTN_GET_AFFINITY_MASK_PR
/* ------------------------------------------------------------------------ */
/* sets the requested number of threads for the next parallel region */
-void FTN_STDCALL xexpand(FTN_SET_NUM_THREADS)(int KMP_DEREF arg) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_NUM_THREADS)(int KMP_DEREF arg) {
#ifdef KMP_STUB
// Nothing.
#else
@@ -318,7 +318,7 @@ void FTN_STDCALL xexpand(FTN_SET_NUM_THR
}
/* returns the number of threads in current team */
-int FTN_STDCALL xexpand(FTN_GET_NUM_THREADS)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_THREADS)(void) {
#ifdef KMP_STUB
return 1;
#else
@@ -327,7 +327,7 @@ int FTN_STDCALL xexpand(FTN_GET_NUM_THRE
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_MAX_THREADS)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_THREADS)(void) {
#ifdef KMP_STUB
return 1;
#else
@@ -364,7 +364,7 @@ int FTN_STDCALL FTN_CONTROL_TOOL(uint64_
}
#endif
-int FTN_STDCALL xexpand(FTN_GET_THREAD_NUM)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_THREAD_NUM)(void) {
#ifdef KMP_STUB
return 0;
#else
@@ -419,7 +419,7 @@ int FTN_STDCALL FTN_GET_NUM_KNOWN_THREAD
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_NUM_PROCS)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_PROCS)(void) {
#ifdef KMP_STUB
return 1;
#else
@@ -430,7 +430,7 @@ int FTN_STDCALL xexpand(FTN_GET_NUM_PROC
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_NESTED)(int KMP_DEREF flag) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_NESTED)(int KMP_DEREF flag) {
#ifdef KMP_STUB
__kmps_set_nested(KMP_DEREF flag);
#else
@@ -442,7 +442,7 @@ void FTN_STDCALL xexpand(FTN_SET_NESTED)
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_NESTED)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NESTED)(void) {
#ifdef KMP_STUB
return __kmps_get_nested();
#else
@@ -452,7 +452,7 @@ int FTN_STDCALL xexpand(FTN_GET_NESTED)(
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_DYNAMIC)(int KMP_DEREF flag) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_DYNAMIC)(int KMP_DEREF flag) {
#ifdef KMP_STUB
__kmps_set_dynamic(KMP_DEREF flag ? TRUE : FALSE);
#else
@@ -465,7 +465,7 @@ void FTN_STDCALL xexpand(FTN_SET_DYNAMIC
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_DYNAMIC)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_DYNAMIC)(void) {
#ifdef KMP_STUB
return __kmps_get_dynamic();
#else
@@ -475,7 +475,7 @@ int FTN_STDCALL xexpand(FTN_GET_DYNAMIC)
#endif
}
-int FTN_STDCALL xexpand(FTN_IN_PARALLEL)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_PARALLEL)(void) {
#ifdef KMP_STUB
return 0;
#else
@@ -493,8 +493,8 @@ int FTN_STDCALL xexpand(FTN_IN_PARALLEL)
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_SCHEDULE)(kmp_sched_t KMP_DEREF kind,
- int KMP_DEREF modifier) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_SCHEDULE)(kmp_sched_t KMP_DEREF kind,
+ int KMP_DEREF modifier) {
#ifdef KMP_STUB
__kmps_set_schedule(KMP_DEREF kind, KMP_DEREF modifier);
#else
@@ -503,7 +503,8 @@ void FTN_STDCALL xexpand(FTN_SET_SCHEDUL
#endif
}
-void FTN_STDCALL xexpand(FTN_GET_SCHEDULE)(kmp_sched_t *kind, int *modifier) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_SCHEDULE)(kmp_sched_t *kind,
+ int *modifier) {
#ifdef KMP_STUB
__kmps_get_schedule(kind, modifier);
#else
@@ -512,7 +513,7 @@ void FTN_STDCALL xexpand(FTN_GET_SCHEDUL
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_MAX_ACTIVE_LEVELS)(int KMP_DEREF arg) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_MAX_ACTIVE_LEVELS)(int KMP_DEREF arg) {
#ifdef KMP_STUB
// Nothing.
#else
@@ -521,7 +522,7 @@ void FTN_STDCALL xexpand(FTN_SET_MAX_ACT
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_MAX_ACTIVE_LEVELS)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_ACTIVE_LEVELS)(void) {
#ifdef KMP_STUB
return 0;
#else
@@ -530,7 +531,7 @@ int FTN_STDCALL xexpand(FTN_GET_MAX_ACTI
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_ACTIVE_LEVEL)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_ACTIVE_LEVEL)(void) {
#ifdef KMP_STUB
return 0; // returns 0 if it is called from the sequential part of the program
#else
@@ -539,7 +540,7 @@ int FTN_STDCALL xexpand(FTN_GET_ACTIVE_L
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_LEVEL)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_LEVEL)(void) {
#ifdef KMP_STUB
return 0; // returns 0 if it is called from the sequential part of the program
#else
@@ -548,7 +549,8 @@ int FTN_STDCALL xexpand(FTN_GET_LEVEL)(v
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_ANCESTOR_THREAD_NUM)(int KMP_DEREF level) {
+int FTN_STDCALL
+ KMP_EXPAND_NAME(FTN_GET_ANCESTOR_THREAD_NUM)(int KMP_DEREF level) {
#ifdef KMP_STUB
return (KMP_DEREF level) ? (-1) : (0);
#else
@@ -556,7 +558,7 @@ int FTN_STDCALL xexpand(FTN_GET_ANCESTOR
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_TEAM_SIZE)(int KMP_DEREF level) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_TEAM_SIZE)(int KMP_DEREF level) {
#ifdef KMP_STUB
return (KMP_DEREF level) ? (-1) : (1);
#else
@@ -564,7 +566,7 @@ int FTN_STDCALL xexpand(FTN_GET_TEAM_SIZ
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_THREAD_LIMIT)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_THREAD_LIMIT)(void) {
#ifdef KMP_STUB
return 1; // TO DO: clarify whether it returns 1 or 0?
#else
@@ -576,7 +578,7 @@ int FTN_STDCALL xexpand(FTN_GET_THREAD_L
#endif
}
-int FTN_STDCALL xexpand(FTN_IN_FINAL)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_FINAL)(void) {
#ifdef KMP_STUB
return 0; // TO DO: clarify whether it returns 1 or 0?
#else
@@ -589,7 +591,7 @@ int FTN_STDCALL xexpand(FTN_IN_FINAL)(vo
#if OMP_40_ENABLED
-kmp_proc_bind_t FTN_STDCALL xexpand(FTN_GET_PROC_BIND)(void) {
+kmp_proc_bind_t FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_PROC_BIND)(void) {
#ifdef KMP_STUB
return __kmps_get_proc_bind();
#else
@@ -735,7 +737,7 @@ void FTN_STDCALL FTN_GET_PARTITION_PLACE
}
#endif
-int FTN_STDCALL xexpand(FTN_GET_NUM_TEAMS)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_TEAMS)(void) {
#ifdef KMP_STUB
return 1;
#else
@@ -770,7 +772,7 @@ int FTN_STDCALL xexpand(FTN_GET_NUM_TEAM
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_TEAM_NUM)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_TEAM_NUM)(void) {
#ifdef KMP_STUB
return 0;
#else
@@ -805,7 +807,7 @@ int FTN_STDCALL xexpand(FTN_GET_TEAM_NUM
#endif
}
-int FTN_STDCALL xexpand(FTN_GET_DEFAULT_DEVICE)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_DEFAULT_DEVICE)(void) {
#if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB)
return 0;
#else
@@ -813,7 +815,7 @@ int FTN_STDCALL xexpand(FTN_GET_DEFAULT_
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_DEFAULT_DEVICE)(int KMP_DEREF arg) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_DEFAULT_DEVICE)(int KMP_DEREF arg) {
#if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB)
// Nothing.
#else
@@ -830,15 +832,15 @@ int FTN_STDCALL FTN_GET_NUM_DEVICES(void
#if !KMP_OS_LINUX
-int FTN_STDCALL xexpand(FTN_IS_INITIAL_DEVICE)(void) { return 1; }
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_IS_INITIAL_DEVICE)(void) { return 1; }
#else
// This internal function is used when the entry from the offload library
// is not found.
-int _Offload_get_device_number(void) __attribute__((weak));
+int _Offload_get_device_number(void) KMP_WEAK_ATTRIBUTE;
-int FTN_STDCALL xexpand(FTN_IS_INITIAL_DEVICE)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_IS_INITIAL_DEVICE)(void) {
if (_Offload_get_device_number) {
return _Offload_get_device_number() == -1;
} else {
@@ -920,7 +922,7 @@ void FTN_STDCALL FTN_INIT_NEST_LOCK_WITH
#endif
/* initialize the lock */
-void FTN_STDCALL xexpand(FTN_INIT_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_INIT_LOCK)(void **user_lock) {
#ifdef KMP_STUB
*((kmp_stub_lock_t *)user_lock) = UNLOCKED;
#else
@@ -933,7 +935,7 @@ void FTN_STDCALL xexpand(FTN_INIT_LOCK)(
}
/* initialize the lock */
-void FTN_STDCALL xexpand(FTN_INIT_NEST_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_INIT_NEST_LOCK)(void **user_lock) {
#ifdef KMP_STUB
*((kmp_stub_lock_t *)user_lock) = UNLOCKED;
#else
@@ -945,7 +947,7 @@ void FTN_STDCALL xexpand(FTN_INIT_NEST_L
#endif
}
-void FTN_STDCALL xexpand(FTN_DESTROY_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_DESTROY_LOCK)(void **user_lock) {
#ifdef KMP_STUB
*((kmp_stub_lock_t *)user_lock) = UNINIT;
#else
@@ -957,7 +959,7 @@ void FTN_STDCALL xexpand(FTN_DESTROY_LOC
#endif
}
-void FTN_STDCALL xexpand(FTN_DESTROY_NEST_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_DESTROY_NEST_LOCK)(void **user_lock) {
#ifdef KMP_STUB
*((kmp_stub_lock_t *)user_lock) = UNINIT;
#else
@@ -969,7 +971,7 @@ void FTN_STDCALL xexpand(FTN_DESTROY_NES
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_LOCK)(void **user_lock) {
#ifdef KMP_STUB
if (*((kmp_stub_lock_t *)user_lock) == UNINIT) {
// TODO: Issue an error.
@@ -987,7 +989,7 @@ void FTN_STDCALL xexpand(FTN_SET_LOCK)(v
#endif
}
-void FTN_STDCALL xexpand(FTN_SET_NEST_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_SET_NEST_LOCK)(void **user_lock) {
#ifdef KMP_STUB
if (*((kmp_stub_lock_t *)user_lock) == UNINIT) {
// TODO: Issue an error.
@@ -1002,7 +1004,7 @@ void FTN_STDCALL xexpand(FTN_SET_NEST_LO
#endif
}
-void FTN_STDCALL xexpand(FTN_UNSET_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_UNSET_LOCK)(void **user_lock) {
#ifdef KMP_STUB
if (*((kmp_stub_lock_t *)user_lock) == UNINIT) {
// TODO: Issue an error.
@@ -1020,7 +1022,7 @@ void FTN_STDCALL xexpand(FTN_UNSET_LOCK)
#endif
}
-void FTN_STDCALL xexpand(FTN_UNSET_NEST_LOCK)(void **user_lock) {
+void FTN_STDCALL KMP_EXPAND_NAME(FTN_UNSET_NEST_LOCK)(void **user_lock) {
#ifdef KMP_STUB
if (*((kmp_stub_lock_t *)user_lock) == UNINIT) {
// TODO: Issue an error.
@@ -1038,7 +1040,7 @@ void FTN_STDCALL xexpand(FTN_UNSET_NEST_
#endif
}
-int FTN_STDCALL xexpand(FTN_TEST_LOCK)(void **user_lock) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_TEST_LOCK)(void **user_lock) {
#ifdef KMP_STUB
if (*((kmp_stub_lock_t *)user_lock) == UNINIT) {
// TODO: Issue an error.
@@ -1057,7 +1059,7 @@ int FTN_STDCALL xexpand(FTN_TEST_LOCK)(v
#endif
}
-int FTN_STDCALL xexpand(FTN_TEST_NEST_LOCK)(void **user_lock) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_TEST_NEST_LOCK)(void **user_lock) {
#ifdef KMP_STUB
if (*((kmp_stub_lock_t *)user_lock) == UNINIT) {
// TODO: Issue an error.
@@ -1072,7 +1074,7 @@ int FTN_STDCALL xexpand(FTN_TEST_NEST_LO
#endif
}
-double FTN_STDCALL xexpand(FTN_GET_WTIME)(void) {
+double FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_WTIME)(void) {
#ifdef KMP_STUB
return __kmps_get_wtime();
#else
@@ -1089,7 +1091,7 @@ double FTN_STDCALL xexpand(FTN_GET_WTIME
#endif
}
-double FTN_STDCALL xexpand(FTN_GET_WTICK)(void) {
+double FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_WTICK)(void) {
#ifdef KMP_STUB
return __kmps_get_wtick();
#else
@@ -1160,7 +1162,7 @@ void FTN_STDCALL FTN_SET_DEFAULTS(char c
#if OMP_40_ENABLED
/* returns the status of cancellation */
-int FTN_STDCALL xexpand(FTN_GET_CANCELLATION)(void) {
+int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_CANCELLATION)(void) {
#ifdef KMP_STUB
return 0 /* false */;
#else
@@ -1199,8 +1201,9 @@ int FTN_STDCALL FTN_GET_MAX_TASK_PRIORIT
// GCC compatibility (versioned symbols)
#ifdef KMP_USE_VERSION_SYMBOLS
-/* These following sections create function aliases (dummy symbols) for the
- omp_* routines. These aliases will then be versioned according to how
+/* These following sections create versioned symbols for the
+ omp_* routines. The KMP_VERSION_SYMBOL macro expands the API name and
+ then maps it to a versioned symbol.
libgomp ``versions'' its symbols (OMP_1.0, OMP_2.0, OMP_3.0, ...) while also
retaining the default version which libomp uses: VERSION (defined in
exports_so.txt). If you want to see the versioned symbols for libgomp.so.1
@@ -1217,136 +1220,67 @@ int FTN_STDCALL FTN_GET_MAX_TASK_PRIORIT
omp_set_num_threads@@VERSION
*/
-// OMP_1.0 aliases
-xaliasify(FTN_SET_NUM_THREADS, 10);
-xaliasify(FTN_GET_NUM_THREADS, 10);
-xaliasify(FTN_GET_MAX_THREADS, 10);
-xaliasify(FTN_GET_THREAD_NUM, 10);
-xaliasify(FTN_GET_NUM_PROCS, 10);
-xaliasify(FTN_IN_PARALLEL, 10);
-xaliasify(FTN_SET_DYNAMIC, 10);
-xaliasify(FTN_GET_DYNAMIC, 10);
-xaliasify(FTN_SET_NESTED, 10);
-xaliasify(FTN_GET_NESTED, 10);
-xaliasify(FTN_INIT_LOCK, 10);
-xaliasify(FTN_INIT_NEST_LOCK, 10);
-xaliasify(FTN_DESTROY_LOCK, 10);
-xaliasify(FTN_DESTROY_NEST_LOCK, 10);
-xaliasify(FTN_SET_LOCK, 10);
-xaliasify(FTN_SET_NEST_LOCK, 10);
-xaliasify(FTN_UNSET_LOCK, 10);
-xaliasify(FTN_UNSET_NEST_LOCK, 10);
-xaliasify(FTN_TEST_LOCK, 10);
-xaliasify(FTN_TEST_NEST_LOCK, 10);
-
-// OMP_2.0 aliases
-xaliasify(FTN_GET_WTICK, 20);
-xaliasify(FTN_GET_WTIME, 20);
-
-// OMP_3.0 aliases
-xaliasify(FTN_SET_SCHEDULE, 30);
-xaliasify(FTN_GET_SCHEDULE, 30);
-xaliasify(FTN_GET_THREAD_LIMIT, 30);
-xaliasify(FTN_SET_MAX_ACTIVE_LEVELS, 30);
-xaliasify(FTN_GET_MAX_ACTIVE_LEVELS, 30);
-xaliasify(FTN_GET_LEVEL, 30);
-xaliasify(FTN_GET_ANCESTOR_THREAD_NUM, 30);
-xaliasify(FTN_GET_TEAM_SIZE, 30);
-xaliasify(FTN_GET_ACTIVE_LEVEL, 30);
-xaliasify(FTN_INIT_LOCK, 30);
-xaliasify(FTN_INIT_NEST_LOCK, 30);
-xaliasify(FTN_DESTROY_LOCK, 30);
-xaliasify(FTN_DESTROY_NEST_LOCK, 30);
-xaliasify(FTN_SET_LOCK, 30);
-xaliasify(FTN_SET_NEST_LOCK, 30);
-xaliasify(FTN_UNSET_LOCK, 30);
-xaliasify(FTN_UNSET_NEST_LOCK, 30);
-xaliasify(FTN_TEST_LOCK, 30);
-xaliasify(FTN_TEST_NEST_LOCK, 30);
-
-// OMP_3.1 aliases
-xaliasify(FTN_IN_FINAL, 31);
-
-#if OMP_40_ENABLED
-// OMP_4.0 aliases
-xaliasify(FTN_GET_PROC_BIND, 40);
-xaliasify(FTN_GET_NUM_TEAMS, 40);
-xaliasify(FTN_GET_TEAM_NUM, 40);
-xaliasify(FTN_GET_CANCELLATION, 40);
-xaliasify(FTN_GET_DEFAULT_DEVICE, 40);
-xaliasify(FTN_SET_DEFAULT_DEVICE, 40);
-xaliasify(FTN_IS_INITIAL_DEVICE, 40);
-#endif /* OMP_40_ENABLED */
-
-#if OMP_45_ENABLED
-// OMP_4.5 aliases
-#endif
-
-#if OMP_50_ENABLED
-// OMP_5.0 aliases
-#endif
-
// OMP_1.0 versioned symbols
-xversionify(FTN_SET_NUM_THREADS, 10, "OMP_1.0");
-xversionify(FTN_GET_NUM_THREADS, 10, "OMP_1.0");
-xversionify(FTN_GET_MAX_THREADS, 10, "OMP_1.0");
-xversionify(FTN_GET_THREAD_NUM, 10, "OMP_1.0");
-xversionify(FTN_GET_NUM_PROCS, 10, "OMP_1.0");
-xversionify(FTN_IN_PARALLEL, 10, "OMP_1.0");
-xversionify(FTN_SET_DYNAMIC, 10, "OMP_1.0");
-xversionify(FTN_GET_DYNAMIC, 10, "OMP_1.0");
-xversionify(FTN_SET_NESTED, 10, "OMP_1.0");
-xversionify(FTN_GET_NESTED, 10, "OMP_1.0");
-xversionify(FTN_INIT_LOCK, 10, "OMP_1.0");
-xversionify(FTN_INIT_NEST_LOCK, 10, "OMP_1.0");
-xversionify(FTN_DESTROY_LOCK, 10, "OMP_1.0");
-xversionify(FTN_DESTROY_NEST_LOCK, 10, "OMP_1.0");
-xversionify(FTN_SET_LOCK, 10, "OMP_1.0");
-xversionify(FTN_SET_NEST_LOCK, 10, "OMP_1.0");
-xversionify(FTN_UNSET_LOCK, 10, "OMP_1.0");
-xversionify(FTN_UNSET_NEST_LOCK, 10, "OMP_1.0");
-xversionify(FTN_TEST_LOCK, 10, "OMP_1.0");
-xversionify(FTN_TEST_NEST_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_SET_NUM_THREADS, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_GET_NUM_THREADS, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_GET_MAX_THREADS, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_GET_THREAD_NUM, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_GET_NUM_PROCS, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_IN_PARALLEL, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_SET_DYNAMIC, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_GET_DYNAMIC, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_SET_NESTED, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_GET_NESTED, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_INIT_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_INIT_NEST_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_DESTROY_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_DESTROY_NEST_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_SET_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_SET_NEST_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_UNSET_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_UNSET_NEST_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_TEST_LOCK, 10, "OMP_1.0");
+KMP_VERSION_SYMBOL(FTN_TEST_NEST_LOCK, 10, "OMP_1.0");
// OMP_2.0 versioned symbols
-xversionify(FTN_GET_WTICK, 20, "OMP_2.0");
-xversionify(FTN_GET_WTIME, 20, "OMP_2.0");
+KMP_VERSION_SYMBOL(FTN_GET_WTICK, 20, "OMP_2.0");
+KMP_VERSION_SYMBOL(FTN_GET_WTIME, 20, "OMP_2.0");
// OMP_3.0 versioned symbols
-xversionify(FTN_SET_SCHEDULE, 30, "OMP_3.0");
-xversionify(FTN_GET_SCHEDULE, 30, "OMP_3.0");
-xversionify(FTN_GET_THREAD_LIMIT, 30, "OMP_3.0");
-xversionify(FTN_SET_MAX_ACTIVE_LEVELS, 30, "OMP_3.0");
-xversionify(FTN_GET_MAX_ACTIVE_LEVELS, 30, "OMP_3.0");
-xversionify(FTN_GET_ANCESTOR_THREAD_NUM, 30, "OMP_3.0");
-xversionify(FTN_GET_LEVEL, 30, "OMP_3.0");
-xversionify(FTN_GET_TEAM_SIZE, 30, "OMP_3.0");
-xversionify(FTN_GET_ACTIVE_LEVEL, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_SET_SCHEDULE, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_SCHEDULE, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_THREAD_LIMIT, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_SET_MAX_ACTIVE_LEVELS, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_MAX_ACTIVE_LEVELS, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_ANCESTOR_THREAD_NUM, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_LEVEL, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_TEAM_SIZE, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_GET_ACTIVE_LEVEL, 30, "OMP_3.0");
// the lock routines have a 1.0 and 3.0 version
-xversionify(FTN_INIT_LOCK, 30, "OMP_3.0");
-xversionify(FTN_INIT_NEST_LOCK, 30, "OMP_3.0");
-xversionify(FTN_DESTROY_LOCK, 30, "OMP_3.0");
-xversionify(FTN_DESTROY_NEST_LOCK, 30, "OMP_3.0");
-xversionify(FTN_SET_LOCK, 30, "OMP_3.0");
-xversionify(FTN_SET_NEST_LOCK, 30, "OMP_3.0");
-xversionify(FTN_UNSET_LOCK, 30, "OMP_3.0");
-xversionify(FTN_UNSET_NEST_LOCK, 30, "OMP_3.0");
-xversionify(FTN_TEST_LOCK, 30, "OMP_3.0");
-xversionify(FTN_TEST_NEST_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_INIT_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_INIT_NEST_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_DESTROY_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_DESTROY_NEST_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_SET_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_SET_NEST_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_UNSET_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_UNSET_NEST_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_TEST_LOCK, 30, "OMP_3.0");
+KMP_VERSION_SYMBOL(FTN_TEST_NEST_LOCK, 30, "OMP_3.0");
// OMP_3.1 versioned symbol
-xversionify(FTN_IN_FINAL, 31, "OMP_3.1");
+KMP_VERSION_SYMBOL(FTN_IN_FINAL, 31, "OMP_3.1");
#if OMP_40_ENABLED
// OMP_4.0 versioned symbols
-xversionify(FTN_GET_PROC_BIND, 40, "OMP_4.0");
-xversionify(FTN_GET_NUM_TEAMS, 40, "OMP_4.0");
-xversionify(FTN_GET_TEAM_NUM, 40, "OMP_4.0");
-xversionify(FTN_GET_CANCELLATION, 40, "OMP_4.0");
-xversionify(FTN_GET_DEFAULT_DEVICE, 40, "OMP_4.0");
-xversionify(FTN_SET_DEFAULT_DEVICE, 40, "OMP_4.0");
-xversionify(FTN_IS_INITIAL_DEVICE, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_GET_PROC_BIND, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_GET_NUM_TEAMS, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_GET_TEAM_NUM, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_GET_CANCELLATION, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_GET_DEFAULT_DEVICE, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_SET_DEFAULT_DEVICE, 40, "OMP_4.0");
+KMP_VERSION_SYMBOL(FTN_IS_INITIAL_DEVICE, 40, "OMP_4.0");
#endif /* OMP_40_ENABLED */
#if OMP_45_ENABLED
Modified: openmp/trunk/runtime/src/kmp_ftn_os.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_ftn_os.h?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_ftn_os.h (original)
+++ openmp/trunk/runtime/src/kmp_ftn_os.h Tue Nov 7 15:32:13 2017
@@ -613,43 +613,4 @@
#define KMP_API_NAME_GOMP_TARGET_UPDATE GOMP_target_update
#define KMP_API_NAME_GOMP_TEAMS GOMP_teams
-#ifdef KMP_USE_VERSION_SYMBOLS
-#define xstr(x) str(x)
-#define str(x) #x
-
-// If Linux, xexpand prepends __kmp_api_ to the real API name
-#define xexpand(api_name) expand(api_name)
-#define expand(api_name) __kmp_api_##api_name
-
-#define xaliasify(api_name, ver) aliasify(api_name, ver)
-#define aliasify(api_name, ver) \
- __typeof__(__kmp_api_##api_name) __kmp_api_##api_name##_##ver##_alias \
- __attribute__((alias(xstr(__kmp_api_##api_name))))
-
-#define xversionify(api_name, version_num, version_str) \
- versionify(api_name, version_num, version_str, "VERSION")
-#define versionify(api_name, version_num, version_str, default_ver) \
- __asm__( \
- ".symver " xstr(__kmp_api_##api_name##_##version_num##_alias) "," xstr( \
- api_name) "@" version_str "\n\t"); \
- __asm__(".symver " xstr(__kmp_api_##api_name) "," xstr( \
- api_name) "@@" default_ver "\n\t")
-
-#else // KMP_USE_VERSION_SYMBOLS
-#define xstr(x) /* Nothing */
-#define str(x) /* Nothing */
-
-// if Windows or Mac, xexpand does no name transformation
-#define xexpand(api_name) expand(api_name)
-#define expand(api_name) api_name
-
-#define xaliasify(api_name, ver) /* Nothing */
-#define aliasify(api_name, ver) /* Nothing */
-
-#define xversionify(api_name, version_num, version_str) /* Nothing */
-#define versionify(api_name, version_num, version_str, \
- default_ver) /* Nothing */
-
-#endif // KMP_USE_VERSION_SYMBOLS
-
#endif /* KMP_FTN_OS_H */
Modified: openmp/trunk/runtime/src/kmp_global.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_global.cpp?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_global.cpp (original)
+++ openmp/trunk/runtime/src/kmp_global.cpp Tue Nov 7 15:32:13 2017
@@ -30,7 +30,7 @@ kmp_tas_lock_t __kmp_stats_lock;
kmp_stats_list *__kmp_stats_list;
// thread local pointer to stats node within list
-__thread kmp_stats_list *__kmp_stats_thread_ptr = NULL;
+KMP_THREAD_LOCAL kmp_stats_list *__kmp_stats_thread_ptr = NULL;
// gives reference tick for all events (considered the 0 tick)
tsc_tick_count __kmp_stats_start_time;
@@ -182,12 +182,7 @@ int __kmp_gtid_mode = 0; /* select metho
int __kmp_adjust_gtid_mode = TRUE;
#endif /* KMP_OS_LINUX && defined(KMP_TDATA_GTID) */
#ifdef KMP_TDATA_GTID
-#if KMP_OS_WINDOWS
-__declspec(thread) int __kmp_gtid = KMP_GTID_DNE;
-#else
-__thread int __kmp_gtid = KMP_GTID_DNE;
-#endif /* KMP_OS_WINDOWS - workaround because Intel(R) Many Integrated Core \
- compiler 20110316 doesn't accept __declspec */
+KMP_THREAD_LOCAL int __kmp_gtid = KMP_GTID_DNE;
#endif /* KMP_TDATA_GTID */
int __kmp_tls_gtid_min = INT_MAX;
int __kmp_foreign_tp = TRUE;
Modified: openmp/trunk/runtime/src/kmp_gsupport.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_gsupport.cpp?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_gsupport.cpp (original)
+++ openmp/trunk/runtime/src/kmp_gsupport.cpp Tue Nov 7 15:32:13 2017
@@ -27,7 +27,7 @@ extern "C" {
#include "kmp_ftn_os.h"
-void xexpand(KMP_API_NAME_GOMP_BARRIER)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_BARRIER)(void) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_barrier");
KA_TRACE(20, ("GOMP_barrier: T#%d\n", gtid));
@@ -58,7 +58,7 @@ void xexpand(KMP_API_NAME_GOMP_BARRIER)(
// address.
extern kmp_critical_name *__kmp_unnamed_critical_addr;
-void xexpand(KMP_API_NAME_GOMP_CRITICAL_START)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CRITICAL_START)(void) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_critical_start");
KA_TRACE(20, ("GOMP_critical_start: T#%d\n", gtid));
@@ -68,7 +68,7 @@ void xexpand(KMP_API_NAME_GOMP_CRITICAL_
__kmpc_critical(&loc, gtid, __kmp_unnamed_critical_addr);
}
-void xexpand(KMP_API_NAME_GOMP_CRITICAL_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CRITICAL_END)(void) {
int gtid = __kmp_get_gtid();
MKLOC(loc, "GOMP_critical_end");
KA_TRACE(20, ("GOMP_critical_end: T#%d\n", gtid));
@@ -78,14 +78,14 @@ void xexpand(KMP_API_NAME_GOMP_CRITICAL_
__kmpc_end_critical(&loc, gtid, __kmp_unnamed_critical_addr);
}
-void xexpand(KMP_API_NAME_GOMP_CRITICAL_NAME_START)(void **pptr) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CRITICAL_NAME_START)(void **pptr) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_critical_name_start");
KA_TRACE(20, ("GOMP_critical_name_start: T#%d\n", gtid));
__kmpc_critical(&loc, gtid, (kmp_critical_name *)pptr);
}
-void xexpand(KMP_API_NAME_GOMP_CRITICAL_NAME_END)(void **pptr) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CRITICAL_NAME_END)(void **pptr) {
int gtid = __kmp_get_gtid();
MKLOC(loc, "GOMP_critical_name_end");
KA_TRACE(20, ("GOMP_critical_name_end: T#%d\n", gtid));
@@ -95,7 +95,7 @@ void xexpand(KMP_API_NAME_GOMP_CRITICAL_
// The Gnu codegen tries to use locked operations to perform atomic updates
// inline. If it can't, then it calls GOMP_atomic_start() before performing
// the update and GOMP_atomic_end() afterward, regardless of the data type.
-void xexpand(KMP_API_NAME_GOMP_ATOMIC_START)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_ATOMIC_START)(void) {
int gtid = __kmp_entry_gtid();
KA_TRACE(20, ("GOMP_atomic_start: T#%d\n", gtid));
@@ -106,13 +106,13 @@ void xexpand(KMP_API_NAME_GOMP_ATOMIC_ST
__kmp_acquire_atomic_lock(&__kmp_atomic_lock, gtid);
}
-void xexpand(KMP_API_NAME_GOMP_ATOMIC_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_ATOMIC_END)(void) {
int gtid = __kmp_get_gtid();
KA_TRACE(20, ("GOMP_atomic_start: T#%d\n", gtid));
__kmp_release_atomic_lock(&__kmp_atomic_lock, gtid);
}
-int xexpand(KMP_API_NAME_GOMP_SINGLE_START)(void) {
+int KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_START)(void) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_single_start");
KA_TRACE(20, ("GOMP_single_start: T#%d\n", gtid));
@@ -159,7 +159,7 @@ int xexpand(KMP_API_NAME_GOMP_SINGLE_STA
return rc;
}
-void *xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) {
+void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) {
void *retval;
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_single_copy_start");
@@ -204,7 +204,7 @@ void *xexpand(KMP_API_NAME_GOMP_SINGLE_C
return retval;
}
-void xexpand(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_COPY_END)(void *data) {
int gtid = __kmp_get_gtid();
KA_TRACE(20, ("GOMP_single_copy_end: T#%d\n", gtid));
@@ -235,7 +235,7 @@ void xexpand(KMP_API_NAME_GOMP_SINGLE_CO
#endif
}
-void xexpand(KMP_API_NAME_GOMP_ORDERED_START)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_ORDERED_START)(void) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_ordered_start");
KA_TRACE(20, ("GOMP_ordered_start: T#%d\n", gtid));
@@ -245,7 +245,7 @@ void xexpand(KMP_API_NAME_GOMP_ORDERED_S
__kmpc_ordered(&loc, gtid);
}
-void xexpand(KMP_API_NAME_GOMP_ORDERED_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_ORDERED_END)(void) {
int gtid = __kmp_get_gtid();
MKLOC(loc, "GOMP_ordered_end");
KA_TRACE(20, ("GOMP_ordered_start: T#%d\n", gtid));
@@ -419,8 +419,9 @@ static void __kmp_GOMP_serialized_parall
__kmp_serialized_parallel(loc, gtid);
}
-void xexpand(KMP_API_NAME_GOMP_PARALLEL_START)(void (*task)(void *), void *data,
- unsigned num_threads) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_START)(void (*task)(void *),
+ void *data,
+ unsigned num_threads) {
int gtid = __kmp_entry_gtid();
#if OMPT_SUPPORT
@@ -455,7 +456,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
#endif
}
-void xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)(void) {
int gtid = __kmp_get_gtid();
kmp_info_t *thr;
int ompt_team_size = __kmp_team_from_gtid(gtid)->t.t_nproc;
@@ -606,34 +607,37 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
return status; \
}
-LOOP_START(xexpand(KMP_API_NAME_GOMP_LOOP_STATIC_START), kmp_sch_static)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_STATIC_NEXT), {})
-LOOP_START(xexpand(KMP_API_NAME_GOMP_LOOP_DYNAMIC_START),
+LOOP_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_STATIC_START), kmp_sch_static)
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_STATIC_NEXT), {})
+LOOP_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_DYNAMIC_START),
kmp_sch_dynamic_chunked)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT), {})
-LOOP_START(xexpand(KMP_API_NAME_GOMP_LOOP_GUIDED_START), kmp_sch_guided_chunked)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT), {})
-LOOP_RUNTIME_START(xexpand(KMP_API_NAME_GOMP_LOOP_RUNTIME_START),
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT), {})
+LOOP_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_GUIDED_START),
+ kmp_sch_guided_chunked)
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT), {})
+LOOP_RUNTIME_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_RUNTIME_START),
kmp_sch_runtime)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT), {})
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT), {})
-LOOP_START(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START), kmp_ord_static)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT),
+LOOP_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START),
+ kmp_ord_static)
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT),
{ KMP_DISPATCH_FINI_CHUNK(&loc, gtid); })
-LOOP_START(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START),
+LOOP_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START),
kmp_ord_dynamic_chunked)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT),
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT),
{ KMP_DISPATCH_FINI_CHUNK(&loc, gtid); })
-LOOP_START(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START),
+LOOP_START(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START),
kmp_ord_guided_chunked)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT),
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT),
{ KMP_DISPATCH_FINI_CHUNK(&loc, gtid); })
-LOOP_RUNTIME_START(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START),
- kmp_ord_runtime)
-LOOP_NEXT(xexpand(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT),
+LOOP_RUNTIME_START(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START),
+ kmp_ord_runtime)
+LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT),
{ KMP_DISPATCH_FINI_CHUNK(&loc, gtid); })
-void xexpand(KMP_API_NAME_GOMP_LOOP_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_END)(void) {
int gtid = __kmp_get_gtid();
KA_TRACE(20, ("GOMP_loop_end: T#%d\n", gtid))
@@ -655,7 +659,7 @@ void xexpand(KMP_API_NAME_GOMP_LOOP_END)
KA_TRACE(20, ("GOMP_loop_end exit: T#%d\n", gtid))
}
-void xexpand(KMP_API_NAME_GOMP_LOOP_END_NOWAIT)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_END_NOWAIT)(void) {
KA_TRACE(20, ("GOMP_loop_end_nowait: T#%d\n", __kmp_get_gtid()))
}
@@ -760,33 +764,36 @@ void xexpand(KMP_API_NAME_GOMP_LOOP_END_
return status; \
}
-LOOP_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START), kmp_sch_static)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT), {})
-LOOP_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START),
+LOOP_START_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START),
+ kmp_sch_static)
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT), {})
+LOOP_START_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START),
kmp_sch_dynamic_chunked)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT), {})
-LOOP_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START),
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT), {})
+LOOP_START_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START),
kmp_sch_guided_chunked)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT), {})
-LOOP_RUNTIME_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START),
- kmp_sch_runtime)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT), {})
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT), {})
+LOOP_RUNTIME_START_ULL(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START), kmp_sch_runtime)
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT), {})
-LOOP_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START),
+LOOP_START_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START),
kmp_ord_static)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT),
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT),
{ KMP_DISPATCH_FINI_CHUNK_ULL(&loc, gtid); })
-LOOP_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START),
- kmp_ord_dynamic_chunked)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT),
+LOOP_START_ULL(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START),
+ kmp_ord_dynamic_chunked)
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT),
{ KMP_DISPATCH_FINI_CHUNK_ULL(&loc, gtid); })
-LOOP_START_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START),
+LOOP_START_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START),
kmp_ord_guided_chunked)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT),
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT),
{ KMP_DISPATCH_FINI_CHUNK_ULL(&loc, gtid); })
LOOP_RUNTIME_START_ULL(
- xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START), kmp_ord_runtime)
-LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT),
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START),
+ kmp_ord_runtime)
+LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT),
{ KMP_DISPATCH_FINI_CHUNK_ULL(&loc, gtid); })
// Combined parallel / loop worksharing constructs
@@ -848,26 +855,30 @@ LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_
#endif
-PARALLEL_LOOP_START(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START),
- kmp_sch_static, OMPT_LOOP_PRE, OMPT_LOOP_POST)
-PARALLEL_LOOP_START(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START),
- kmp_sch_dynamic_chunked, OMPT_LOOP_PRE, OMPT_LOOP_POST)
-PARALLEL_LOOP_START(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START),
- kmp_sch_guided_chunked, OMPT_LOOP_PRE, OMPT_LOOP_POST)
-PARALLEL_LOOP_START(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START),
- kmp_sch_runtime, OMPT_LOOP_PRE, OMPT_LOOP_POST)
+PARALLEL_LOOP_START(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START),
+ kmp_sch_static, OMPT_LOOP_PRE, OMPT_LOOP_POST)
+PARALLEL_LOOP_START(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START),
+ kmp_sch_dynamic_chunked, OMPT_LOOP_PRE, OMPT_LOOP_POST)
+PARALLEL_LOOP_START(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START),
+ kmp_sch_guided_chunked, OMPT_LOOP_PRE, OMPT_LOOP_POST)
+PARALLEL_LOOP_START(
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START),
+ kmp_sch_runtime, OMPT_LOOP_PRE, OMPT_LOOP_POST)
// Tasking constructs
-void xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
- void (*copy_func)(void *, void *),
- long arg_size, long arg_align,
- bool if_cond, unsigned gomp_flags
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data,
+ void (*copy_func)(void *, void *),
+ long arg_size, long arg_align,
+ bool if_cond, unsigned gomp_flags
#if OMP_40_ENABLED
- ,
- void **depend
+ ,
+ void **depend
#endif
- ) {
+ ) {
MKLOC(loc, "GOMP_task");
int gtid = __kmp_entry_gtid();
kmp_int32 flags = 0;
@@ -974,7 +985,7 @@ void xexpand(KMP_API_NAME_GOMP_TASK)(voi
KA_TRACE(20, ("GOMP_task exit: T#%d\n", gtid));
}
-void xexpand(KMP_API_NAME_GOMP_TASKWAIT)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKWAIT)(void) {
MKLOC(loc, "GOMP_taskwait");
int gtid = __kmp_entry_gtid();
@@ -999,7 +1010,7 @@ void xexpand(KMP_API_NAME_GOMP_TASKWAIT)
// There are no special entry points for ordered sections, so we always use
// the dynamically scheduled workshare, even if the sections aren't ordered.
-unsigned xexpand(KMP_API_NAME_GOMP_SECTIONS_START)(unsigned count) {
+unsigned KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SECTIONS_START)(unsigned count) {
int status;
kmp_int lb, ub, stride;
int gtid = __kmp_entry_gtid();
@@ -1022,7 +1033,7 @@ unsigned xexpand(KMP_API_NAME_GOMP_SECTI
return (unsigned)lb;
}
-unsigned xexpand(KMP_API_NAME_GOMP_SECTIONS_NEXT)(void) {
+unsigned KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SECTIONS_NEXT)(void) {
int status;
kmp_int lb, ub, stride;
int gtid = __kmp_get_gtid();
@@ -1043,10 +1054,8 @@ unsigned xexpand(KMP_API_NAME_GOMP_SECTI
return (unsigned)lb;
}
-void xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(void (*task)(void *),
- void *data,
- unsigned num_threads,
- unsigned count) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(
+ void (*task)(void *), void *data, unsigned num_threads, unsigned count) {
int gtid = __kmp_entry_gtid();
#if OMPT_SUPPORT
@@ -1085,7 +1094,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
KA_TRACE(20, ("GOMP_parallel_sections_start exit: T#%d\n", gtid));
}
-void xexpand(KMP_API_NAME_GOMP_SECTIONS_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SECTIONS_END)(void) {
int gtid = __kmp_get_gtid();
KA_TRACE(20, ("GOMP_sections_end: T#%d\n", gtid))
@@ -1107,21 +1116,22 @@ void xexpand(KMP_API_NAME_GOMP_SECTIONS_
KA_TRACE(20, ("GOMP_sections_end exit: T#%d\n", gtid))
}
-void xexpand(KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT)(void) {
KA_TRACE(20, ("GOMP_sections_end_nowait: T#%d\n", __kmp_get_gtid()))
}
// libgomp has an empty function for GOMP_taskyield as of 2013-10-10
-void xexpand(KMP_API_NAME_GOMP_TASKYIELD)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKYIELD)(void) {
KA_TRACE(20, ("GOMP_taskyield: T#%d\n", __kmp_get_gtid()))
return;
}
#if OMP_40_ENABLED // these are new GOMP_4.0 entry points
-void xexpand(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *), void *data,
- unsigned num_threads,
- unsigned int flags) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *),
+ void *data,
+ unsigned num_threads,
+ unsigned int flags) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_parallel");
KA_TRACE(20, ("GOMP_parallel: T#%d\n", gtid));
@@ -1159,7 +1169,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)
OMPT_STORE_RETURN_ADDRESS(gtid);
}
#endif
- xexpand(KMP_API_NAME_GOMP_PARALLEL_END)();
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)();
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
task_info->frame.exit_frame = NULL;
@@ -1168,11 +1178,11 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL)
#endif
}
-void xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS)(void (*task)(void *),
- void *data,
- unsigned num_threads,
- unsigned count,
- unsigned flags) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_SECTIONS)(void (*task)(void *),
+ void *data,
+ unsigned num_threads,
+ unsigned count,
+ unsigned flags) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_parallel_sections");
KA_TRACE(20, ("GOMP_parallel_sections: T#%d\n", gtid));
@@ -1199,7 +1209,7 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
KMP_DISPATCH_INIT(&loc, gtid, kmp_nm_dynamic_chunked, 1, count, 1, 1, TRUE);
task(data);
- xexpand(KMP_API_NAME_GOMP_PARALLEL_END)();
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)();
KA_TRACE(20, ("GOMP_parallel_sections exit: T#%d\n", gtid));
}
@@ -1233,22 +1243,22 @@ void xexpand(KMP_API_NAME_GOMP_PARALLEL_
(str > 0) ? (ub - 1) : (ub + 1), str, chunk_sz, \
(schedule) != kmp_sch_static); \
task(data); \
- xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(); \
+ KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)(); \
ompt_post(); \
\
KA_TRACE(20, (#func " exit: T#%d\n", gtid)); \
}
-PARALLEL_LOOP(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC), kmp_sch_static,
- OMPT_LOOP_PRE, OMPT_LOOP_POST)
-PARALLEL_LOOP(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC),
+PARALLEL_LOOP(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC),
+ kmp_sch_static, OMPT_LOOP_PRE, OMPT_LOOP_POST)
+PARALLEL_LOOP(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC),
kmp_sch_dynamic_chunked, OMPT_LOOP_PRE, OMPT_LOOP_POST)
-PARALLEL_LOOP(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED),
+PARALLEL_LOOP(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED),
kmp_sch_guided_chunked, OMPT_LOOP_PRE, OMPT_LOOP_POST)
-PARALLEL_LOOP(xexpand(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME), kmp_sch_runtime,
- OMPT_LOOP_PRE, OMPT_LOOP_POST)
+PARALLEL_LOOP(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME),
+ kmp_sch_runtime, OMPT_LOOP_PRE, OMPT_LOOP_POST)
-void xexpand(KMP_API_NAME_GOMP_TASKGROUP_START)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKGROUP_START)(void) {
int gtid = __kmp_entry_gtid();
MKLOC(loc, "GOMP_taskgroup_start");
KA_TRACE(20, ("GOMP_taskgroup_start: T#%d\n", gtid));
@@ -1263,7 +1273,7 @@ void xexpand(KMP_API_NAME_GOMP_TASKGROUP
return;
}
-void xexpand(KMP_API_NAME_GOMP_TASKGROUP_END)(void) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKGROUP_END)(void) {
int gtid = __kmp_get_gtid();
MKLOC(loc, "GOMP_taskgroup_end");
KA_TRACE(20, ("GOMP_taskgroup_end: T#%d\n", gtid));
@@ -1301,7 +1311,7 @@ static
return cncl_kind;
}
-bool xexpand(KMP_API_NAME_GOMP_CANCELLATION_POINT)(int which) {
+bool KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CANCELLATION_POINT)(int which) {
if (__kmp_omp_cancellation) {
KMP_FATAL(NoGompCancellation);
}
@@ -1314,7 +1324,7 @@ bool xexpand(KMP_API_NAME_GOMP_CANCELLAT
return __kmpc_cancellationpoint(&loc, gtid, cncl_kind);
}
-bool xexpand(KMP_API_NAME_GOMP_BARRIER_CANCEL)(void) {
+bool KMP_EXPAND_NAME(KMP_API_NAME_GOMP_BARRIER_CANCEL)(void) {
if (__kmp_omp_cancellation) {
KMP_FATAL(NoGompCancellation);
}
@@ -1326,7 +1336,7 @@ bool xexpand(KMP_API_NAME_GOMP_BARRIER_C
return __kmpc_cancel_barrier(&loc, gtid);
}
-bool xexpand(KMP_API_NAME_GOMP_CANCEL)(int which, bool do_cancel) {
+bool KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CANCEL)(int which, bool do_cancel) {
if (__kmp_omp_cancellation) {
KMP_FATAL(NoGompCancellation);
} else {
@@ -1340,13 +1350,13 @@ bool xexpand(KMP_API_NAME_GOMP_CANCEL)(i
kmp_int32 cncl_kind = __kmp_gomp_to_omp_cancellation_kind(which);
if (do_cancel == FALSE) {
- return xexpand(KMP_API_NAME_GOMP_CANCELLATION_POINT)(which);
+ return KMP_EXPAND_NAME(KMP_API_NAME_GOMP_CANCELLATION_POINT)(which);
} else {
return __kmpc_cancel(&loc, gtid, cncl_kind);
}
}
-bool xexpand(KMP_API_NAME_GOMP_SECTIONS_END_CANCEL)(void) {
+bool KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SECTIONS_END_CANCEL)(void) {
if (__kmp_omp_cancellation) {
KMP_FATAL(NoGompCancellation);
}
@@ -1357,7 +1367,7 @@ bool xexpand(KMP_API_NAME_GOMP_SECTIONS_
return __kmpc_cancel_barrier(&loc, gtid);
}
-bool xexpand(KMP_API_NAME_GOMP_LOOP_END_CANCEL)(void) {
+bool KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_END_CANCEL)(void) {
if (__kmp_omp_cancellation) {
KMP_FATAL(NoGompCancellation);
}
@@ -1369,219 +1379,140 @@ bool xexpand(KMP_API_NAME_GOMP_LOOP_END_
}
// All target functions are empty as of 2014-05-29
-void xexpand(KMP_API_NAME_GOMP_TARGET)(int device, void (*fn)(void *),
- const void *openmp_target, size_t mapnum,
- void **hostaddrs, size_t *sizes,
- unsigned char *kinds) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TARGET)(int device, void (*fn)(void *),
+ const void *openmp_target,
+ size_t mapnum, void **hostaddrs,
+ size_t *sizes,
+ unsigned char *kinds) {
return;
}
-void xexpand(KMP_API_NAME_GOMP_TARGET_DATA)(int device,
- const void *openmp_target,
- size_t mapnum, void **hostaddrs,
- size_t *sizes,
- unsigned char *kinds) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TARGET_DATA)(
+ int device, const void *openmp_target, size_t mapnum, void **hostaddrs,
+ size_t *sizes, unsigned char *kinds) {
return;
}
-void xexpand(KMP_API_NAME_GOMP_TARGET_END_DATA)(void) { return; }
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TARGET_END_DATA)(void) { return; }
-void xexpand(KMP_API_NAME_GOMP_TARGET_UPDATE)(int device,
- const void *openmp_target,
- size_t mapnum, void **hostaddrs,
- size_t *sizes,
- unsigned char *kinds) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TARGET_UPDATE)(
+ int device, const void *openmp_target, size_t mapnum, void **hostaddrs,
+ size_t *sizes, unsigned char *kinds) {
return;
}
-void xexpand(KMP_API_NAME_GOMP_TEAMS)(unsigned int num_teams,
- unsigned int thread_limit) {
+void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TEAMS)(unsigned int num_teams,
+ unsigned int thread_limit) {
return;
}
#endif // OMP_40_ENABLED
/* The following sections of code create aliases for the GOMP_* functions, then
create versioned symbols using the assembler directive .symver. This is only
- pertinent for ELF .so library xaliasify and xversionify are defined in
- kmp_ftn_os.h */
+ pertinent for ELF .so library. The KMP_VERSION_SYMBOL macro is defined in
+ kmp_os.h */
#ifdef KMP_USE_VERSION_SYMBOLS
-
-// GOMP_1.0 aliases
-xaliasify(KMP_API_NAME_GOMP_ATOMIC_END, 10);
-xaliasify(KMP_API_NAME_GOMP_ATOMIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_BARRIER, 10);
-xaliasify(KMP_API_NAME_GOMP_CRITICAL_END, 10);
-xaliasify(KMP_API_NAME_GOMP_CRITICAL_NAME_END, 10);
-xaliasify(KMP_API_NAME_GOMP_CRITICAL_NAME_START, 10);
-xaliasify(KMP_API_NAME_GOMP_CRITICAL_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_DYNAMIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_END, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_END_NOWAIT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_GUIDED_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_RUNTIME_START, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_STATIC_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_LOOP_STATIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_ORDERED_END, 10);
-xaliasify(KMP_API_NAME_GOMP_ORDERED_START, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_END, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START, 10);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_START, 10);
-xaliasify(KMP_API_NAME_GOMP_SECTIONS_END, 10);
-xaliasify(KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT, 10);
-xaliasify(KMP_API_NAME_GOMP_SECTIONS_NEXT, 10);
-xaliasify(KMP_API_NAME_GOMP_SECTIONS_START, 10);
-xaliasify(KMP_API_NAME_GOMP_SINGLE_COPY_END, 10);
-xaliasify(KMP_API_NAME_GOMP_SINGLE_COPY_START, 10);
-xaliasify(KMP_API_NAME_GOMP_SINGLE_START, 10);
-
-// GOMP_2.0 aliases
-xaliasify(KMP_API_NAME_GOMP_TASK, 20);
-xaliasify(KMP_API_NAME_GOMP_TASKWAIT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT, 20);
-xaliasify(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START, 20);
-
-// GOMP_3.0 aliases
-xaliasify(KMP_API_NAME_GOMP_TASKYIELD, 30);
-
-// GOMP_4.0 aliases
-// The GOMP_parallel* entry points below aren't OpenMP 4.0 related.
-#if OMP_40_ENABLED
-xaliasify(KMP_API_NAME_GOMP_PARALLEL, 40);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_SECTIONS, 40);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC, 40);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED, 40);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME, 40);
-xaliasify(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC, 40);
-xaliasify(KMP_API_NAME_GOMP_TASKGROUP_START, 40);
-xaliasify(KMP_API_NAME_GOMP_TASKGROUP_END, 40);
-xaliasify(KMP_API_NAME_GOMP_BARRIER_CANCEL, 40);
-xaliasify(KMP_API_NAME_GOMP_CANCEL, 40);
-xaliasify(KMP_API_NAME_GOMP_CANCELLATION_POINT, 40);
-xaliasify(KMP_API_NAME_GOMP_LOOP_END_CANCEL, 40);
-xaliasify(KMP_API_NAME_GOMP_SECTIONS_END_CANCEL, 40);
-xaliasify(KMP_API_NAME_GOMP_TARGET, 40);
-xaliasify(KMP_API_NAME_GOMP_TARGET_DATA, 40);
-xaliasify(KMP_API_NAME_GOMP_TARGET_END_DATA, 40);
-xaliasify(KMP_API_NAME_GOMP_TARGET_UPDATE, 40);
-xaliasify(KMP_API_NAME_GOMP_TEAMS, 40);
-#endif
-
// GOMP_1.0 versioned symbols
-xversionify(KMP_API_NAME_GOMP_ATOMIC_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_ATOMIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_BARRIER, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_CRITICAL_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_CRITICAL_NAME_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_CRITICAL_NAME_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_CRITICAL_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_DYNAMIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_END_NOWAIT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_GUIDED_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_RUNTIME_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_STATIC_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_STATIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_ORDERED_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_ORDERED_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SECTIONS_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SECTIONS_NEXT, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SECTIONS_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SINGLE_COPY_END, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SINGLE_COPY_START, 10, "GOMP_1.0");
-xversionify(KMP_API_NAME_GOMP_SINGLE_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_ATOMIC_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_ATOMIC_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_BARRIER, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_CRITICAL_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_CRITICAL_NAME_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_CRITICAL_NAME_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_CRITICAL_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_DYNAMIC_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_END_NOWAIT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_GUIDED_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START, 10,
+ "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START, 10,
+ "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_RUNTIME_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_STATIC_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_STATIC_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_ORDERED_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_ORDERED_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START, 10,
+ "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START, 10,
+ "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START, 10,
+ "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START, 10,
+ "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SECTIONS_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SECTIONS_NEXT, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SECTIONS_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SINGLE_COPY_END, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SINGLE_COPY_START, 10, "GOMP_1.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SINGLE_START, 10, "GOMP_1.0");
// GOMP_2.0 versioned symbols
-xversionify(KMP_API_NAME_GOMP_TASK, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_TASKWAIT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT, 20, "GOMP_2.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASK, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKWAIT, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START, 20,
+ "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT, 20, "GOMP_2.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START, 20, "GOMP_2.0");
// GOMP_3.0 versioned symbols
-xversionify(KMP_API_NAME_GOMP_TASKYIELD, 30, "GOMP_3.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKYIELD, 30, "GOMP_3.0");
// GOMP_4.0 versioned symbols
#if OMP_40_ENABLED
-xversionify(KMP_API_NAME_GOMP_PARALLEL, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_SECTIONS, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TASKGROUP_START, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TASKGROUP_END, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_BARRIER_CANCEL, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_CANCEL, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_CANCELLATION_POINT, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_LOOP_END_CANCEL, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_SECTIONS_END_CANCEL, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TARGET, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TARGET_DATA, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TARGET_END_DATA, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TARGET_UPDATE, 40, "GOMP_4.0");
-xversionify(KMP_API_NAME_GOMP_TEAMS, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_SECTIONS, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKGROUP_START, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKGROUP_END, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_BARRIER_CANCEL, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_CANCEL, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_CANCELLATION_POINT, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_END_CANCEL, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_SECTIONS_END_CANCEL, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_DATA, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_END_DATA, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_UPDATE, 40, "GOMP_4.0");
+KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TEAMS, 40, "GOMP_4.0");
#endif
#endif // KMP_USE_VERSION_SYMBOLS
Modified: openmp/trunk/runtime/src/kmp_os.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_os.h?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_os.h (original)
+++ openmp/trunk/runtime/src/kmp_os.h Tue Nov 7 15:32:13 2017
@@ -278,20 +278,6 @@ extern "C" {
#define KMP_CACHE_PREFETCH(ADDR) /* nothing */
-/* Temporary note: if performance testing of this passes, we can remove
- all references to KMP_DO_ALIGN and replace with KMP_ALIGN. */
-#if KMP_OS_UNIX && defined(__GNUC__)
-#define KMP_DO_ALIGN(bytes) __attribute__((aligned(bytes)))
-#define KMP_ALIGN_CACHE __attribute__((aligned(CACHE_LINE)))
-#define KMP_ALIGN_CACHE_INTERNODE __attribute__((aligned(INTERNODE_CACHE_LINE)))
-#define KMP_ALIGN(bytes) __attribute__((aligned(bytes)))
-#else
-#define KMP_DO_ALIGN(bytes) __declspec(align(bytes))
-#define KMP_ALIGN_CACHE __declspec(align(CACHE_LINE))
-#define KMP_ALIGN_CACHE_INTERNODE __declspec(align(INTERNODE_CACHE_LINE))
-#define KMP_ALIGN(bytes) __declspec(align(bytes))
-#endif
-
// Define attribute that indicates a function does not return
#if __cplusplus >= 201103L
#define KMP_NORETURN [[noreturn]]
@@ -301,6 +287,51 @@ extern "C" {
#define KMP_NORETURN __attribute__((noreturn))
#endif
+#if KMP_OS_WINDOWS
+#define KMP_ALIGN(bytes) __declspec(align(bytes))
+#define KMP_THREAD_LOCAL __declspec(thread)
+#define KMP_ALIAS /* Nothing */
+#else
+#define KMP_ALIGN(bytes) __attribute__((aligned(bytes)))
+#define KMP_THREAD_LOCAL __thread
+#define KMP_ALIAS(alias_of) __attribute__((alias(alias_of)))
+#endif
+
+#if KMP_HAVE_WEAK_ATTRIBUTE
+#define KMP_WEAK_ATTRIBUTE __attribute__((weak))
+#else
+#define KMP_WEAK_ATTRIBUTE /* Nothing */
+#endif
+
+// Define KMP_VERSION_SYMBOL and KMP_EXPAND_NAME
+#ifdef KMP_USE_VERSION_SYMBOLS
+#define KMP_STR(x) _KMP_STR(x)
+#define _KMP_STR(x) #x
+// If using versioned symbols, KMP_EXPAND_NAME prepends
+// __kmp_api_ to the real API name
+#define KMP_EXPAND_NAME(api_name) _KMP_EXPAND_NAME(api_name)
+#define _KMP_EXPAND_NAME(api_name) __kmp_api_##api_name
+#define KMP_VERSION_SYMBOL(api_name, ver_num, ver_str) \
+ _KMP_VERSION_SYMBOL(api_name, ver_num, ver_str, "VERSION")
+#define _KMP_VERSION_SYMBOL(api_name, ver_num, ver_str, default_ver) \
+ __typeof__(__kmp_api_##api_name) __kmp_api_##api_name##_##ver_num##_alias \
+ __attribute__((alias(KMP_STR(__kmp_api_##api_name)))); \
+ __asm__( \
+ ".symver " KMP_STR(__kmp_api_##api_name##_##ver_num##_alias) "," KMP_STR( \
+ api_name) "@" ver_str "\n\t"); \
+ __asm__(".symver " KMP_STR(__kmp_api_##api_name) "," KMP_STR( \
+ api_name) "@@" default_ver "\n\t")
+#else // KMP_USE_VERSION_SYMBOLS
+#define KMP_EXPAND_NAME(api_name) api_name
+#define KMP_VERSION_SYMBOL(api_name, ver_num, ver_str) /* Nothing */
+#endif // KMP_USE_VERSION_SYMBOLS
+
+/* Temporary note: if performance testing of this passes, we can remove
+ all references to KMP_DO_ALIGN and replace with KMP_ALIGN. */
+#define KMP_DO_ALIGN(bytes) KMP_ALIGN(bytes)
+#define KMP_ALIGN_CACHE KMP_ALIGN(CACHE_LINE)
+#define KMP_ALIGN_CACHE_INTERNODE KMP_ALIGN(INTERNODE_CACHE_LINE)
+
/* General purpose fence types for memory operations */
enum kmp_mem_fence_type {
kmp_no_fence, /* No memory fence */
Modified: openmp/trunk/runtime/src/kmp_stats.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_stats.h?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_stats.h (original)
+++ openmp/trunk/runtime/src/kmp_stats.h Tue Nov 7 15:32:13 2017
@@ -588,7 +588,7 @@ public:
The nestLevel variable is for plotting events and is related
to the bar width in the timeline graph.
- Every thread will have a __thread local pointer to its node in
+ Every thread will have a thread local pointer to its node in
the list. The sentinel node is used by the master thread to
store "dummy" statistics before __kmp_create_worker() is called.
**************************************************************** */
@@ -744,7 +744,7 @@ void __kmp_reset_stats();
void __kmp_output_stats(const char *);
void __kmp_accumulate_stats_at_exit(void);
// thread local pointer to stats node within list
-extern __thread kmp_stats_list *__kmp_stats_thread_ptr;
+extern KMP_THREAD_LOCAL kmp_stats_list *__kmp_stats_thread_ptr;
// head to stats list.
extern kmp_stats_list *__kmp_stats_list;
// lock for __kmp_stats_list
Modified: openmp/trunk/runtime/src/ompt-general.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-general.cpp?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-general.cpp (original)
+++ openmp/trunk/runtime/src/ompt-general.cpp Tue Nov 7 15:32:13 2017
@@ -103,7 +103,7 @@ typedef ompt_start_tool_result_t *(*ompt
#if KMP_OS_UNIX
#if OMPT_HAVE_WEAK_ATTRIBUTE
-_OMP_EXTERN __attribute__((weak))
+_OMP_EXTERN OMPT_WEAK_ATTRIBUTE
#elif defined KMP_DYNAMIC_LIB
_OMP_EXTERN
#warning Activation of OMPT is might fail for tools statically linked into the application.
Modified: openmp/trunk/runtime/src/ompt-specific.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-specific.cpp?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-specific.cpp (original)
+++ openmp/trunk/runtime/src/ompt-specific.cpp Tue Nov 7 15:32:13 2017
@@ -15,6 +15,8 @@
#define THREAD_LOCAL __thread
#endif
+#define OMPT_WEAK_ATTRIBUTE KMP_WEAK_ATTRIBUTE
+
//******************************************************************************
// macros
//******************************************************************************
Modified: openmp/trunk/runtime/src/z_Linux_util.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Linux_util.cpp?rev=317636&r1=317635&r2=317636&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Linux_util.cpp (original)
+++ openmp/trunk/runtime/src/z_Linux_util.cpp Tue Nov 7 15:32:13 2017
@@ -508,7 +508,7 @@ static void *__kmp_launch_worker(void *t
__kmp_gtid = gtid;
#endif
#if KMP_STATS_ENABLED
- // set __thread local index to point to thread-specific stats
+ // set thread local index to point to thread-specific stats
__kmp_stats_thread_ptr = ((kmp_info_t *)thr)->th.th_stats;
KMP_START_EXPLICIT_TIMER(OMP_worker_thread_life);
KMP_SET_THREAD_STATE(IDLE);
@@ -778,7 +778,7 @@ void __kmp_create_worker(int gtid, kmp_i
// th->th.th_stats is used to transfer thread-specific stats-pointer to
// __kmp_launch_worker. So when thread is created (goes into
- // __kmp_launch_worker) it will set its __thread local pointer to
+ // __kmp_launch_worker) it will set its thread local pointer to
// th->th.th_stats
if (!KMP_UBER_GTID(gtid)) {
th->th.th_stats = __kmp_stats_list->push_back(gtid);
More information about the Openmp-commits
mailing list