author | Norm Jacobs <Norm.Jacobs@Oracle.COM> |
Fri, 16 Sep 2016 23:33:54 -0500 | |
changeset 6923 | 338aea22bf22 |
parent 6624 | c6cfc48dd184 |
permissions | -rw-r--r-- |
6624
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
1 |
# Source code part of the Solaris port of libiomp5. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
2 |
# Internal patch. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
3 |
# We should definitely submit this upstream. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
4 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
5 |
--- src/kmp_global.c 2015-10-09 11:05:47.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
6 |
+++ src/kmp_global.c 2016-08-13 19:18:17.515623810 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
7 |
@@ -167,7 +167,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
8 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
9 |
int __kmp_chunk = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
10 |
int __kmp_abort_delay = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
11 |
-#if KMP_OS_LINUX && defined(KMP_TDATA_GTID) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
12 |
+#if ((KMP_OS_LINUX || KMP_OS_SOLARIS) && defined(KMP_TDATA_GTID)) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
13 |
int __kmp_gtid_mode = 3; /* use __declspec(thread) TLS to store gtid */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
14 |
int __kmp_adjust_gtid_mode = FALSE; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
15 |
#elif KMP_OS_WINDOWS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
16 |
@@ -176,7 +176,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
17 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
18 |
int __kmp_gtid_mode = 0; /* select method to get gtid based on #threads */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
19 |
int __kmp_adjust_gtid_mode = TRUE; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
20 |
-#endif /* KMP_OS_LINUX && defined(KMP_TDATA_GTID) */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
21 |
+#endif /* KMP_OS_LINUX || KMP_OS_SOLARIS && defined(KMP_TDATA_GTID) */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
22 |
#ifdef KMP_TDATA_GTID |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
23 |
#if KMP_OS_WINDOWS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
24 |
__declspec(thread) int __kmp_gtid = KMP_GTID_DNE; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
25 |
@@ -254,7 +254,6 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
26 |
int __kmp_affinity_gran_levels = -1; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
27 |
int __kmp_affinity_dups = TRUE; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
28 |
enum affinity_top_method __kmp_affinity_top_method = affinity_top_method_default; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
29 |
-int __kmp_affinity_compact = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
30 |
int __kmp_affinity_offset = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
31 |
int __kmp_affinity_verbose = FALSE; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
32 |
int __kmp_affinity_warnings = TRUE; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
33 |
@@ -267,6 +266,8 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
34 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
35 |
#endif /* KMP_AFFINITY_SUPPORTED */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
36 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
37 |
+int __kmp_affinity_compact = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
38 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
39 |
#if OMP_40_ENABLED |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
40 |
kmp_nested_proc_bind_t __kmp_nested_proc_bind = { NULL, 0, 0 }; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
41 |
int __kmp_affinity_num_places = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
42 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
43 |
--- src/kmp_csupport.c 2015-10-09 11:05:45.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
44 |
+++ src/kmp_csupport.c 2016-08-17 11:28:36.004655805 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
45 |
@@ -695,6 +695,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
46 |
// when running >2 threads per core (on the NAS LU benchmark). |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
47 |
__kmp_yield(TRUE); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
48 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
49 |
+ #elif (KMP_ARCH_SPARC || KMP_ARCH_SPARC32 || KMP_ARCH_SPARC64) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
50 |
+ // This is in GCC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
51 |
+ __sync_synchronize(); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
52 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
53 |
#error Unknown or unsupported architecture |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
54 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
55 |
@@ -2139,7 +2142,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
56 |
} else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
57 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
58 |
{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
59 |
- __kmp_direct_set[tag]((kmp_dyna_lock_t *)user_lock, gtid); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
60 |
+ if (__kmp_direct_set[tag] == NULL) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
61 |
+ __kmp_direct_set[tag] = __kmp_direct_set[0]; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
62 |
+ __kmp_direct_set[tag]((kmp_dyna_lock_t *)user_lock, gtid); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
63 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
64 |
# if USE_ITT_BUILD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
65 |
__kmp_itt_lock_acquired((kmp_user_lock_p)user_lock); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
66 |
@@ -2222,7 +2227,6 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
67 |
__kmpc_unset_lock( ident_t *loc, kmp_int32 gtid, void **user_lock ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
68 |
{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
69 |
#if KMP_USE_DYNAMIC_LOCK |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
70 |
- |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
71 |
int tag = KMP_EXTRACT_D_TAG(user_lock); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
72 |
# if USE_ITT_BUILD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
73 |
__kmp_itt_lock_releasing((kmp_user_lock_p)user_lock); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
74 |
@@ -2237,7 +2241,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
75 |
} else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
76 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
77 |
{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
78 |
- __kmp_direct_unset[tag]((kmp_dyna_lock_t *)user_lock, gtid); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
79 |
+ if (__kmp_direct_unset[tag] == NULL) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
80 |
+ __kmp_direct_unset[tag] = __kmp_direct_unset[0]; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
81 |
+ __kmp_direct_unset[tag]((kmp_dyna_lock_t *)user_lock, gtid); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
82 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
83 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
84 |
#else // KMP_USE_DYNAMIC_LOCK |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
85 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
86 |
--- src/kmp_runtime.c 2015-10-09 11:05:48.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
87 |
+++ src/kmp_runtime.c 2016-02-23 10:10:17.709606906 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
88 |
@@ -7574,7 +7574,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
89 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
90 |
#if KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
91 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
92 |
- #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
93 |
+ #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_SOLARIS || KMP_OS_WINDOWS || KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
94 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
95 |
int teamsize_cutoff = 4; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
96 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
97 |
@@ -7583,6 +7583,10 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
98 |
teamsize_cutoff = 8; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
99 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
100 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
101 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
102 |
+#if KMP_ARCH_X86_64 && KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
103 |
+ teamsize_cutoff = 8; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
104 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
105 |
if( tree_available ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
106 |
if( team_size <= teamsize_cutoff ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
107 |
if ( atomic_available ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
108 |
@@ -7596,11 +7600,11 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
109 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
110 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
111 |
#error "Unknown or unsupported OS" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
112 |
- #endif // KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS || KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
113 |
+ #endif // KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_SOLARIS || KMP_OS_WINDOWS || KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
114 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
115 |
- #elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
116 |
+#elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_SPARC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
117 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
118 |
- #if KMP_OS_LINUX || KMP_OS_WINDOWS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
119 |
+ #if KMP_OS_LINUX || KMP_OS_SOLARIS || KMP_OS_WINDOWS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
120 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
121 |
// basic tuning |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
122 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
123 |
--- src/kmp_environment.c 2015-10-09 11:05:46.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
124 |
+++ src/kmp_environment.c 2016-02-21 08:02:17.231202308 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
125 |
@@ -83,7 +83,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
126 |
#if KMP_OS_UNIX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
127 |
#include <stdlib.h> // getenv, setenv, unsetenv. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
128 |
#include <string.h> // strlen, strcpy. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
129 |
- #if KMP_OS_LINUX || KMP_OS_FREEBSD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
130 |
+ #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
131 |
extern char * * environ; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
132 |
#elif KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
133 |
#include <crt_externs.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
134 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
135 |
--- src/kmp_lock.cpp 2015-10-09 11:05:48.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
136 |
+++ src/kmp_lock.cpp 2016-08-12 17:20:30.072310090 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
137 |
@@ -106,6 +106,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
138 |
__forceinline static void |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
139 |
__kmp_acquire_tas_lock_timed_template( kmp_tas_lock_t *lck, kmp_int32 gtid ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
140 |
{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
141 |
+ kmp_uint32 nspins = 0U; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
142 |
+ kmp_uint32 max_spins = __kmp_yield_next * 2U; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
143 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
144 |
KMP_MB(); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
145 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
146 |
#ifdef USE_LOCK_PROFILE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
147 |
@@ -142,6 +145,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
148 |
KMP_YIELD( TRUE ); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
149 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
150 |
else { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
151 |
+ if (++nspins >= max_spins) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
152 |
+ break; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
153 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
154 |
KMP_YIELD_SPIN( spins ); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
155 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
156 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
157 |
@@ -3022,13 +3028,18 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
158 |
#if KMP_USE_TSX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
159 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
160 |
// HLE lock functions - imported from the testbed runtime. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
161 |
+#if (KMP_ARCH_SPARC32 || KMP_ARCH_SPARC64) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
162 |
+#define HLE_ACQUIRE ".word 0xf2;" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
163 |
+#define HLE_RELEASE ".word 0xf3;" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
164 |
+#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
165 |
#define HLE_ACQUIRE ".byte 0xf2;" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
166 |
#define HLE_RELEASE ".byte 0xf3;" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
167 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
168 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
169 |
static inline kmp_uint32 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
170 |
swap4(kmp_uint32 volatile *p, kmp_uint32 v) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
171 |
{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
172 |
- __asm__ volatile(HLE_ACQUIRE "xchg %1,%0" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
173 |
+ __asm__ __volatile__(HLE_ACQUIRE "xchg %1,%0" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
174 |
: "+r"(v), "+m"(*p) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
175 |
: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
176 |
: "memory"); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
177 |
@@ -3066,7 +3077,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
178 |
static int |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
179 |
__kmp_release_hle_lock(kmp_dyna_lock_t *lck, kmp_int32 gtid) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
180 |
{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
181 |
- __asm__ volatile(HLE_RELEASE "movl %1,%0" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
182 |
+ __asm__ __volatile__(HLE_RELEASE "movl %1,%0" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
183 |
: "=m"(*lck) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
184 |
: "r"(KMP_LOCK_FREE(hle)) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
185 |
: "memory"); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
186 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
187 |
--- src/kmp_lock.h 2015-10-09 11:05:48.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
188 |
+++ src/kmp_lock.h 2016-08-17 10:02:56.297567620 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
189 |
@@ -1195,7 +1195,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
190 |
#define KMP_INIT_D_LOCK(l, seq) __kmp_direct_init[KMP_GET_D_TAG(seq)]((kmp_dyna_lock_t *)l, seq) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
191 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
192 |
// Initializes an indirect lock with the given lock pointer and lock sequence. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
193 |
-#define KMP_INIT_I_LOCK(l, seq) __kmp_direct_init[0]((kmp_dyna_lock_t *)(l), seq) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
194 |
+#define KMP_INIT_I_LOCK(l, seq) \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
195 |
+ __kmp_direct_init[0]((kmp_dyna_lock_t *)(l), seq); \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
196 |
+ __kmp_direct_init[1] = __kmp_direct_init[0]; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
197 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
198 |
// Returns "free" lock value for the given lock type. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
199 |
#define KMP_LOCK_FREE(type) (locktag_##type) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
200 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
201 |
--- src/kmp_platform.h 2015-10-09 11:05:48.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
202 |
+++ src/kmp_platform.h 2016-08-04 19:37:07.247582315 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
203 |
@@ -39,6 +39,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
204 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
205 |
#define KMP_OS_LINUX 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
206 |
#define KMP_OS_FREEBSD 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
207 |
+#define KMP_OS_SOLARIS 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
208 |
#define KMP_OS_DARWIN 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
209 |
#define KMP_OS_WINDOWS 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
210 |
#define KMP_OS_CNK 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
211 |
@@ -70,16 +71,21 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
212 |
# define KMP_OS_FREEBSD 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
213 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
214 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
215 |
+#if defined(__sun) || defined(__sun__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
216 |
+# undef KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
217 |
+# define KMP_OS_SOLARIS 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
218 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
219 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
220 |
#if ( defined __bgq__ ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
221 |
# undef KMP_OS_CNK |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
222 |
# define KMP_OS_CNK 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
223 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
224 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
225 |
-#if (1 != KMP_OS_LINUX + KMP_OS_FREEBSD + KMP_OS_DARWIN + KMP_OS_WINDOWS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
226 |
+#if (1 != KMP_OS_LINUX + KMP_OS_FREEBSD + KMP_OS_SOLARIS + KMP_OS_DARWIN + KMP_OS_WINDOWS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
227 |
# error Unknown OS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
228 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
229 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
230 |
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
231 |
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_SOLARIS || KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
232 |
# undef KMP_OS_UNIX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
233 |
# define KMP_OS_UNIX 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
234 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
235 |
@@ -91,6 +97,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
236 |
#define KMP_ARCH_AARCH64 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
237 |
#define KMP_ARCH_PPC64_BE 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
238 |
#define KMP_ARCH_PPC64_LE 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
239 |
+#define KMP_ARCH_SPARC 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
240 |
#define KMP_ARCH_PPC64 (KMP_ARCH_PPC64_LE || KMP_ARCH_PPC64_BE) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
241 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
242 |
#if KMP_OS_WINDOWS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
243 |
@@ -121,6 +128,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
244 |
# elif defined __aarch64__ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
245 |
# undef KMP_ARCH_AARCH64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
246 |
# define KMP_ARCH_AARCH64 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
247 |
+# elif defined(__sparc) || defined(__sparc__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
248 |
+# undef KMP_ARCH_SPARC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
249 |
+# define KMP_ARCH_SPARC 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
250 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
251 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
252 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
253 |
@@ -160,6 +170,17 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
254 |
# define KMP_ARCH_ARM 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
255 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
256 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
257 |
+#if defined(KMP_ARCH_SPARC) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
258 |
+# undef KMP_ARCH_SPARC32 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
259 |
+# undef KMP_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
260 |
+# if defined(__sparcv9) || defined(__sparc64__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
261 |
+# define KMP_ARCH_SPARC64 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
262 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
263 |
+# if defined(__sparc) && !defined(__sparcv9) && !defined(__sparc64__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
264 |
+# define KMP_ARCH_SPARC32 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
265 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
266 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
267 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
268 |
// Intel(R) Many Integrated Core Architecture detection |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
269 |
#if defined(__MIC__) || defined(__MIC2__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
270 |
# define KMP_MIC 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
271 |
@@ -178,7 +199,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
272 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
273 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
274 |
// TODO: Fixme - This is clever, but really fugly |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
275 |
-#if (1 != KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + KMP_ARCH_AARCH64) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
276 |
+#if (1 != KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + KMP_ARCH_AARCH64 + KMP_ARCH_SPARC) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
277 |
# error Unknown or unsupported architecture |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
278 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
279 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
280 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
281 |
--- src/z_Linux_util.c 2015-10-09 11:05:53.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
282 |
+++ src/z_Linux_util.c 2016-02-21 20:35:31.672538690 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
283 |
@@ -72,9 +72,20 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
284 |
#elif KMP_OS_FREEBSD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
285 |
# include <sys/sysctl.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
286 |
# include <pthread_np.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
287 |
+#elif KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
288 |
+# include <stdlib.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
289 |
+# include <errno.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
290 |
+# include <unistd.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
291 |
+# include <limits.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
292 |
+# include <stdbool.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
293 |
+# include <strings.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
294 |
+# include <sys/types.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
295 |
+# include <sys/stat.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
296 |
+# include <fcntl.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
297 |
+# include <sys/procfs.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
298 |
+# include <sys/loadavg.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
299 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
300 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
301 |
- |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
302 |
#include <dirent.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
303 |
#include <ctype.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
304 |
#include <fcntl.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
305 |
@@ -2101,7 +2112,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
306 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
307 |
int r = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
308 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
309 |
- #if KMP_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
310 |
+ #if (KMP_OS_LINUX || KMP_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
311 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
312 |
r = sysconf( _SC_NPROCESSORS_ONLN ); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
313 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
314 |
@@ -2376,6 +2387,39 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
315 |
// FIXME(FreeBSD*): Implement this |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
316 |
found = 1; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
317 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
318 |
+ #elif KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
319 |
+ const char* mpath = __kmp_str_format( "/proc/%d/map", (int) getpid()); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
320 |
+ if (mpath == NULL) return found; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
321 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
322 |
+ int fd = open(mpath, O_RDONLY); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
323 |
+ if (fd < 0) return found; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
324 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
325 |
+ ssize_t nread = 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
326 |
+ size_t mapsize = (1 << 20); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
327 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
328 |
+ struct prmap* prmapbuf = (struct prmap*) malloc(mapsize); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
329 |
+ if (prmapbuf == NULL) return found; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
330 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
331 |
+ (void) memset(prmapbuf, 0, mapsize); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
332 |
+ while ((nread += pread(fd, prmapbuf, mapsize, 0)) >= (ssize_t) mapsize) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
333 |
+ { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
334 |
+ mapsize *= 2U; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
335 |
+ prmapbuf = (struct prmap*) realloc(prmapbuf, mapsize); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
336 |
+ } |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
337 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
338 |
+ uintptr_t vaddr = (uintptr_t) addr; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
339 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
340 |
+ for (const struct prmap* cur = prmapbuf; nread > 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
341 |
+ nread -= sizeof(*cur), ++cur) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
342 |
+ { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
343 |
+ if ((vaddr >= cur->pr_vaddr) && |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
344 |
+ (vaddr <= (cur->pr_vaddr + cur->pr_size))) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
345 |
+ found = 1; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
346 |
+ } |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
347 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
348 |
+ free(prmapbuf); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
349 |
+ close(fd); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
350 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
351 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
352 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
353 |
#error "Unknown or unsupported OS" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
354 |
@@ -2388,8 +2432,20 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
355 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
356 |
#ifdef USE_LOAD_BALANCE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
357 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
358 |
+# if (KMP_OS_DARWIN || KMP_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
359 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
360 |
-# if KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
361 |
+// Hi, Apple. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
362 |
+# ifndef LOADAVG_1MIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
363 |
+# define LOADAVG_1MIN 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
364 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
365 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
366 |
+# ifndef LOADAVG_5MIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
367 |
+# define LOADAVG_5MIN 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
368 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
369 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
370 |
+# ifndef LOADAVG_15MIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
371 |
+# define LOADAVG_15MIN 2 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
372 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
373 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
374 |
// The function returns the rounded value of the system load average |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
375 |
// during given time interval which depends on the value of |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
376 |
@@ -2408,12 +2464,12 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
377 |
// getloadavg() may return the number of samples less than requested that is |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
378 |
// less than 3. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
379 |
if ( __kmp_load_balance_interval < 180 && ( res >= 1 ) ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
380 |
- ret_avg = averages[0];// 1 min |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
381 |
+ ret_avg = averages[LOADAVG_1MIN];// 1 min |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
382 |
} else if ( ( __kmp_load_balance_interval >= 180 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
383 |
&& __kmp_load_balance_interval < 600 ) && ( res >= 2 ) ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
384 |
- ret_avg = averages[1];// 5 min |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
385 |
+ ret_avg = averages[LOADAVG_5MIN];// 5 min |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
386 |
} else if ( ( __kmp_load_balance_interval >= 600 ) && ( res == 3 ) ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
387 |
- ret_avg = averages[2];// 15 min |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
388 |
+ ret_avg = averages[LOADAVG_15MIN];// 15 min |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
389 |
} else {// Error occurred |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
390 |
return -1; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
391 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
392 |
--- src/thirdparty/ittnotify/ittnotify_config.h 2015-10-09 11:05:58.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
393 |
+++ src/thirdparty/ittnotify/ittnotify_config.h 2016-02-21 09:36:01.959301778 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
394 |
@@ -43,11 +43,17 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
395 |
# define ITT_OS_MAC 3 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
396 |
#endif /* ITT_OS_MAC */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
397 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
398 |
+#ifndef ITT_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
399 |
+# define ITT_OS_SOLARIS 4 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
400 |
+#endif /* ITT_OS_SOLARIS */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
401 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
402 |
#ifndef ITT_OS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
403 |
# if defined WIN32 || defined _WIN32 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
404 |
# define ITT_OS ITT_OS_WIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
405 |
# elif defined( __APPLE__ ) && defined( __MACH__ ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
406 |
# define ITT_OS ITT_OS_MAC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
407 |
+# elif defined(__sun) || defined(__sun__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
408 |
+# define ITT_OS ITT_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
409 |
# else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
410 |
# define ITT_OS ITT_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
411 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
412 |
@@ -75,11 +81,18 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
413 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
414 |
#endif /* ITT_PLATFORM */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
415 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
416 |
+#if (ITT_OS == ITT_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
417 |
+# if !defined(_UNICODE) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
418 |
+# define _UNICODE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
419 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
420 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
421 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
422 |
#if defined(_UNICODE) && !defined(UNICODE) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
423 |
#define UNICODE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
424 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
425 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
426 |
#include <stddef.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
427 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
428 |
#if ITT_PLATFORM==ITT_PLATFORM_WIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
429 |
#include <tchar.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
430 |
#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
431 |
@@ -161,6 +174,13 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
432 |
# define ITT_ARCH_PPC64 5 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
433 |
#endif /* ITT_ARCH_PPC64 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
434 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
435 |
+#ifndef ITT_ARCH_SPARC32 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
436 |
+# define ITT_ARCH_SPARC32 6 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
437 |
+#endif /* ITT_ARCH_SPARC32 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
438 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
439 |
+#ifndef ITT_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
440 |
+# define ITT_ARCH_SPARC64 7 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
441 |
+#endif /* ITT_ARCH_SPARC32 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
442 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
443 |
#ifndef ITT_ARCH |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
444 |
# if defined _M_IX86 || defined __i386__ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
445 |
@@ -175,6 +195,10 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
446 |
# define ITT_ARCH ITT_ARCH_PPC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
447 |
# elif defined __aarch64__ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
448 |
# define ITT_ARCH ITT_ARCH_AARCH64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
449 |
+# elif defined __sparcv9 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
450 |
+# define ITT_ARCH ITT_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
451 |
+# elif defined __sparc |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
452 |
+# define ITT_ARCH ITT_ARCH_SPARC32 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
453 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
454 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
455 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
456 |
@@ -195,6 +219,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
457 |
static char __itt_build_check_##suffix[(expr) ? 1 : -1]; \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
458 |
__itt_build_check_##suffix[0] = 0; \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
459 |
} while(0) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
460 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
461 |
#define _ITT_BUILD_ASSERT(expr, suffix) __ITT_BUILD_ASSERT((expr), suffix) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
462 |
#define ITT_BUILD_ASSERT(expr) _ITT_BUILD_ASSERT((expr), __LINE__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
463 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
464 |
@@ -226,6 +251,13 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
465 |
#ifndef _GNU_SOURCE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
466 |
#define _GNU_SOURCE 1 /* need for PTHREAD_MUTEX_RECURSIVE */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
467 |
#endif /* _GNU_SOURCE */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
468 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
469 |
+#if (ITT_OS == ITT_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
470 |
+# if !defined(__EXTENSIONS__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
471 |
+# define __EXTENSIONS__ 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
472 |
+# endif /* __EXTENSIONS__ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
473 |
+#endif /* ITT_OS_SOLARIS */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
474 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
475 |
#ifndef __USE_UNIX98 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
476 |
#define __USE_UNIX98 1 /* need for PTHREAD_MUTEX_RECURSIVE, on SLES11.1 with gcc 4.3.4 wherein pthread.h missing dependency on __USE_XOPEN2K8 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
477 |
#endif /*__USE_UNIX98*/ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
478 |
@@ -312,7 +344,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
479 |
: "memory"); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
480 |
return result; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
481 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
482 |
-#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 || ITT_ARCH==ITT_ARCH_AARCH64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
483 |
+#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 || ITT_ARCH==ITT_ARCH_AARCH64 || ITT_ARCH==ITT_ARCH_SPARC32 || ITT_ARCH==ITT_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
484 |
#define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
485 |
#endif /* ITT_ARCH==ITT_ARCH_IA64 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
486 |
#ifndef ITT_SIMPLE_INIT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
487 |
--- src/thirdparty/ittnotify/ittnotify_static.c 2015-10-09 11:05:58.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
488 |
+++ src/thirdparty/ittnotify/ittnotify_static.c 2016-02-21 09:33:19.660164335 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
489 |
@@ -56,6 +56,8 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
490 |
static const char* ittnotify_lib_name = "libittnotify.dll"; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
491 |
#elif ITT_OS==ITT_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
492 |
static const char* ittnotify_lib_name = "libittnotify.so"; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
493 |
+#elif ITT_OS==ITT_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
494 |
+static const char* ittnotify_lib_name = "libittnotify.so"; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
495 |
#elif ITT_OS==ITT_OS_MAC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
496 |
static const char* ittnotify_lib_name = "libittnotify.dylib"; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
497 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
498 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
499 |
--- src/kmp_os.h 2015-10-09 11:05:48.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
500 |
+++ src/kmp_os.h 2016-08-17 10:24:55.845519915 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
501 |
@@ -71,7 +71,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
502 |
#elif defined( __clang__ ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
503 |
# undef KMP_COMPILER_CLANG |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
504 |
# define KMP_COMPILER_CLANG 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
505 |
-#elif defined( __GNUC__ ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
506 |
+#elif defined( __GNUC__ ) || defined(__GNUG__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
507 |
# undef KMP_COMPILER_GCC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
508 |
# define KMP_COMPILER_GCC 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
509 |
#elif defined( _MSC_VER ) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
510 |
@@ -83,7 +83,8 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
511 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
512 |
#include "kmp_platform.h" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
513 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
514 |
-#if (KMP_OS_LINUX || KMP_OS_WINDOWS) && !KMP_OS_CNK && !KMP_ARCH_PPC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
515 |
+#if (KMP_OS_LINUX || KMP_OS_WINDOWS) && \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
516 |
+ !KMP_OS_CNK && !KMP_ARCH_PPC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
517 |
# define KMP_AFFINITY_SUPPORTED 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
518 |
# if KMP_OS_WINDOWS && KMP_ARCH_X86_64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
519 |
# define KMP_GROUP_AFFINITY 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
520 |
@@ -95,9 +96,32 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
521 |
# define KMP_GROUP_AFFINITY 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
522 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
523 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
524 |
+#if (KMP_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
525 |
+# undef KMP_OS_UNIX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
526 |
+# define KMP_OS_UNIX 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
527 |
+# undef _REENTRANT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
528 |
+# define _REENTRANT 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
529 |
+# undef __EXTENSIONS__ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
530 |
+# define __EXTENSIONS__ 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
531 |
+# undef KMP_GOMP_COMPAT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
532 |
+# define KMP_GOMP_COMPAT 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
533 |
+# undef KMP_ASM_INTRINS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
534 |
+# define KMP_ASM_INTRINS 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
535 |
+# undef KMP_GOMP_COMPAT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
536 |
+# define KMP_GOMP_COMPAT 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
537 |
+# undef KMP_TDATA_GTID |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
538 |
+# define KMP_TDATA_GTID 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
539 |
+# undef KMP_USE_ADAPTIVE_LOCKS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
540 |
+# define KMP_USE_ADAPTIVE_LOCKS 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
541 |
+# undef KMP_AFFINITY_SUPPORTED |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
542 |
+# define KMP_AFFINITY_SUPPORTED 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
543 |
+# undef KMP_GROUP_AFFINITY |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
544 |
+# define KMP_GROUP_AFFINITY 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
545 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
546 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
547 |
/* Check for quad-precision extension. */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
548 |
#define KMP_HAVE_QUAD 0 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
549 |
-#if KMP_ARCH_X86 || KMP_ARCH_X86_64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
550 |
+#if (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_SPARC32 || KMP_ARCH_SPARC64) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
551 |
# if KMP_COMPILER_ICC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
552 |
/* _Quad is already defined for icc */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
553 |
# undef KMP_HAVE_QUAD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
554 |
@@ -106,8 +130,12 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
555 |
/* Clang doesn't support a software-implemented |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
556 |
128-bit extended precision type yet */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
557 |
typedef long double _Quad; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
558 |
-# elif KMP_COMPILER_GCC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
559 |
- typedef __float128 _Quad; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
560 |
+# elif (KMP_COMPILER_GCC || KMP_COMPILER_CLANG) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
561 |
+# if KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
562 |
+ typedef long double _Quad; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
563 |
+# else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
564 |
+ typedef __float128 _Quad; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
565 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
566 |
# undef KMP_HAVE_QUAD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
567 |
# define KMP_HAVE_QUAD 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
568 |
# elif KMP_COMPILER_MSVC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
569 |
@@ -168,15 +196,15 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
570 |
# define KMP_UINT64_SPEC "llu" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
571 |
#endif /* KMP_OS_UNIX */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
572 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
573 |
-#if KMP_ARCH_X86 || KMP_ARCH_ARM |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
574 |
+#if (KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_SPARC32) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
575 |
# define KMP_SIZE_T_SPEC KMP_UINT32_SPEC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
576 |
-#elif KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
577 |
+#elif KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 | KMP_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
578 |
# define KMP_SIZE_T_SPEC KMP_UINT64_SPEC |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
579 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
580 |
# error "Can't determine size_t printf format specifier." |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
581 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
582 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
583 |
-#if KMP_ARCH_X86 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
584 |
+#if (KMP_ARCH_X86 || KMP_ARCH_SPARC32) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
585 |
# define KMP_SIZE_T_MAX (0xFFFFFFFF) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
586 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
587 |
# define KMP_SIZE_T_MAX (0xFFFFFFFFFFFFFFFF) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
588 |
@@ -194,6 +222,12 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
589 |
# define KMP_UINTPTR_SPEC "lu" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
590 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
591 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
592 |
+#if (KMP_ARCH_X86_64 || KMP_ARCH_SPARC || KMP_ARCH_PPC || KMP_ARCH_AARCH64) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
593 |
+# define BUILD_I8 1 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
594 |
+#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
595 |
+# undef BUILD_I8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
596 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
597 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
598 |
#ifdef BUILD_I8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
599 |
typedef kmp_int64 kmp_int; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
600 |
typedef kmp_uint64 kmp_uint; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
601 |
@@ -571,7 +605,8 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
602 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
603 |
#endif /* KMP_OS_WINDOWS */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
604 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
605 |
-#if KMP_ARCH_PPC64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
606 |
+#if KMP_ARCH_PPC64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64 || \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
607 |
+ KMP_ARCH_SPARC32 || KMP_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
608 |
# define KMP_MB() __sync_synchronize() |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
609 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
610 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
611 |
@@ -626,7 +661,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
612 |
#define TCW_SYNC_8(a,b) (a) = (b) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
613 |
#define TCX_SYNC_8(a,b,c) KMP_COMPARE_AND_STORE_REL64((volatile kmp_int64 *)(volatile void *)&(a), (kmp_int64)(b), (kmp_int64)(c)) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
614 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
615 |
-#if KMP_ARCH_X86 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
616 |
+#if (KMP_ARCH_X86 || KMP_ARCH_SPARC32) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
617 |
// What about ARM? |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
618 |
#define TCR_PTR(a) ((void *)TCR_4(a)) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
619 |
#define TCW_PTR(a,b) TCW_4((a),(b)) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
620 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
621 |
--- /dev/null 2016-08-10 15:44:22.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
622 |
+++ src/kmp_solaris.h 2016-08-10 15:48:54.851814025 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
623 |
@@ -0,0 +1,72 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
624 |
+/* <copyright> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
625 |
+ Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
626 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
627 |
+ Redistribution and use in source and binary forms, with or without |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
628 |
+ modification, are permitted provided that the following conditions |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
629 |
+ are met: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
630 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
631 |
+ * Redistributions of source code must retain the above copyright |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
632 |
+ notice, this list of conditions and the following disclaimer. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
633 |
+ * Redistributions in binary form must reproduce the above copyright |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
634 |
+ notice, this list of conditions and the following disclaimer in the |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
635 |
+ documentation and/or other materials provided with the distribution. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
636 |
+ * Neither the name of Oracle Corporation nor the names of its |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
637 |
+ contributors may be used to endorse or promote products derived |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
638 |
+ from this software without specific prior written permission. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
639 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
640 |
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
641 |
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
642 |
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
643 |
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
644 |
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
645 |
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
646 |
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
647 |
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
648 |
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
649 |
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
650 |
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
651 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
652 |
+</copyright> */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
653 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
654 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
655 |
+ * Implementation of __rdtsc() on Solaris Intel and SPARC. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
656 |
+ * On Intel, we use the rdtsc instruction. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
657 |
+ * On SPARC, we read the %tick register. This _must_ be compiled as |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
658 |
+ * SPARCV9. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
659 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
660 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
661 |
+#ifdef __cplusplus |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
662 |
+extern "C" { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
663 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
664 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
665 |
+#if defined(__i386__) || defined(__x86_64__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
666 |
+__attribute__((used, visibility("hidden"))) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
667 |
+static inline unsigned long long __rdtsc() |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
668 |
+{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
669 |
+ unsigned int H = 0U; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
670 |
+ unsigned int L = 0U; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
671 |
+ __asm__ __volatile__ ("rdtsc" : "=a"(L), "=d"(H)); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
672 |
+ return ((unsigned long long) L) | ((unsigned long long) H) << 32ULL; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
673 |
+} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
674 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
675 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
676 |
+#if defined(__sparc__) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
677 |
+__attribute__((used, visibility("hidden"))) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
678 |
+static inline unsigned long long __rdtsc() |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
679 |
+{ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
680 |
+ unsigned long long T; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
681 |
+#if defined(__sparcv9) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
682 |
+ __asm__ __volatile__("rd %%tick, %0\n\t" : "=r" (T)); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
683 |
+#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
684 |
+ __asm__ __volatile__("rd %%tick, %L0\n\t" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
685 |
+ "srlx %L0, 32, %H0" : "=r" (T)); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
686 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
687 |
+ return T; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
688 |
+} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
689 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
690 |
+#endif /* (__sparc__) */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
691 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
692 |
+#ifdef __cplusplus |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
693 |
+} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
694 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
695 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
696 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
697 |
--- src/kmp_stats_timing.h 2015-10-09 11:05:49.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
698 |
+++ src/kmp_stats_timing.h 2016-02-23 06:51:41.006922759 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
699 |
@@ -36,11 +36,16 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
700 |
</copyright> */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
701 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
702 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
703 |
-#include <stdint.h> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
704 |
+#include <cstdint> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
705 |
#include <string> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
706 |
#include <limits> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
707 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
708 |
#include "kmp_os.h" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
709 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
710 |
+#if KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
711 |
+# include "kmp_solaris.h" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
712 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
713 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
714 |
class tsc_tick_count { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
715 |
private: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
716 |
int64_t my_count; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
717 |
--- src/kmp_ftn_entry.h 2015-10-09 11:05:46.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
718 |
+++ src/kmp_ftn_entry.h 2016-02-21 07:57:59.742196067 -0800 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
719 |
@@ -435,7 +435,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
720 |
return 0; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
721 |
} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
722 |
--gtid; // We keep (gtid+1) in TLS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
723 |
- #elif KMP_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
724 |
+ #elif (KMP_OS_LINUX || KMP_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
725 |
#ifdef KMP_TDATA_GTID |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
726 |
if ( __kmp_gtid_mode >= 3 ) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
727 |
if ((gtid = __kmp_gtid) == KMP_GTID_DNE) { |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
728 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
729 |
--- src/kmp.h 2015-10-09 11:05:47.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
730 |
+++ src/kmp.h 2016-08-04 10:20:19.628625370 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
731 |
@@ -126,6 +126,16 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
732 |
# if !defined NSIG && defined _NSIG |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
733 |
# define NSIG _NSIG |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
734 |
# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
735 |
+# if KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
736 |
+# define TIMEVAL_TO_TIMESPEC(tv, ts) { \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
737 |
+ (ts)->tv_sec = (tv)->tv_sec; \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
738 |
+ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
739 |
+} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
740 |
+# define TIMESPEC_TO_TIMEVAL(tv, ts) { \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
741 |
+ (tv)->tv_sec = (ts)->tv_sec; \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
742 |
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
743 |
+} |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
744 |
+# endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
745 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
746 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
747 |
#if KMP_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
748 |
@@ -586,7 +596,7 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
749 |
# define KMP_CPU_SET_ITERATE(i,mask) \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
750 |
for(i = 0; (size_t)i < KMP_CPU_SETSIZE; ++i) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
751 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
752 |
-# if KMP_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
753 |
+# if (KMP_OS_LINUX || KMP_OS_SOLARIS) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
754 |
// |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
755 |
// On Linux* OS, the mask is actually a vector of length __kmp_affin_mask_size |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
756 |
// (in bytes). It should be allocated on a word boundary. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
757 |
@@ -1084,6 +1094,9 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
758 |
#elif KMP_OS_LINUX |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
759 |
# define KMP_INIT_WAIT 1024U /* initial number of spin-tests */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
760 |
# define KMP_NEXT_WAIT 512U /* susequent number of spin-tests */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
761 |
+#elif KMP_OS_SOLARIS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
762 |
+# define KMP_INIT_WAIT 16U /* initial number of spin-tests */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
763 |
+# define KMP_NEXT_WAIT 8U /* susequent number of spin-tests */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
764 |
#elif KMP_OS_DARWIN |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
765 |
/* TODO: tune for KMP_OS_DARWIN */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
766 |
# define KMP_INIT_WAIT 1024U /* initial number of spin-tests */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
767 |
@@ -1115,6 +1128,14 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
768 |
# define KMP_PPC64_PRI_MED() __asm__ volatile ("or 2, 2, 2") |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
769 |
# define KMP_PPC64_PRI_LOC_MB() __asm__ volatile ("" : : : "memory") |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
770 |
# define KMP_CPU_PAUSE() do { KMP_PPC64_PRI_LOW(); KMP_PPC64_PRI_MED(); KMP_PPC64_PRI_LOC_MB(); } while (0) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
771 |
+#elif KMP_ARCH_SPARC || KMP_ARCH_SPARC32 || KMP_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
772 |
+#define KMP_CPU_PAUSE() \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
773 |
+ do { \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
774 |
+ __asm__ __volatile__("rd %ccr, %g0"); \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
775 |
+ __asm__ __volatile__("rd %ccr, %g0"); \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
776 |
+ __asm__ __volatile__("rd %ccr, %g0"); \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
777 |
+ __asm__ __volatile__("rd %ccr, %g0"); \ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
778 |
+ } while (0) |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
779 |
#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
780 |
# define KMP_CPU_PAUSE() /* nothing to do */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
781 |
#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
782 |
@@ -3015,9 +3036,16 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
783 |
extern kmp_uint32 __kmp_le_4( kmp_uint32 value, kmp_uint32 checker ); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
784 |
extern kmp_uint32 __kmp_wait_yield_4( kmp_uint32 volatile * spinner, kmp_uint32 checker, kmp_uint32 (*pred) (kmp_uint32, kmp_uint32), void * obj ); |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
785 |
|
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
786 |
+#ifdef __cplusplus |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
787 |
class kmp_flag_32; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
788 |
class kmp_flag_64; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
789 |
class kmp_flag_oncore; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
790 |
+#else |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
791 |
+ struct kmp_flag_32; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
792 |
+ struct kmp_flag_64; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
793 |
+ struct kmp_flag_oncore; |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
794 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
795 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
796 |
extern void __kmp_wait_32(kmp_info_t *this_thr, kmp_flag_32 *flag, int final_spin |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
797 |
#if USE_ITT_BUILD |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
798 |
, void * itt_sync_obj |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
799 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
800 |
--- /dev/null 2016-08-04 13:40:37.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
801 |
+++ src/z_Solaris_asm_i386.S 2016-08-04 13:40:19.933031646 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
802 |
@@ -0,0 +1,87 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
803 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
804 |
+ * z_Solaris_asm.s: - microtasking routines specifically |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
805 |
+ * written for Intel and SPARC platforms |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
806 |
+ * running Solaris OS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
807 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
808 |
+ * <copyright> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
809 |
+ * Copyright (c) 1997-2015 Intel Corporation. All Rights Reserved. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
810 |
+ * Copyright (c) 2016 Oracle Corporation. All Rights Reserved. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
811 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
812 |
+ * Redistribution and use in source and binary forms, with or without |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
813 |
+ * modification, are permitted provided that the following conditions |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
814 |
+ * are met: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
815 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
816 |
+ * - Redistributions of source code must retain the above copyright |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
817 |
+ * notice, this list of conditions and the following disclaimer. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
818 |
+ * - Redistributions in binary form must reproduce the above copyright |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
819 |
+ * notice, this list of conditions and the following disclaimer in the |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
820 |
+ * documentation and/or other materials provided with the distribution. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
821 |
+ * - Neither the name of Intel Corporation nor the names of its |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
822 |
+ * contributors may be used to endorse or promote products derived |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
823 |
+ * from this software without specific prior written permission. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
824 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
825 |
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
826 |
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
827 |
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
828 |
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
829 |
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
830 |
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
831 |
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
832 |
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
833 |
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
834 |
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
835 |
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
836 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
837 |
+ * </copyright> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
838 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
839 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
840 |
+#include "kmp_platform.h" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
841 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
842 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
843 |
+ * ----------------------------------------------------------------------- |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
844 |
+ * data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
845 |
+ * ----------------------------------------------------------------------- |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
846 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
847 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
848 |
+#ifdef KMP_GOMP_COMPAT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
849 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
850 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
851 |
+ * Support for unnamed common blocks. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
852 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
853 |
+ * Because the symbol ".gomp_critical_user_" contains a ".", we have to |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
854 |
+ * put this stuff in assembly. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
855 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
856 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
857 |
+#if KMP_ARCH_X86 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
858 |
+ .align 4 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
859 |
+ .data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
860 |
+ .comm .gomp_critical_user_, 32, 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
861 |
+ .data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
862 |
+ .global __kmp_unnamed_critical_addr |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
863 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
864 |
+__kmp_unnamed_critical_addr: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
865 |
+ .align 4 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
866 |
+ .4byte .gomp_critical_user_ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
867 |
+ .type __kmp_unnamed_critical_addr,@object |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
868 |
+ .size __kmp_unnamed_critical_addr, 4 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
869 |
+#endif /* KMP_ARCH_X86 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
870 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
871 |
+#if KMP_ARCH_X86_64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
872 |
+ .align 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
873 |
+ .data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
874 |
+ .comm .gomp_critical_user_, 64, 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
875 |
+ .data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
876 |
+ .global __kmp_unnamed_critical_addr |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
877 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
878 |
+__kmp_unnamed_critical_addr: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
879 |
+ .align 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
880 |
+ .8byte .gomp_critical_user_ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
881 |
+ .type __kmp_unnamed_critical_addr,@object |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
882 |
+ .size __kmp_unnamed_critical_addr, 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
883 |
+#endif /* KMP_ARCH_X86_64 */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
884 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
885 |
+#endif /* KMP_GOMP_COMPAT */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
886 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
887 |
+ .section .note.GNU-stack,"",@progbits |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
888 |
+ .file "z_Solaris_asm_i386.s" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
889 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
890 |
### |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
891 |
--- /dev/null 2016-08-04 19:37:00.000000000 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
892 |
+++ src/z_Solaris_asm_sparc.S 2016-08-04 19:29:32.273919730 -0700 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
893 |
@@ -0,0 +1,80 @@ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
894 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
895 |
+ * z_Solaris_asm.s: - microtasking routines specifically |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
896 |
+ * written for Intel and SPARC platforms |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
897 |
+ * running Solaris OS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
898 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
899 |
+ * <copyright> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
900 |
+ * Copyright (c) 1997-2015 Intel Corporation. All Rights Reserved. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
901 |
+ * Copyright (c) 2016 Oracle Corporation. All Rights Reserved. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
902 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
903 |
+ * Redistribution and use in source and binary forms, with or without |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
904 |
+ * modification, are permitted provided that the following conditions |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
905 |
+ * are met: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
906 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
907 |
+ * - Redistributions of source code must retain the above copyright |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
908 |
+ * notice, this list of conditions and the following disclaimer. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
909 |
+ * - Redistributions in binary form must reproduce the above copyright |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
910 |
+ * notice, this list of conditions and the following disclaimer in the |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
911 |
+ * documentation and/or other materials provided with the distribution. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
912 |
+ * - Neither the name of Intel Corporation nor the names of its |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
913 |
+ * contributors may be used to endorse or promote products derived |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
914 |
+ * from this software without specific prior written permission. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
915 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
916 |
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
917 |
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
918 |
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
919 |
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
920 |
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
921 |
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
922 |
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
923 |
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
924 |
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
925 |
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
926 |
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
927 |
+ * |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
928 |
+ * </copyright> |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
929 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
930 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
931 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
932 |
+ * ----------------------------------------------------------------------- |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
933 |
+ * macros |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
934 |
+ * ----------------------------------------------------------------------- |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
935 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
936 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
937 |
+#include "kmp_platform.h" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
938 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
939 |
+#ifdef KMP_GOMP_COMPAT |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
940 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
941 |
+/* |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
942 |
+ * Support for unnamed common blocks. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
943 |
+ * Because the symbol ".gomp_critical_user_" contains a ".", we have to |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
944 |
+ * put this stuff in assembly. |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
945 |
+ */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
946 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
947 |
+ .data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
948 |
+ .align 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
949 |
+ .global .gomp_critical_user_ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
950 |
+ .comm .gomp_critical_user_, 64, 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
951 |
+ .type .gomp_critical_user_,@object |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
952 |
+ .size .gomp_critical_user_, 64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
953 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
954 |
+ .data |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
955 |
+ .align 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
956 |
+ .global __kmp_unnamed_critical_addr |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
957 |
+ .type __kmp_unnamed_critical_addr,@object |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
958 |
+ .size __kmp_unnamed_critical_addr, .-__kmp_unnamed_critical_addr |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
959 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
960 |
+__kmp_unnamed_critical_addr: |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
961 |
+ .align 8 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
962 |
+#if KMP_ARCH_SPARC64 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
963 |
+ .xword .gomp_critical_user_ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
964 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
965 |
+#if KMP_ARCH_SPARC32 |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
966 |
+ .word .gomp_critical_user_ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
967 |
+#endif |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
968 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
969 |
+#endif /* KMP_GOMP_COMPAT */ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
970 |
+ |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
971 |
+ .section .note.GNU-stack, "", @progbits |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
972 |
+ .file "z_Solaris_asm_sparc.S" |
c6cfc48dd184
PSARC 2016/236 Intel OpenMP Runtime
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff
changeset
|
973 |
+ |