typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_null_allocator;
extern const omp_allocator_handle_t omp_default_mem_alloc;
extern const omp_allocator_handle_t omp_large_cap_mem_alloc;
extern const omp_allocator_handle_t omp_const_mem_alloc;
extern const omp_allocator_handle_t omp_high_bw_mem_alloc;
extern const omp_allocator_handle_t omp_low_lat_mem_alloc;
extern const omp_allocator_handle_t omp_cgroup_mem_alloc;
extern const omp_allocator_handle_t omp_pteam_mem_alloc;
extern const omp_allocator_handle_t omp_thread_mem_alloc;
void xxx(int argc) {
int fp; #pragma omp target reduction(+:fp)
for (int i = 0; i < 10; ++i)
;
}
void foo() {
}
bool foobool(int argc) {
return argc;
}
void foobar(int &ref) {
#pragma omp target reduction(+:ref)
foo();
}
struct S1; extern S1 a;
class S2 {
mutable int a;
S2 &operator+(const S2 &arg) { return (*this); }
public:
S2() : a(0) {}
S2(S2 &s2) : a(s2.a) {}
static float S2s; static const float S2sc; };
const float S2::S2sc = 0;
S2 b; const S2 ba[5]; class S3 {
int a;
public:
int b;
S3() : a(0) {}
S3(const S3 &s3) : a(s3.a) {}
S3 operator+(const S3 &arg1) { return arg1; }
};
int operator+(const S3 &arg1, const S3 &arg2) { return 5; }
S3 c; const S3 ca[5]; extern const int f; class S4 {
int a;
S4(); S4(const S4 &s4);
S4 &operator+(const S4 &arg) { return (*this); }
public:
S4(int v) : a(v) {}
};
S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
class S5 {
int a;
S5() : a(0) {} S5(const S5 &s5) : a(s5.a) {}
S5 &operator+(const S5 &arg);
public:
S5(int v) : a(v) {}
};
class S6 { #if __cplusplus >= 201103L
#endif
int a;
public:
S6() : a(6) {}
operator int() { return 6; }
} o;
S3 h, k;
#pragma omp threadprivate(h)
template <class T> T tmain(T argc) {
const T d = T(); const T da[5] = {T()}; T qa[5] = {T()};
T i, z;
T &j = i; S3 &p = k; const T &r = da[(int)i]; T &q = qa[(int)i]; T fl;
#pragma omp target reduction
foo();
#pragma omp target reduction +
foo();
#pragma omp target reduction(
foo();
#pragma omp target reduction(-
foo();
#pragma omp target reduction()
foo();
#pragma omp target reduction(*)
foo();
#pragma omp target reduction(\)
foo();
#pragma omp target reduction(& : argc
foo();
#pragma omp target reduction(| : argc,
foo();
#pragma omp target reduction(|| : argc ? i : argc)
foo();
#pragma omp target reduction(foo : argc)
foo();
#pragma omp target reduction(&& : argc, z)
foo();
#pragma omp target reduction(^ : T)
foo();
#pragma omp target reduction(+ : a, b, c, d, f)
foo();
#pragma omp target reduction(min : a, b, c, d, f)
foo();
#pragma omp target reduction(max : h.b)
foo();
#pragma omp target reduction(+ : ba)
foo();
#pragma omp target reduction(* : ca)
foo();
#pragma omp target reduction(- : da)
foo();
#pragma omp target reduction(^ : fl)
foo();
#pragma omp target reduction(&& : S2::S2s)
foo();
#pragma omp target reduction(&& : S2::S2sc)
foo();
#pragma omp target reduction(+ : h, k)
foo();
#pragma omp target reduction(+ : o)
foo();
#pragma omp parallel private(i), reduction(+ : j), reduction(+ : q)
foo();
#pragma omp parallel private(k)
#pragma omp target reduction(+ : p), reduction(+ : p)
foo();
#pragma omp target reduction(+ : p), reduction(+ : p)
foo();
#pragma omp target reduction(+ : r)
foo();
#pragma omp parallel shared(i)
#pragma omp target reduction(min : i)
#pragma omp parallel reduction(max : j)
foo();
#pragma omp parallel
#pragma omp for private(fl)
for (int i = 0; i < 10; ++i)
#pragma omp target reduction(+ : fl) allocate(omp_thread_mem_alloc: fl)
foo();
#pragma omp parallel
#pragma omp for reduction(- : fl)
for (int i = 0; i < 10; ++i)
#pragma omp target reduction(+ : fl)
foo();
return T();
}
namespace A {
double x;
#pragma omp threadprivate(x)
}
namespace B {
using A::x;
}
int main(int argc, char **argv) {
const int d = 5; const int da[5] = {0}; int qa[5] = {0};
S4 e(4);
S5 g(5);
int i, z;
int &j = i; S3 &p = k; const int &r = da[i]; int &q = qa[i]; float fl;
#pragma omp target reduction
foo();
#pragma omp target reduction +
foo();
#pragma omp target reduction(
foo();
#pragma omp target reduction(-
foo();
#pragma omp target reduction()
foo();
#pragma omp target reduction(*)
foo();
#pragma omp target reduction(\)
foo();
#pragma omp target reduction(foo : argc
foo();
#pragma omp target reduction(| : argc,
foo();
#pragma omp target reduction(|| : argc > 0 ? argv[1] : argv[2])
foo();
#pragma omp target reduction(~ : argc)
foo();
#pragma omp target reduction(&& : argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv)
foo();
#pragma omp target reduction(^ : S1)
foo();
#pragma omp target reduction(+ : a, b, c, d, f)
foo();
#pragma omp target reduction(min : z, a, b, c, d, f)
foo();
#pragma omp target reduction(max : h.b)
foo();
#pragma omp target reduction(+ : ba)
foo();
#pragma omp target reduction(* : ca)
foo();
#pragma omp target reduction(- : da)
foo();
#pragma omp target reduction(^ : fl)
foo();
#pragma omp target reduction(&& : S2::S2s)
foo();
#pragma omp target reduction(&& : S2::S2sc)
foo();
#pragma omp target reduction(& : e, g)
foo();
#pragma omp target reduction(+ : h, k, B::x)
foo();
#pragma omp target reduction(+ : o)
foo();
#pragma omp parallel private(i), reduction(+ : j), reduction(+ : q)
foo();
#pragma omp parallel private(k)
#pragma omp target reduction(+ : p), reduction(+ : p)
foo();
#pragma omp target reduction(+ : p), reduction(+ : p)
foo();
#pragma omp target reduction(+ : r)
foo();
#pragma omp parallel shared(i)
#pragma omp target reduction(min : i)
#pragma omp parallel reduction(max : j)
foo();
#pragma omp parallel
#pragma omp for private(fl)
for (int i = 0; i < 10; ++i)
#pragma omp target reduction(+ : fl)
foo();
#pragma omp parallel
#pragma omp for reduction(- : fl)
for (int i = 0; i < 10; ++i)
#pragma omp target reduction(+ : fl)
foo();
static int m;
#pragma omp target reduction(+ : m)
m++;
#pragma omp target reduction(task, + : m)
m++;
return tmain(argc) + tmain(fl); }