| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
typedef enum omp_allocator_handle_t |
| 4 |
: __UINTPTR_TYPE__ |
| 5 |
{ |
| 6 |
omp_null_allocator = 0, |
| 7 |
omp_default_mem_alloc = 1, |
| 8 |
omp_large_cap_mem_alloc = 2, |
| 9 |
omp_const_mem_alloc = 3, |
| 10 |
omp_high_bw_mem_alloc = 4, |
| 11 |
omp_low_lat_mem_alloc = 5, |
| 12 |
omp_cgroup_mem_alloc = 6, |
| 13 |
omp_pteam_mem_alloc = 7, |
| 14 |
omp_thread_mem_alloc = 8, |
| 15 |
__omp_allocator_handle_t_max__ = __UINTPTR_MAX__ |
| 16 |
} omp_allocator_handle_t; |
| 17 |
|
| 18 |
typedef enum omp_sync_hint_t { |
| 19 |
omp_sync_hint_none = 0x0, |
| 20 |
omp_lock_hint_none = omp_sync_hint_none, |
| 21 |
omp_sync_hint_uncontended = 0x1, |
| 22 |
omp_lock_hint_uncontended = omp_sync_hint_uncontended, |
| 23 |
omp_sync_hint_contended = 0x2, |
| 24 |
omp_lock_hint_contended = omp_sync_hint_contended, |
| 25 |
omp_sync_hint_nonspeculative = 0x4, |
| 26 |
omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative, |
| 27 |
omp_sync_hint_speculative = 0x8, |
| 28 |
omp_lock_hint_speculative = omp_sync_hint_speculative |
| 29 |
} omp_sync_hint_t; |
| 30 |
|
| 31 |
typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t { |
| 32 |
char __omp_depend_t__[2 * sizeof (void *)]; |
| 33 |
} omp_depend_t; |
| 34 |
|
| 35 |
int t; |
| 36 |
#pragma omp threadprivate (t) |
| 37 |
|
| 38 |
#pragma omp declare target |
| 39 |
int f, l, ll, r, r2; |
| 40 |
|
| 41 |
void |
| 42 |
foo (int d, int m, int i1, int i2, int p, int *idp, int s, |
| 43 |
int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int ntm) |
| 44 |
{ |
| 45 |
[[omp::directive (distribute parallel for, |
| 46 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 47 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 48 |
lastprivate (l),schedule(static, 4),order(concurrent),allocate (omp_default_mem_alloc:f))]] |
| 49 |
for (int i = 0; i < 64; i++) |
| 50 |
ll++; |
| 51 |
[[omp::directive (distribute parallel for simd, |
| 52 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 53 |
if (parallel: i2),if(simd: i1),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 54 |
lastprivate (l),schedule(static, 4),nontemporal(ntm), |
| 55 |
safelen(8),simdlen(4),aligned(q: 32),order(concurrent),allocate (omp_default_mem_alloc:f))]] |
| 56 |
for (int i = 0; i < 64; i++) |
| 57 |
ll++; |
| 58 |
[[omp::directive (distribute simd, |
| 59 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 60 |
safelen(8),simdlen(4),aligned(q: 32),reduction(+:r),if(i1),nontemporal(ntm), |
| 61 |
order(concurrent),allocate (omp_default_mem_alloc:f))]] |
| 62 |
for (int i = 0; i < 64; i++) |
| 63 |
ll++; |
| 64 |
[[omp::directive (distribute, |
| 65 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 66 |
allocate (omp_default_mem_alloc:f),order(concurrent))]] |
| 67 |
for (int i = 0; i < 64; i++) |
| 68 |
ll++; |
| 69 |
} |
| 70 |
|
| 71 |
void |
| 72 |
qux (int p) |
| 73 |
{ |
| 74 |
[[omp::directive (loop, bind(teams),order(concurrent), |
| 75 |
private (p),lastprivate (l),collapse(1),reduction(+:r))]] |
| 76 |
for (l = 0; l < 64; ++l) |
| 77 |
ll++; |
| 78 |
} |
| 79 |
#pragma omp end declare target |
| 80 |
|
| 81 |
void |
| 82 |
baz (int d, int m, int i1, int i2, int p, int *idp, int s, |
| 83 |
int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int ntm) |
| 84 |
{ |
| 85 |
[[omp::directive (distribute parallel for, |
| 86 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 87 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 88 |
lastprivate (l),schedule(static, 4),copyin(t),allocate (p))]] |
| 89 |
for (int i = 0; i < 64; i++) |
| 90 |
ll++; |
| 91 |
[[omp::directive (distribute parallel for, |
| 92 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 93 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 94 |
lastprivate (l),schedule(static, 4),order(concurrent),allocate (p))]] |
| 95 |
for (int i = 0; i < 64; i++) |
| 96 |
ll++; |
| 97 |
[[omp::directive (distribute parallel for simd, |
| 98 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 99 |
if (parallel: i2),if(simd: i1),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 100 |
lastprivate (l),schedule(static, 4),nontemporal(ntm), |
| 101 |
safelen(8),simdlen(4),aligned(q: 32),copyin(t),allocate (f))]] |
| 102 |
for (int i = 0; i < 64; i++) |
| 103 |
ll++; |
| 104 |
[[omp::directive (distribute parallel for simd, |
| 105 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 106 |
if (parallel: i2),if(simd: i1),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 107 |
lastprivate (l),schedule(static, 4),nontemporal(ntm), |
| 108 |
safelen(8),simdlen(4),aligned(q: 32),order(concurrent),allocate (f))]] |
| 109 |
for (int i = 0; i < 64; i++) |
| 110 |
ll++; |
| 111 |
[[omp::directive (distribute simd, |
| 112 |
private (p),firstprivate (f),collapse(1),dist_schedule(static, 16), |
| 113 |
safelen(8),simdlen(4),aligned(q: 32),reduction(+:r),if(i1),nontemporal(ntm), |
| 114 |
order(concurrent),allocate (f))]] |
| 115 |
for (int i = 0; i < 64; i++) |
| 116 |
ll++; |
| 117 |
[[omp::directive (loop, bind(parallel),order(concurrent), |
| 118 |
private (p),lastprivate (l),collapse(1),reduction(+:r))]] |
| 119 |
for (l = 0; l < 64; ++l) |
| 120 |
ll++; |
| 121 |
} |
| 122 |
|
| 123 |
void |
| 124 |
bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int hda, int s, |
| 125 |
int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int *dd, int ntm, |
| 126 |
const char *msg, int n1, int n2) |
| 127 |
{ |
| 128 |
[[omp::directive (nothing)]]; |
| 129 |
[[omp::directive (error, at (execution), severity (warning), message (msg))]]; |
| 130 |
[[omp::directive (for simd, |
| 131 |
private (p),firstprivate (f),lastprivate (l),linear (ll:1),reduction(+:r),schedule(static, 4),collapse(1),nowait, |
| 132 |
safelen(8),simdlen(4),aligned(q: 32),nontemporal(ntm),if(i1),order(concurrent),allocate (f))]] |
| 133 |
for (int i = 0; i < 64; i++) |
| 134 |
ll++; |
| 135 |
[[omp::directive (for, |
| 136 |
private (p),firstprivate (f),lastprivate (l),linear (ll:1),reduction(+:r),schedule(static, 4),collapse(1),nowait, |
| 137 |
order(concurrent),allocate (f))]] |
| 138 |
for (int i = 0; i < 64; i++) |
| 139 |
ll++; |
| 140 |
[[omp::directive (simd, |
| 141 |
private (p),lastprivate (l),linear (ll:1),reduction(+:r),collapse(1),safelen(8),simdlen(4),aligned(q: 32), |
| 142 |
nontemporal(ntm),if(i1),order(concurrent))]] |
| 143 |
for (int i = 0; i < 64; i++) |
| 144 |
ll++; |
| 145 |
[[omp::directive (parallel for, |
| 146 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),copyin(t),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 147 |
lastprivate (l),linear (ll:1),ordered schedule(static, 4),collapse(1),allocate (f))]] |
| 148 |
for (int i = 0; i < 64; i++) |
| 149 |
ll++; |
| 150 |
[[omp::directive (parallel for, |
| 151 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),copyin(t),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 152 |
lastprivate (l),linear (ll:1),schedule(static, 4),collapse(1),order(concurrent),allocate (f))]] |
| 153 |
for (int i = 0; i < 64; i++) |
| 154 |
ll++; |
| 155 |
[[omp::directive (parallel for simd, |
| 156 |
private (p),firstprivate (f),if (i2),default(shared),shared(s),copyin(t),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 157 |
lastprivate (l),linear (ll:1),schedule(static, 4),collapse(1), |
| 158 |
safelen(8),simdlen(4),aligned(q: 32),nontemporal(ntm),order(concurrent),allocate (f))]] |
| 159 |
for (int i = 0; i < 64; i++) |
| 160 |
ll++; |
| 161 |
[[omp::directive (parallel sections, |
| 162 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),copyin(t),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 163 |
lastprivate (l),allocate (f))]] |
| 164 |
{ |
| 165 |
#if __cplusplus >= 201703L |
| 166 |
[[using omp:directive (section)]] |
| 167 |
#else |
| 168 |
[[omp::directive (section)]] |
| 169 |
#endif |
| 170 |
{} |
| 171 |
[[omp::sequence (omp::directive (section))]] |
| 172 |
{} |
| 173 |
} |
| 174 |
[[omp::directive (sections, private (p),firstprivate (f),reduction(+:r),lastprivate (l),allocate (f),nowait)]] |
| 175 |
{ |
| 176 |
; |
| 177 |
[[omp::sequence (sequence (directive (section)))]] |
| 178 |
; |
| 179 |
[[omp::directive (section)]] |
| 180 |
{} |
| 181 |
} |
| 182 |
[[omp::directive (barrier)]]; |
| 183 |
#if __cplusplus >= 201703L |
| 184 |
[[using omp:sequence (omp::directive (single, private (p),firstprivate (f),allocate (f),nowait))]] |
| 185 |
#else |
| 186 |
[[omp::sequence (omp::directive (single, private (p),firstprivate (f),allocate (f),nowait))]] |
| 187 |
#endif |
| 188 |
; |
| 189 |
[[omp::sequence (directive (barrier))]]; |
| 190 |
#if __cplusplus >= 201703L |
| 191 |
[[using omp:sequence (directive (parallel, private (p)), |
| 192 |
omp::directive (single, copyprivate (p),firstprivate (f),allocate (f)))]] |
| 193 |
#else |
| 194 |
[[omp::sequence (directive (parallel, private (p)), |
| 195 |
omp::directive (single, copyprivate (p),firstprivate (f),allocate (f)))]] |
| 196 |
#endif |
| 197 |
p = 6; |
| 198 |
[[omp::directive (target parallel, |
| 199 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 200 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread) |
| 201 |
nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 202 |
; |
| 203 |
[[omp::directive (target parallel for, |
| 204 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 205 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 206 |
lastprivate (l),linear (ll:1),ordered schedule(static, 4),collapse(1),nowait depend(inout: dd[0]), |
| 207 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 208 |
for (int i = 0; i < 64; i++) |
| 209 |
ll++; |
| 210 |
[[ |
| 211 |
#if __cplusplus >= 201703L |
| 212 |
using omp: |
| 213 |
#else |
| 214 |
omp:: |
| 215 |
#endif |
| 216 |
directive (target parallel for, |
| 217 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 218 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 219 |
lastprivate (l),linear (ll:1),schedule(static, 4),collapse(1),nowait depend(inout: dd[0]),order(concurrent), |
| 220 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 221 |
for (int i = 0; i < 64; i++) |
| 222 |
ll++; |
| 223 |
[[omp::sequence (omp::directive (target parallel for simd, |
| 224 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 225 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 226 |
lastprivate (l),linear (ll:1),schedule(static, 4),collapse(1), |
| 227 |
safelen(8),simdlen(4),aligned(q: 32),nowait depend(inout: dd[0]),nontemporal(ntm),if (simd: i3),order(concurrent), |
| 228 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda)))]] |
| 229 |
for (int i = 0; i < 64; i++) |
| 230 |
ll++; |
| 231 |
[[ |
| 232 |
#if __cplusplus >= 201703L |
| 233 |
using omp: |
| 234 |
#else |
| 235 |
omp:: |
| 236 |
#endif |
| 237 |
sequence (directive (target teams, |
| 238 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 239 |
shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),nowait,depend(inout: dd[0]), |
| 240 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda)))]] |
| 241 |
; |
| 242 |
[[ |
| 243 |
#if __cplusplus >= 201703L |
| 244 |
using omp: |
| 245 |
#else |
| 246 |
omp:: |
| 247 |
#endif |
| 248 |
sequence (directive (target, |
| 249 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 250 |
nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr(hda)))]] |
| 251 |
; |
| 252 |
[[omp::sequence (omp::directive (target teams distribute, |
| 253 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 254 |
shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),order(concurrent), |
| 255 |
collapse(1),dist_schedule(static, 16),nowait depend(inout: dd[0]),allocate (omp_default_mem_alloc:f),in_reduction(+:r2), |
| 256 |
has_device_addr (hda)))]] |
| 257 |
for (int i = 0; i < 64; i++) |
| 258 |
; |
| 259 |
[[omp::directive (target teams distribute parallel for, |
| 260 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 261 |
shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 262 |
collapse(1),dist_schedule(static, 16), |
| 263 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 264 |
lastprivate (l),schedule(static, 4),nowait depend(inout: dd[0]),order(concurrent), |
| 265 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 266 |
for (int i = 0; i < 64; i++) |
| 267 |
ll++; |
| 268 |
[[omp::directive (target teams distribute parallel for simd, |
| 269 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 270 |
shared(s),default(shared),reduction(+:r),num_teams(2:nte),thread_limit(tl), |
| 271 |
collapse(1),dist_schedule(static, 16), |
| 272 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 273 |
lastprivate (l),schedule(static, 4),order(concurrent), |
| 274 |
safelen(8),simdlen(4),aligned(q: 32),nowait depend(inout: dd[0]),nontemporal(ntm),if (simd: i3), |
| 275 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 276 |
for (int i = 0; i < 64; i++) |
| 277 |
ll++; |
| 278 |
[[omp::directive (target teams distribute simd, |
| 279 |
device(d),map (tofrom: m),if (i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 280 |
shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 281 |
collapse(1),dist_schedule(static, 16),order(concurrent), |
| 282 |
safelen(8),simdlen(4),aligned(q: 32),nowait depend(inout: dd[0]),nontemporal(ntm), |
| 283 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 284 |
for (int i = 0; i < 64; i++) |
| 285 |
ll++; |
| 286 |
[[omp::directive (target simd, |
| 287 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 288 |
safelen(8),simdlen(4),lastprivate (l),linear(ll: 1),aligned(q: 32),reduction(+:r), |
| 289 |
nowait depend(inout: dd[0]),nontemporal(ntm),if(simd:i3),order(concurrent), |
| 290 |
allocate (omp_default_mem_alloc:f),in_reduction(+:r2),has_device_addr (hda))]] |
| 291 |
for (int i = 0; i < 64; i++) |
| 292 |
ll++; |
| 293 |
[[omp::sequence (directive (taskgroup, task_reduction(+:r2), allocate (r2)), |
| 294 |
omp::directive (taskloop simd, |
| 295 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),if(simd: i2),final(fi),mergeable,priority (pp), |
| 296 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),in_reduction(+:r2),nontemporal(ntm), |
| 297 |
order(concurrent),allocate (f)))]] |
| 298 |
for (int i = 0; i < 64; i++) |
| 299 |
ll++; |
| 300 |
[[ |
| 301 |
#if __cplusplus >= 201703L |
| 302 |
using omp: |
| 303 |
#else |
| 304 |
omp:: |
| 305 |
#endif |
| 306 |
sequence (omp::directive (taskgroup, task_reduction(+:r), allocate (r)), |
| 307 |
directive (taskloop simd, |
| 308 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(i1),final(fi),mergeable,nogroup,priority (pp), |
| 309 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),in_reduction(+:r),nontemporal(ntm), |
| 310 |
order(concurrent),allocate (f)))]] |
| 311 |
for (int i = 0; i < 64; i++) |
| 312 |
ll++; |
| 313 |
[[omp::directive (taskwait)]]; |
| 314 |
[[omp::directive (taskloop simd, |
| 315 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),if(taskloop: i1),final(fi),priority (pp) |
| 316 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(+:r),if (simd: i3),nontemporal(ntm), |
| 317 |
order(concurrent),allocate (f))]] |
| 318 |
for (int i = 0; i < 64; i++) |
| 319 |
ll++; |
| 320 |
[[omp::sequence (directive (taskgroup, task_reduction(+:r2), allocate (r2)), |
| 321 |
omp::directive (taskloop |
| 322 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied, if(taskloop: i1),final(fi),mergeable, priority (pp), |
| 323 |
reduction(default, +:r),in_reduction(+:r2),allocate (f)))]] |
| 324 |
for (int i = 0; i < 64; i++) |
| 325 |
ll++; |
| 326 |
[[omp::sequence (directive (taskgroup, task_reduction(+:r2),allocate (r2)), |
| 327 |
omp::directive (task, |
| 328 |
private (p),firstprivate (f),shared (s),default(shared),untied,if(task: i1),final(fi),mergeable,priority (pp), |
| 329 |
in_reduction(+:r2),allocate (f)))]] |
| 330 |
; |
| 331 |
[[omp::directive (taskyield)]]; |
| 332 |
[[omp::directive (target data, if (target data: i1),device(d),map (tofrom: m),use_device_ptr (q),use_device_addr (p))]] |
| 333 |
; |
| 334 |
[[omp::directive (target enter data, if (target enter data: i1),device(d),map (to: m),depend(inout: dd[0]),nowait)]] |
| 335 |
; |
| 336 |
[[omp::directive (target exit data, if (target exit data: i1),device(d),map (from: m),depend(inout: dd[0]),nowait)]] |
| 337 |
; |
| 338 |
[[omp::directive (target update, if (target update: i1),device(d),to (m),depend(inout: dd[0]),nowait)]] |
| 339 |
; |
| 340 |
[[omp::directive (target update, if (target update: i1),device(d),from (m),depend(inout: dd[0]),nowait)]] |
| 341 |
; |
| 342 |
[[omp::directive (taskwait)]]; |
| 343 |
[[omp::sequence (directive (target, nowait,depend(inout: dd[0]),in_reduction(+:r2)), |
| 344 |
directive (teams distribute, |
| 345 |
private(p),firstprivate(f),shared(s),default(shared),reduction(+:r),num_teams(nte - 1 : nte),thread_limit(tl), |
| 346 |
collapse(1),dist_schedule(static, 16),allocate (omp_default_mem_alloc: f),order(concurrent)))]] |
| 347 |
for (int i = 0; i < 64; i++) |
| 348 |
; |
| 349 |
[[omp::directive (teams, |
| 350 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 351 |
allocate (omp_default_mem_alloc: f))]] |
| 352 |
; |
| 353 |
[[omp::sequence (omp::directive (target), |
| 354 |
omp::directive (teams distribute parallel for, |
| 355 |
private(p),firstprivate(f),shared(s),default(shared),reduction(+:r),num_teams(16:nte),thread_limit(tl), |
| 356 |
collapse(1),dist_schedule(static, 16), |
| 357 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 358 |
lastprivate (l),schedule(static, 4),order(concurrent),allocate (omp_default_mem_alloc: f)))]] |
| 359 |
for (int i = 0; i < 64; i++) |
| 360 |
ll++; |
| 361 |
[[ |
| 362 |
#if __cplusplus >= 201703L |
| 363 |
using omp: |
| 364 |
#else |
| 365 |
omp:: |
| 366 |
#endif |
| 367 |
sequence (directive (target), |
| 368 |
directive (teams distribute parallel for simd, |
| 369 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 370 |
collapse(1),dist_schedule(static, 16), |
| 371 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 372 |
lastprivate (l),schedule(static, 4),order(concurrent), |
| 373 |
safelen(8),simdlen(4),aligned(q: 32),if (simd: i3),nontemporal(ntm), |
| 374 |
allocate (omp_default_mem_alloc: f)))]] |
| 375 |
for (int i = 0; i < 64; i++) |
| 376 |
ll++; |
| 377 |
[[omp::sequence (directive (target), |
| 378 |
directive (teams distribute simd, |
| 379 |
private(p),firstprivate(f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl), |
| 380 |
collapse(1),dist_schedule(static, 16),order(concurrent), |
| 381 |
safelen(8),simdlen(4),aligned(q: 32),if(i3),nontemporal(ntm), |
| 382 |
allocate (omp_default_mem_alloc: f)))]] |
| 383 |
for (int i = 0; i < 64; i++) |
| 384 |
ll++; |
| 385 |
[[omp::directive (teams distribute parallel for, |
| 386 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 387 |
collapse(1),dist_schedule(static, 16), |
| 388 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 389 |
lastprivate (l),schedule(static, 4),copyin(t),allocate (f))]] |
| 390 |
for (int i = 0; i < 64; i++) |
| 391 |
ll++; |
| 392 |
[[omp::directive (teams distribute parallel for, |
| 393 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl), |
| 394 |
collapse(1),dist_schedule(static, 16),order(concurrent), |
| 395 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 396 |
lastprivate (l),schedule(static, 4),allocate (f))]] |
| 397 |
for (int i = 0; i < 64; i++) |
| 398 |
ll++; |
| 399 |
[[omp::directive (teams distribute parallel for simd, |
| 400 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 401 |
collapse(1),dist_schedule(static, 16), |
| 402 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 403 |
lastprivate (l),schedule(static, 4), |
| 404 |
safelen(8),simdlen(4),aligned(q: 32),if (simd: i3),nontemporal(ntm),copyin(t), |
| 405 |
allocate (f))]] |
| 406 |
for (int i = 0; i < 64; i++) |
| 407 |
ll++; |
| 408 |
[[omp::directive (teams distribute parallel for simd, |
| 409 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl), |
| 410 |
collapse(1),dist_schedule(static, 16), |
| 411 |
if (parallel: i2),num_threads (nth),proc_bind(spread), |
| 412 |
lastprivate (l),schedule(static, 4),order(concurrent), |
| 413 |
safelen(8),simdlen(4),aligned(q: 32),if (simd: i3),nontemporal(ntm), |
| 414 |
allocate (f))]] |
| 415 |
for (int i = 0; i < 64; i++) |
| 416 |
ll++; |
| 417 |
[[omp::directive (teams distribute simd, |
| 418 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 419 |
collapse(1),dist_schedule(static, 16),order(concurrent), |
| 420 |
safelen(8),simdlen(4),aligned(q: 32),if(i3),nontemporal(ntm),allocate(f))]] |
| 421 |
for (int i = 0; i < 64; i++) |
| 422 |
ll++; |
| 423 |
[[omp::directive (parallel master, |
| 424 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),reduction(+:r), |
| 425 |
num_threads (nth),proc_bind(spread),copyin(t),allocate (f))]] |
| 426 |
; |
| 427 |
[[omp::directive (parallel masked, |
| 428 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),reduction(+:r), |
| 429 |
num_threads (nth),proc_bind(spread),copyin(t),allocate (f),filter(d))]] |
| 430 |
; |
| 431 |
[[omp::directive (parallel, |
| 432 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),reduction(+:r), |
| 433 |
num_threads (nth),proc_bind(spread),copyin(t),allocate (f))]] |
| 434 |
; |
| 435 |
[[ |
| 436 |
#if __cplusplus >= 201703L |
| 437 |
using omp: |
| 438 |
#else |
| 439 |
omp:: |
| 440 |
#endif |
| 441 |
sequence (directive (taskgroup, task_reduction (+:r2),allocate (r2)), |
| 442 |
omp::directive (master taskloop, |
| 443 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied, if(taskloop: i1),final(fi),mergeable, priority (pp), |
| 444 |
reduction(default, +:r),in_reduction(+:r2),allocate (f)))]] |
| 445 |
for (int i = 0; i < 64; i++) |
| 446 |
ll++; |
| 447 |
[[ |
| 448 |
#if __cplusplus >= 201703L |
| 449 |
using omp: |
| 450 |
#else |
| 451 |
omp:: |
| 452 |
#endif |
| 453 |
sequence (directive (taskgroup, task_reduction (+:r2),allocate (r2)), |
| 454 |
omp::directive (masked taskloop, |
| 455 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied, if(taskloop: i1),final(fi),mergeable, priority (pp), |
| 456 |
reduction(default, +:r),in_reduction(+:r2),allocate (f),filter(d)))]] |
| 457 |
for (int i = 0; i < 64; i++) |
| 458 |
ll++; |
| 459 |
#if __cplusplus >= 201703L |
| 460 |
[[using omp:directive (master)]]; |
| 461 |
[[using omp:directive (masked)]]; |
| 462 |
[[using omp:directive (masked,filter(d))]]; |
| 463 |
#else |
| 464 |
[[omp::directive (master)]]; |
| 465 |
[[omp::directive (masked)]]; |
| 466 |
[[omp::directive (masked,filter(d))]]; |
| 467 |
#endif |
| 468 |
[[omp::sequence (omp::directive (taskgroup task_reduction (+:r2),allocate (r2)), |
| 469 |
directive (master taskloop simd, |
| 470 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),if(simd: i2),final(fi),mergeable,priority (pp), |
| 471 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),in_reduction(+:r2),nontemporal(ntm), |
| 472 |
order(concurrent),allocate (f)))]] |
| 473 |
for (int i = 0; i < 64; i++) |
| 474 |
ll++; |
| 475 |
[[omp::sequence (omp::directive (taskgroup task_reduction (+:r2),allocate (r2)), |
| 476 |
directive (masked taskloop simd, |
| 477 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),if(simd: i2),final(fi),mergeable,priority (pp), |
| 478 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),in_reduction(+:r2),nontemporal(ntm), |
| 479 |
order(concurrent),allocate (f),filter(d)))]] |
| 480 |
for (int i = 0; i < 64; i++) |
| 481 |
ll++; |
| 482 |
[[omp::directive (parallel master taskloop, |
| 483 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),final(fi),mergeable,priority (pp), |
| 484 |
reduction(default, +:r),if (parallel: i2),num_threads (nth),proc_bind(spread),copyin(t),allocate (f))]] |
| 485 |
for (int i = 0; i < 64; i++) |
| 486 |
ll++; |
| 487 |
[[omp::directive (parallel masked taskloop, |
| 488 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),final(fi),mergeable,priority (pp), |
| 489 |
reduction(default, +:r),if (parallel: i2),num_threads (nth),proc_bind(spread),copyin(t),allocate (f),filter(d))]] |
| 490 |
for (int i = 0; i < 64; i++) |
| 491 |
ll++; |
| 492 |
[[omp::directive (parallel master taskloop simd, |
| 493 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),if(simd: i2),final(fi),mergeable,priority (pp), |
| 494 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),nontemporal(ntm),if (parallel: i2),num_threads (nth),proc_bind(spread),copyin(t), |
| 495 |
order(concurrent),allocate (f))]] |
| 496 |
for (int i = 0; i < 64; i++) |
| 497 |
ll++; |
| 498 |
[[omp::directive (parallel masked taskloop simd, |
| 499 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),grainsize (g),collapse(1),untied,if(taskloop: i1),if(simd: i2),final(fi),mergeable,priority (pp), |
| 500 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),nontemporal(ntm),if (parallel: i2),num_threads (nth),proc_bind(spread),copyin(t), |
| 501 |
order(concurrent),allocate (f),filter(d))]] |
| 502 |
for (int i = 0; i < 64; i++) |
| 503 |
ll++; |
| 504 |
[[omp::sequence (directive (taskgroup,task_reduction (+:r2),allocate (r2)), |
| 505 |
directive (master taskloop, |
| 506 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied,if(i1),final(fi),mergeable,priority (pp), |
| 507 |
reduction(default, +:r),in_reduction(+:r2)))]] |
| 508 |
for (int i = 0; i < 64; i++) |
| 509 |
ll++; |
| 510 |
[[omp::sequence (directive (taskgroup,task_reduction (+:r2),allocate (r2)), |
| 511 |
directive (masked taskloop, |
| 512 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied,if(i1),final(fi),mergeable,priority (pp), |
| 513 |
reduction(default, +:r),in_reduction(+:r2),filter(d)))]] |
| 514 |
for (int i = 0; i < 64; i++) |
| 515 |
ll++; |
| 516 |
[[omp::sequence (omp::directive (taskgroup,task_reduction (+:r2),allocate (r2)), |
| 517 |
omp::directive (master taskloop simd, |
| 518 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied,if(i1),final(fi),mergeable,priority (pp), |
| 519 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),in_reduction(+:r2),nontemporal(ntm), |
| 520 |
order(concurrent),allocate (f)))]] |
| 521 |
for (int i = 0; i < 64; i++) |
| 522 |
ll++; |
| 523 |
[[omp::sequence (omp::directive (taskgroup,task_reduction (+:r2),allocate (r2)), |
| 524 |
omp::directive (masked taskloop simd, |
| 525 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied,if(i1),final(fi),mergeable,priority (pp), |
| 526 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),in_reduction(+:r2),nontemporal(ntm), |
| 527 |
order(concurrent),allocate (f),filter(d)))]] |
| 528 |
for (int i = 0; i < 64; i++) |
| 529 |
ll++; |
| 530 |
[[omp::directive (parallel master taskloop, |
| 531 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied if(i1),final(fi),mergeable priority (pp), |
| 532 |
reduction(default, +:r),num_threads (nth),proc_bind(spread),copyin(t),allocate (f))]] |
| 533 |
for (int i = 0; i < 64; i++) |
| 534 |
ll++; |
| 535 |
[[omp::directive (parallel masked taskloop, |
| 536 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied if(i1),final(fi),mergeable priority (pp), |
| 537 |
reduction(default, +:r),num_threads (nth),proc_bind(spread),copyin(t),allocate (f),filter(d))]] |
| 538 |
for (int i = 0; i < 64; i++) |
| 539 |
ll++; |
| 540 |
[[omp::directive (parallel master taskloop simd, |
| 541 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied if(i1),final(fi),mergeable priority (pp), |
| 542 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),nontemporal(ntm),num_threads (nth),proc_bind(spread),copyin(t), |
| 543 |
order(concurrent),allocate (f))]] |
| 544 |
for (int i = 0; i < 64; i++) |
| 545 |
ll++; |
| 546 |
[[omp::directive (parallel masked taskloop simd, |
| 547 |
private (p),firstprivate (f),lastprivate (l),shared (s),default(shared),num_tasks (nta),collapse(1),untied if(i1),final(fi),mergeable priority (pp), |
| 548 |
safelen(8),simdlen(4),linear(ll: 1),aligned(q: 32),reduction(default, +:r),nontemporal(ntm),num_threads (nth),proc_bind(spread),copyin(t), |
| 549 |
order(concurrent),allocate (f),filter(d))]] |
| 550 |
for (int i = 0; i < 64; i++) |
| 551 |
ll++; |
| 552 |
[[omp::directive (loop, bind(thread),order(concurrent), |
| 553 |
private (p),lastprivate (l),collapse(1),reduction(+:r))]] |
| 554 |
for (l = 0; l < 64; ++l) |
| 555 |
ll++; |
| 556 |
[[omp::directive (parallel loop, |
| 557 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),copyin(t),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 558 |
lastprivate (l),collapse(1),bind(parallel),order(concurrent),allocate (f))]] |
| 559 |
for (l = 0; l < 64; l++) |
| 560 |
ll++; |
| 561 |
[[omp::directive (parallel loop, |
| 562 |
private (p),firstprivate (f),if (parallel: i2),default(shared),shared(s),copyin(t),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 563 |
lastprivate (l),collapse(1),allocate (f))]] |
| 564 |
for (l = 0; l < 64; l++) |
| 565 |
ll++; |
| 566 |
[[omp::directive (teams loop, |
| 567 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl), |
| 568 |
collapse(1),lastprivate (l),bind(teams),allocate (f))]] |
| 569 |
for (l = 0; l < 64; ++l) |
| 570 |
; |
| 571 |
[[omp::directive (teams loop, |
| 572 |
private(p),firstprivate (f),shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl), |
| 573 |
collapse(1),lastprivate (l),order(concurrent),allocate (f))]] |
| 574 |
for (l = 0; l < 64; ++l) |
| 575 |
; |
| 576 |
[[omp::directive (target parallel loop, |
| 577 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 578 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 579 |
nowait depend(inout: dd[0]),lastprivate (l),bind(parallel),order(concurrent),collapse(1), |
| 580 |
allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]] |
| 581 |
for (l = 0; l < 64; ++l) |
| 582 |
; |
| 583 |
[[omp::directive (target parallel loop, |
| 584 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 585 |
if (parallel: i2),default(shared),shared(s),reduction(+:r),num_threads (nth),proc_bind(spread), |
| 586 |
nowait depend(inout: dd[0]),lastprivate (l),order(concurrent),collapse(1), |
| 587 |
allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]] |
| 588 |
for (l = 0; l < 64; ++l) |
| 589 |
; |
| 590 |
[[omp::directive (target teams loop, |
| 591 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 592 |
shared(s),default(shared),reduction(+:r),num_teams(nte-1:nte),thread_limit(tl),nowait,depend(inout: dd[0]), |
| 593 |
lastprivate (l),bind(teams),collapse(1), |
| 594 |
allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]] |
| 595 |
for (l = 0; l < 64; ++l) |
| 596 |
; |
| 597 |
[[omp::directive (target teams loop, |
| 598 |
device(d),map (tofrom: m),if (target: i1),private (p),firstprivate (f),defaultmap(tofrom: scalar),is_device_ptr (idp), |
| 599 |
shared(s),default(shared),reduction(+:r),num_teams(nte),thread_limit(tl),nowait,depend(inout: dd[0]), |
| 600 |
lastprivate (l),order(concurrent),collapse(1) |
| 601 |
allocate (omp_default_mem_alloc: f),in_reduction(+:r2),has_device_addr (hda))]] |
| 602 |
for (l = 0; l < 64; ++l) |
| 603 |
; |
| 604 |
[[omp::directive (critical)]] { |
| 605 |
} |
| 606 |
[[omp::directive (critical (foobar),hint(omp_sync_hint_none))]] |
| 607 |
; |
| 608 |
#if __cplusplus >= 201703L |
| 609 |
[[using omp:directive (taskwait, depend (inout: dd[0]))]] |
| 610 |
#else |
| 611 |
[[omp::directive (taskwait, depend (inout: dd[0]))]] |
| 612 |
#endif |
| 613 |
; |
| 614 |
[[omp::directive (taskgroup, task_reduction(+:r2),allocate (r2))]] |
| 615 |
; |
| 616 |
[[omp::directive (atomic, update,seq_cst,hint(omp_sync_hint_none))]] |
| 617 |
p++; |
| 618 |
[[omp::directive (atomic, read, hint(omp_sync_hint_none),relaxed)]] |
| 619 |
f = p; |
| 620 |
[[omp::directive (atomic,write, release hint(omp_sync_hint_none))]] |
| 621 |
p = f; |
| 622 |
[[omp::directive (flush)]] |
| 623 |
; |
| 624 |
[[omp::directive (flush, acq_rel)]] |
| 625 |
; |
| 626 |
[[omp::directive (flush, acquire)]] |
| 627 |
; |
| 628 |
[[omp::directive (flush, release)]] |
| 629 |
; |
| 630 |
[[omp::directive (flush, seq_cst)]] |
| 631 |
; |
| 632 |
[[omp::directive (flush (p, f))]] |
| 633 |
; |
| 634 |
[[omp::directive (simd, |
| 635 |
private (p),lastprivate (l),linear (ll:1),reduction(+:r),collapse(1),safelen(8),simdlen(4),aligned(q: 32), |
| 636 |
nontemporal(ntm),if(i1))]] |
| 637 |
for (int i = 0; i < 64; i++) |
| 638 |
[[omp::directive (ordered, simd)]] |
| 639 |
ll++; |
| 640 |
[[omp::directive (for, |
| 641 |
private (p),firstprivate (f),lastprivate (l),linear (ll:1),reduction(+:r),schedule(static, 4),collapse(1),nowait, |
| 642 |
ordered, allocate (f))]] |
| 643 |
for (int i = 0; i < 64; i++) |
| 644 |
[[omp::directive (ordered, threads)]] |
| 645 |
ll++; |
| 646 |
[[omp::directive(for, ordered (1))]] |
| 647 |
for (l = 0; l < 64; l++) |
| 648 |
{ |
| 649 |
[[omp::directive(ordered, depend (sink: l - 1))]]; |
| 650 |
[[omp::directive(ordered, depend (source))]]; |
| 651 |
} |
| 652 |
extern omp_depend_t depobj; |
| 653 |
[[omp::directive (depobj(depobj),depend(in : dd[0]))]]; |
| 654 |
[[omp::directive (parallel)]] { |
| 655 |
if (p) { |
| 656 |
[[omp::directive (cancel, parallel)]]; |
| 657 |
} else { |
| 658 |
[[omp::directive (cancellation point, parallel)]]; |
| 659 |
} |
| 660 |
} |
| 661 |
[[omp::directive (scope, private (p), firstprivate (f), reduction(+:r), nowait, |
| 662 |
allocate(omp_default_mem_alloc: r))]] |
| 663 |
; |
| 664 |
[[ |
| 665 |
#if __cplusplus >= 201703L |
| 666 |
using omp: |
| 667 |
#else |
| 668 |
omp :: |
| 669 |
#endif |
| 670 |
directive (scope, private (p), firstprivate (f), reduction(task, +:r), |
| 671 |
allocate (omp_default_mem_alloc: f))]] |
| 672 |
; |
| 673 |
extern int t2; |
| 674 |
[[omp::directive (threadprivate (t2))]]; |
| 675 |
extern int t2; |
| 676 |
[[omp::directive (declare reduction (dr: int: omp_out += omp_in),initializer (omp_priv = 0))]] |
| 677 |
; |
| 678 |
[[omp::directive (assume, no_openmp, no_openmp_routines, no_parallelism, |
| 679 |
absent (atomic, barrier, cancel, cancellation point), |
| 680 |
absent (critical, depobj), |
| 681 |
absent (distribute, flush, loop, masked, master, nothing, ordered), |
| 682 |
absent (parallel, scan, scope, section, sections, simd, single, task), |
| 683 |
absent (taskgroup, taskloop, taskwait, taskyield), |
| 684 |
absent (target, teams, for, error), holds (n1 < n2))]] |
| 685 |
if (0) |
| 686 |
; |
| 687 |
[[omp::sequence (omp::directive (assume, contains (simd)), |
| 688 |
omp::directive (for simd))]] |
| 689 |
for (int i = 0; i < 64; i++) |
| 690 |
; |
| 691 |
} |
| 692 |
|
| 693 |
void corge1 (); |
| 694 |
|
| 695 |
void |
| 696 |
corge () |
| 697 |
{ |
| 698 |
[[omp::directive (declare variant (corge1),match (construct={parallel,for}))]] |
| 699 |
extern void corge2 (); |
| 700 |
[[omp::sequence (directive (parallel), directive (for))]] |
| 701 |
for (int i = 0; i < 5; i++) |
| 702 |
corge2 (); |
| 703 |
[[omp::directive (declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch), |
| 704 |
omp::directive (declare simd,simdlen(8),notinbranch)]] |
| 705 |
extern int corge3 (int l, int *p); |
| 706 |
#if __cplusplus >= 201703L |
| 707 |
[[using omp:directive (declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch), |
| 708 |
directive (declare simd, simdlen(8),notinbranch)]] |
| 709 |
#else |
| 710 |
[[omp::directive (declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch), |
| 711 |
omp :: directive (declare simd, simdlen(8),notinbranch)]] |
| 712 |
#endif |
| 713 |
extern int corge4 (int l, int *p); |
| 714 |
[[omp::sequence (directive (declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch), |
| 715 |
omp::directive (declare simd, simdlen(8),notinbranch))]] |
| 716 |
extern int corge5 (int l, int *p); |
| 717 |
[[omp::directive (declare target)]]; |
| 718 |
extern void corge6 (); |
| 719 |
[[omp::directive (end declare target)]]; |
| 720 |
} |
| 721 |
|
| 722 |
int |
| 723 |
garply (int a, int *c, int *d, int *e, int *f) |
| 724 |
{ |
| 725 |
int i; |
| 726 |
[[omp::directive (simd, reduction (inscan, +: a))]] |
| 727 |
for (i = 0; i < 64; i++) |
| 728 |
{ |
| 729 |
d[i] = a; |
| 730 |
[[omp::directive (scan, exclusive (a))]] |
| 731 |
a += c[i]; |
| 732 |
} |
| 733 |
[[omp::directive (simd, reduction (inscan, +: a))]] |
| 734 |
for (i = 0; i < 64; i++) |
| 735 |
{ |
| 736 |
a += c[i]; |
| 737 |
#if __cplusplus >= 201703L |
| 738 |
[[using omp : sequence (sequence (directive (scan inclusive (a))))]] |
| 739 |
#else |
| 740 |
[[omp:: sequence (sequence (directive (scan inclusive (a))))]] |
| 741 |
#endif |
| 742 |
d[i] = a; |
| 743 |
} |
| 744 |
return a; |
| 745 |
} |