plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | target-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/target-2.C | 1,153 | utf_8 | 97d0747d71dfaa8c0f46c3fbdbae27d9 | // { dg-options "-O2 -fopenmp" }
// { dg-additional-sources "target-2-aux.cc" }
extern "C" void abort (void);
void
fn1 (double *x, double *y, int z)
{
int i;
for (i = 0; i < z; i++)
{
x[i] = i & 31;
y[i] = (i & 63) - 30;
}
}
double b[1024];
double (&br) [1024] = b;
double cbuf[1024];
double *... |
google | android | tls-init1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/tls-init1.C | 237 | utf_8 | 3f97f3f027f9dba0eb3df8a8ade40bc0 | // { dg-require-alias }
extern "C" void abort();
struct A
{
A();
int i;
};
extern A a;
#pragma omp threadprivate (a)
A a;
A &f()
{
return a;
}
int j;
A::A(): i(j) { }
int main()
{
j = 42;
if (f().i != 42)
abort ();
}
|
google | android | pr27337 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr27337.C | 1,137 | utf_8 | b7d3ba53e1428eb4ab2cf1cdcd576335 | // PR middle-end/27337
// { dg-do run }
#include <omp.h>
extern "C" void abort (void);
struct S
{
S ();
~S ();
S (const S &);
int i;
};
int n[3];
S::S () : i(18)
{
if (omp_get_thread_num () != 0)
#pragma omp atomic
n[0]++;
}
S::~S ()
{
if (omp_get_thread_num () != 0)
#pragma omp atomic
n[1]++;... |
google | android | ctor-11 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-11.C | 1,360 | utf_8 | b812dfb76303fb741edad434356f3e35 | // PR c++/36308
// { dg-do run }
#include <omp.h>
#include <assert.h>
#define N 10
struct B
{
static int icount;
static int ccount;
static int dcount;
static int xcount;
B ();
B (const B &);
virtual ~B ();
B& operator= (const B &);
void doit ();
static void clear () { icount = ccount = dcount = ... |
google | android | udr-12 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-12.C | 77 | utf_8 | f6be6e9b3438d74ae8712eb09af7e70d | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-2.C"
|
google | android | for-4 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-4.C | 5,639 | utf_8 | a255ea680f411888de34b07ee4819455 | // { dg-do run }
#include <string>
#include <cstdlib>
template <typename T>
class J
{
public:
typedef typename std::basic_string<T>::iterator iterator;
J(const iterator &x, const iterator &y) : b (x), e (y) {}
const iterator &begin ();
const iterator &end ();
private:
iterator b, e;
};
template <typename T... |
google | android | reduction-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/reduction-2.C | 849 | utf_8 | 6a724210e4cb30df7ade4ef7ee0aa83e | #include <omp.h>
#include <stdlib.h>
int
main (void)
{
int i = 0, j = 0, k = ~0, l;
double d = 1.0;
#pragma omp parallel num_threads(4)
{
#pragma omp single
{
i = 16;
k ^= (1 << 16);
d += 32.0;
}
#pragma omp for reduction(+:i) reduction(*:d) reduction(&:k)
for (l = 0; l < 4; l++)
... |
google | android | ctor-10 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-10.C | 1,128 | utf_8 | 75be4b24ec5c938326f469fafe3fb919 | // { dg-do run }
// { dg-require-effective-target tls_runtime }
#include <omp.h>
#include <assert.h>
#define N 10
#define THR 4
struct B
{
B();
B(const B &);
~B();
B& operator=(const B &);
void doit();
static B *base;
static B *threadbase;
#pragma omp threadprivate(threadbase)
};
B *B::base;
B *B::thr... |
google | android | for-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-3.C | 6,164 | utf_8 | ea264f143b0032900269cff3dd21e0cc | // { dg-do run }
#include <vector>
#include <cstdlib>
template <typename T>
class J
{
public:
typedef typename std::vector<T>::const_iterator const_iterator;
J(const const_iterator &x, const const_iterator &y) : b (x), e (y) {}
const const_iterator &begin ();
const const_iterator &end ();
private:
const_ite... |
google | android | udr-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-1.C | 2,432 | utf_8 | ca187a3885ec8be16b14570ad41616fc | // { dg-do run }
extern "C" void abort ();
struct S
{
int s;
void foo (S &x) { s += x.s; }
void foo (S &x, bool y) { s += x.s; if (y) abort (); }
S (const S &x) { s = x.s + 1; }
S (const S &x, bool y) { s = x.s + 2; if (y) abort (); }
S () { s = 6; }
~S ();
};
S::~S ()
{
if (s < 6) abort ();
s = -1... |
google | android | loop-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-8.C | 7,937 | utf_8 | 11ba7800c42755cc61bd9c9ef9173207 | #include <omp.h>
#include <stdlib.h>
#include <string.h>
int
test1 ()
{
short int buf[64], *p;
int i;
memset (buf, '\0', sizeof (buf));
#pragma omp parallel for
for (p = &buf[10]; p < &buf[54]; p++)
*p = 5;
for (i = 0; i < 64; i++)
if (buf[i] != 5 * (i >= 10 && i < 54))
abort ();
memset (buf,... |
google | android | simd12 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd12.C | 198 | utf_8 | 4943afa1e0250f27fcf341e04af0c9cb | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
#include "../libgomp.c/simd-16.c"
|
google | android | udr-18 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-18.C | 77 | utf_8 | d7264e491e72921e50e7c8b7657ca8ac | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-8.C"
|
google | android | ctor-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-8.C | 1,086 | utf_8 | cf8630c02b905d98e08a439066bb9815 | // { dg-do run }
// { dg-require-effective-target tls_runtime }
#include <omp.h>
#include <assert.h>
#define N 10
#define THR 4
struct B
{
B();
B(const B &);
~B();
B& operator=(const B &);
void doit();
};
static B *base;
static B *threadbase;
static unsigned cmask[THR];
static unsigned dmask[THR];
#pragm... |
google | android | atomic-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-7.C | 934 | utf_8 | 7c7e2695a56575284cb08fd139d305e3 | // { dg-do run }
extern "C" void abort (void);
template <typename S, typename T>
void
foo (void)
{
extern S l, m;
extern T i, j;
#pragma omp atomic read
i = l;
#pragma omp atomic read
m = j;
if (i != 77 || m != 88)
abort ();
#pragma omp atomic write
l = 1 + i + 6 * 1;
#pragma omp atomic... |
google | android | atomic-9 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-9.C | 2,682 | utf_8 | f25833e3fd46b52ba86a77e5fe12fd99 | // { dg-do run }
extern "C" void abort ();
int cnt;
int
foo ()
{
return cnt++;
}
template <typename T>
void
bar ()
{
extern T x;
T v, *p;
#pragma omp atomic update
x = x + 7;
#pragma omp atomic
x = x + 7 + 6;
#pragma omp atomic update
x = x + 2 * 3;
#pragma omp atomic
x = x * (2 - 1);
... |
google | android | atomic-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-5.C | 1,216 | utf_8 | deb63d2160d43f3e708a4363b1e0afaa | // { dg-do run }
extern "C" void abort (void);
template <typename T>
void
foo ()
{
extern T v, x1, x2, x3, x4, x5, x6;
#pragma omp atomic capture
v = ++x1;
if (!v)
abort ();
#pragma omp atomic capture
v = x2++;
if (v)
abort ();
#pragma omp atomic read
v = x3;
if (!v)
abort ();
#pragm... |
google | android | for-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-7.C | 1,356 | utf_8 | 7bc5327e132f991e5161670033919a4f | // PR c++/
// { dg-do run }
// { dg-options "-std=c++0x -fopenmp" }
extern "C" void abort ();
int cnt;
template <typename T>
void
f0 (T, int)
{
abort ();
}
template <>
void
f0<int> (int, int type)
{
if (type != 0)
abort ();
#pragma omp atomic
cnt++;
}
template <>
void
f0<const char *> (const char *, int t... |
google | android | pr26691 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr26691.C | 201 | utf_8 | ebbf9a13ba035141ba01b3281fd27fea | // PR c++/26691
struct A
{
int n;
A (int i = 3) : n (i) {}
};
int
main ()
{
A a;
int err = 0;
#pragma omp parallel private (a) reduction (+:err)
if (a.n != 3)
err++;
return err;
}
|
google | android | atomic-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-6.C | 847 | utf_8 | b033e9045b45805b9c4de42aa8f1eb17 | // { dg-do run }
extern "C" void abort (void);
long long l, m;
int i, j;
void
foo (void)
{
#pragma omp atomic read
i = l;
#pragma omp atomic read
m = j;
if (i != 77 || m != 88)
abort ();
#pragma omp atomic write
l = 1 + i + 6 * 1;
#pragma omp atomic write
j = 170 - 170 + m + 1 * 7;
#pr... |
google | android | cancel-parallel-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-parallel-1.C | 284 | utf_8 | cc0fc2d47b008343a233c7c3955be678 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <omp.h>
#include "cancel-test.h"
int
main ()
{
#pragma omp parallel num_threads (32)
{
S a;
#pragma omp cancel parallel
if (omp_get_cancellation ())
abort ();
}
S::verify ();
}
|
google | android | udr-13 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-13.C | 77 | utf_8 | 4fcc642bc9660d0cdf6d229e2d34e5ba | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-3.C"
|
google | android | loop-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-6.C | 303 | utf_8 | a143bccd15fda6acb915e48bf51be423 | // { dg-do run }
extern "C" void abort (void);
volatile int count;
static int test(void)
{
return ++count > 0;
}
int i;
int main()
{
#pragma omp for lastprivate (i)
for (i = 0; i < 10; ++i)
{
if (test())
continue;
abort ();
}
if (i != count)
abort ();
return 0;
}
|
google | android | atomic-14 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-14.C | 2,054 | utf_8 | f5aa3b6a543d3042289d53904701574b | // { dg-do run }
extern "C" void abort (void);
int x = 6;
int
main ()
{
int v, l = 2, s = 1;
#pragma omp atomic seq_cst
x = -3 + x;
#pragma omp atomic read seq_cst
v = x;
if (v != 3)
abort ();
#pragma omp atomic seq_cst update
x = 3 * 2 * 1 + x;
#pragma omp atomic read, seq_cst
v = x;
... |
google | android | atomic-13 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-13.C | 1,220 | utf_8 | a56e4a1dad7c21fecfbf5dd26cb1f86a | // { dg-do run }
extern "C" void abort ();
int cnt;
int
foo ()
{
return cnt++;
}
template <typename T>
void
bar ()
{
extern T x;
T v, *p;
p = &x;
#pragma omp atomic update
p[foo (), 0] = 16 + 6 - p[foo (), 0];
#pragma omp atomic read
v = x;
if (cnt != 2 || v != 16)
abort ();
#pragma omp a... |
google | android | ctor-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-1.C | 767 | utf_8 | dd14bc7576437b98c5c00026c7f5d61f | // { dg-do run }
#include <omp.h>
#include <assert.h>
struct B
{
static int icount;
static int dcount;
static int xcount;
B();
B(const B &);
~B();
B& operator=(const B &);
void doit();
};
int B::icount;
int B::dcount;
int B::xcount;
B::B()
{
#pragma omp atomic
icount++;
}
B::~B()
{
#pragm... |
google | android | simd-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-6.C | 1,428 | utf_8 | 4c94d5cac60e507291540a0f2e3436c1 | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
struct S
{
int s;
S () : s (0) {}
S (int x) : s (x) {}
~S () {}
};
#pra... |
google | android | cancel-parallel-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-parallel-2.C | 949 | utf_8 | fac5b60f692f4a12883f5764a91ca20e | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <unistd.h>
#include <omp.h>
#include "cancel-test.h"
static void
foo (int *x)
{
S a, b, c;
#pragma omp parallel firstprivate(x, c) num_threads (32) private (b)
{
S d;
b.bump ();
c.bump ();
int thr = omp_get_thread_num... |
google | android | reduction-4 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/reduction-4.C | 933 | utf_8 | a1833069552b16c28ced3f3d98d919bd | // { dg-do run }
extern "C" void abort (void);
template <typename I, typename F>
void
foo ()
{
I j = -10000;
F f = 1024.0;
int i;
#pragma omp parallel for reduction (min:f) reduction (max:j)
for (i = 0; i < 4; i++)
switch (i)
{
case 0:
if (j < -16) j = -16; break;
case 1:
if (f > -2.0) f = ... |
google | android | pr48869 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr48869.C | 1,023 | utf_8 | 6bc7a2a67f411f00aa39c8b72e8a287d | // PR c++/48869
// { dg-do run }
// { dg-options "-std=gnu++0x" }
template <const int N>
struct A
{
A () {}
A (const A&) = delete;
void foo () {}
~A () {}
};
template <const int N>
struct B
{
B () {}
B (const B&) {}
void foo () {}
~B () {}
};
void __attribute__((used))
foo (B<6> b6)
{
#pragma omp t... |
google | android | loop-9 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-9.C | 9,594 | utf_8 | f4c9230a7d51f0d2f7b5f5a32fdaf7ba | // { dg-do run }
#include <omp.h>
extern "C" void abort ();
#define LLONG_MAX __LONG_LONG_MAX__
#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
#define INT_MAX __INT_MAX__
int arr[6 * 5];
void
set (int loopidx, int idx)
{
#pragma omp atomic
arr[loopidx * 5 + idx]++;
}
#define check(var, val, loopidx, idx) \
if (var... |
google | android | for-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-5.C | 8,856 | utf_8 | 575bf3b3886e4be78de211d7420de600 | // { dg-do run }
typedef __PTRDIFF_TYPE__ ptrdiff_t;
extern "C" void abort ();
template <typename T>
class I
{
public:
typedef ptrdiff_t difference_type;
I ();
~I ();
I (T *);
I (const I &);
T &operator * ();
T *operator -> ();
T &operator [] (const difference_type &) const;
I &operator = (const I &... |
google | android | udr-14 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-14.C | 77 | utf_8 | 62832d167f38de69c84a88f2ba464ca8 | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-4.C"
|
google | android | cancel-parallel-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-parallel-3.C | 850 | utf_8 | b63b7c5e4846e9b37ecd72ca0699c154 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <omp.h>
#include <unistd.h>
#include "cancel-test.h"
static inline void
do_some_work (void)
{
asm volatile ("" : : : "memory");
}
void
foo ()
{
S a, b, c;
omp_set_dynamic (0);
omp_set_schedule (omp_sched_static, 1);
{
S d;
... |
google | android | pr38650 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr38650.C | 833 | utf_8 | d65773670d221b74aa6b327a1de57dff | // PR c++/38650
// { dg-do run }
#include <cstdlib>
int e;
int
main ()
{
volatile int i, j = 10;
e = 0;
#pragma omp parallel for reduction(+:e)
for (i = 0; i < j; i += 1)
e++;
if (e != 10)
std::abort ();
e = 0;
#pragma omp parallel for reduction(+:e)
for (i = 0; i < j; ++i)
e++;
if (e != 10... |
google | android | nested-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/nested-1.C | 353 | utf_8 | 1af322f02a0df2cf1f3c2c01d328da07 | // { dg-do run }
extern "C" void abort(void);
#define N 1000
int foo()
{
int i = 0, j;
#pragma omp parallel for num_threads(2) shared (i)
for (j = 0; j < N; ++j)
{
#pragma omp parallel num_threads(1) shared (i)
{
#pragma omp atomic
i++;
}
}
return i;
}
int main()
{
if (foo() !... |
google | android | collapse-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/collapse-2.C | 11,762 | utf_8 | 95b1d349c03cc5d01483df22751c0183 | // { dg-do run }
#include <omp.h>
typedef __PTRDIFF_TYPE__ ptrdiff_t;
extern "C" void abort ();
template <typename T>
class I
{
public:
typedef ptrdiff_t difference_type;
I ();
~I ();
I (T *);
I (const I &);
T &operator * ();
T *operator -> ();
T &operator [] (const difference_type &) const;
I &oper... |
google | android | cancel-for-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-for-1.C | 443 | utf_8 | 40e00f7e2acb12d4a4edc44e244a8475 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <omp.h>
#include "cancel-test.h"
int
main ()
{
{
S c;
#pragma omp parallel num_threads (32)
{
S a, b;
int i;
for (i = 0; i < 1000; ++i)
{
S d;
#pragma omp cancel for
if (omp_get_cancellation ())
... |
google | android | simd-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-2.C | 677 | utf_8 | 75cdbf2afdbed54069f0b9503c9e3f8f | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
__UINTPTR_TYPE__ arr[1027];
__attribute__((noinline, noclone)) void
foo ()
{
int i, v;
#pragma omp simd private (v) safelen(1... |
google | android | udr-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-3.C | 3,307 | utf_8 | 9fbc10fae7a305b6bd8fea38417fa68d | // { dg-do run }
extern "C" void abort ();
void
dblinit (double *p)
{
*p = 2.0;
}
namespace NS
{
template <int N>
struct U
{
void foo (U &, bool);
U ();
};
template <int N>
struct S
{
int s;
#pragma omp declare reduction (foo : U<0>, S : omp_out.foo (omp_in, false))
#pragma omp de... |
google | android | pr26943 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr26943.C | 651 | utf_8 | f22ddc230a1c3c9064a657fa7fa843e6 | // PR c++/26943
// { dg-do run }
#include <assert.h>
#include <unistd.h>
struct S
{
public:
int x;
S () : x(-1) { }
S (const S &);
S& operator= (const S &);
void test ();
};
static volatile int hold;
S::S (const S &s)
{
#pragma omp master
sleep (1);
assert (s.x == -1);
x = 0;
}
S&
... |
google | android | simd11 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd11.C | 198 | utf_8 | 25dbd1440a09a94fee9305462af883ac | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
#include "../libgomp.c/simd-15.c"
|
google | android | parallel-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/parallel-1.C | 541 | utf_8 | b48459c2120edb3479414c307d6516ce | #include <omp.h>
extern "C" void abort (void);
int
foo (void)
{
return 10;
}
main ()
{
int A = 0;
#pragma omp parallel if (foo () > 10) shared (A)
{
A = omp_get_num_threads ();
}
if (A != 1)
abort ();
#pragma omp parallel if (foo () == 10) num_threads (3) shared (A)
{
A = omp... |
google | android | simd-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-5.C | 973 | utf_8 | 5cb0529b5e23b1803304ac1b68d77d2d | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
struct S
{
int s;
S () : s (0) {}
~S () {}
};
#pragma omp declare reducti... |
google | android | task-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-8.C | 792 | utf_8 | c2392e28255d8ad9d2a56b86eddef4b4 | // { dg-do run }
#include <omp.h>
#include <cstdlib>
int errval;
int
main ()
{
int e;
#pragma omp parallel shared(errval)
{
if (omp_in_final ())
#pragma omp atomic write
errval = 1;
#pragma omp task if (0) shared(errval)
{
if (omp_in_final ())
#pragma omp atomic write
errval = 1;
#... |
google | android | atomic-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-8.C | 2,609 | utf_8 | d9f74ad4b5095a67f1961e49e03171fb | // { dg-do run }
extern "C" void abort ();
int x = 6, cnt;
int
foo ()
{
return cnt++;
}
int
main ()
{
int v, *p;
#pragma omp atomic update
x = x + 7;
#pragma omp atomic
x = x + 7 + 6;
#pragma omp atomic update
x = x + 2 * 3;
#pragma omp atomic
x = x * (2 - 1);
#pragma omp atomic read
... |
google | android | for-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-6.C | 1,333 | utf_8 | ecf732e204a30d14c98745b74707a00c | // PR c++/38348
// { dg-do run }
extern "C" void abort ();
int cnt;
template <typename T>
void
f0 (T, int)
{
abort ();
}
template <>
void
f0<int> (int, int type)
{
if (type != 0)
abort ();
#pragma omp atomic
cnt++;
}
template <>
void
f0<const char *> (const char *, int type)
{
if (type != 1)
abort (... |
google | android | simd-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-1.C | 1,435 | utf_8 | 1ec17db8b67286146e180d3bd732339a | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
int b[1024] __attribute__((aligned (32))) = { 1 };
int k, m;
struct U { U (); ~... |
google | android | pr63248 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr63248.C | 763 | utf_8 | 512663e491037801da2280baf0593ee3 | // PR c++/63248
// { dg-do run }
int *v;
template <typename T>
T
foo (T A, T B)
{
T a = 2;
T b = 4;
#pragma omp target map(v[a:b])
v[a] = 1;
#pragma omp target map(v[A:B])
v[a] = 2;
#pragma omp target map(A)
A = 19;
return A;
}
template <int N>
int
bar (int A, int B)
{
#pragma omp target map(A)
A = ... |
google | android | atomic-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-2.C | 2,636 | utf_8 | 11dca764f708d500baba4ceaa6de9b54 | // { dg-do run }
extern "C" void abort (void);
int x = 6;
float y;
int
main (void)
{
int v;
float f;
#pragma omp atomic read
v = x;
if (v != 6)
abort ();
#pragma omp atomic write
x = 17;
#pragma omp atomic read
v = x;
if (v != 17)
abort ();
#pragma omp atomic update
x++;
#pragm... |
google | android | pr39573 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr39573.C | 1,255 | utf_8 | 32eed8fe7a118de6fa22a9b1ffec6c53 | // PR middle-end/39573
// { dg-do run }
int z;
void __attribute__((noinline))
bar (int *x)
{
#pragma omp atomic
z += x[2];
x[2] += x[3];
}
int
main ()
{
int i;
#pragma omp parallel for
for (i = 0; i < 65536; i++)
{
int x[] =
{
0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0... |
google | android | for-9 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-9.C | 574 | utf_8 | 65fa3e98a17cea01d12feab6f669d842 | extern "C" void abort ();
#define M(x, y, z) O(x, y, z)
#define O(x, y, z) x ## _ ## y ## _ ## z
#define F parallel for
#define G pf
#include "../libgomp.c/for-1.h"
#undef F
#undef G
#define F for
#define G f
#include "../libgomp.c/for-1.h"
#undef F
#undef G
int
main ()
{
if (test_pf_static ()
|| test_pf_st... |
google | android | loop-14 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-14.C | 55 | utf_8 | bd2497c91aee23ff4f70e90b16e25413 | /* { dg-do run } */
#include "../libgomp.c/loop-14.c"
|
google | android | task-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-2.C | 1,003 | utf_8 | 5532f36e28daf97021228ebf72885697 | // { dg-do run }
#include <omp.h>
extern "C" void abort ();
int l = 5;
int
foo (int i)
{
int j = 7;
const int k = 8;
#pragma omp task firstprivate (i) shared (j, l)
{
#pragma omp critical
{
j += i;
l += k;
}
}
i++;
#pragma omp task firstprivate (i) shared (j, l)
{
#pragma omp cr... |
google | android | sections-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/sections-1.C | 1,592 | utf_8 | 563f8ced1bddfb533121dc40dc3d8a33 | /******************************************************************************
* FILE: omp_workshare2.c
* DESCRIPTION:
* OpenMP Example - Sections Work-sharing - C/C++ Version
* In this example, the OpenMP SECTION directive is used to assign
* different array operations to threads that execute a SECTION. Each
*... |
google | android | single-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/single-2.C | 409 | utf_8 | fa90d4613f21c2fc2203f662585b40a3 | extern "C" void abort (void);
struct X
{
int a;
char b;
int c;
};
main()
{
int i = 0;
struct X x;
int bad = 0;
#pragma omp parallel private (i, x) shared (bad)
{
i = 5;
#pragma omp single copyprivate (i, x)
{
i++;
x.a = 23;
x.b = 42;
x.c = 26;
}
if (i != 6 || x.a !... |
google | android | atomic-11 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-11.C | 1,930 | utf_8 | 5562ceebc0054102930e3944e3d8cea0 | // { dg-do run }
extern "C" void abort (void);
template <typename T>
void
foo ()
{
extern T x;
T v, l = 2, s = 1;
#pragma omp atomic
x = -3 + x;
#pragma omp atomic read
v = x;
if (v != 3)
abort ();
#pragma omp atomic update
x = 3 * 2 * 1 + x;
#pragma omp atomic read
v = x;
if (v !=... |
google | android | reduction-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/reduction-1.C | 615 | utf_8 | a594cebdf052900dd0c8792068e14d85 | #include <omp.h>
#include <stdlib.h>
int
main (void)
{
int i = 0, j = 0, k = ~0;
double d = 1.0;
#pragma omp parallel num_threads(4) reduction(+:i) reduction(*:d) reduction(&:k)
{
if (i != 0 || d != 1.0 || k != ~0)
#pragma omp atomic
j |= 1;
if (omp_get_num_threads () != 4)
#pragma omp atomic
... |
google | android | atomic-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-1.C | 766 | utf_8 | ba5ed16a48b3a78511b4913cdd4d7617 | // PR c++/33894
// { dg-do run }
// { dg-options "-O2" }
extern "C" void abort ();
int check;
template<typename T> void
foo ()
{
#pragma omp atomic
check |= sizeof (T);
}
template<typename T> void
bar (T *x, T y)
{
#pragma omp atomic
*x += y;
}
template<typename T> void
baz ()
{
#pragma omp atomic
chec... |
google | android | udr-16 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-16.C | 77 | utf_8 | c418a045ad06e5f96e8494bb4f4f2dcf | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-6.C"
|
google | android | atomic-12 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-12.C | 1,148 | utf_8 | 60fb93a6f619d4375a1224303e0884ea | // { dg-do run }
extern "C" void abort ();
int x = 6, cnt;
int
foo ()
{
return cnt++;
}
int
main ()
{
int v, *p;
p = &x;
#pragma omp atomic update
p[foo (), 0] = 16 + 6 - p[foo (), 0];
#pragma omp atomic read
v = x;
if (cnt != 2 || v != 16)
abort ();
#pragma omp atomic capture
v = p[foo... |
google | android | task-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-1.C | 1,388 | utf_8 | 4755f8276f35f740d59135af4e5242f0 | extern "C" void abort ();
int a = 18;
void
f1 (int i, int j, int k)
{
int l = 6, m = 7, n = 8;
#pragma omp task private(j, m) shared(k, n)
{
j = 6;
m = 5;
if (++a != 19 || ++i != 9 || j != 6 || ++l != 7 || m != 5 || ++n != 9)
#pragma omp atomic
k++;
}
#pragma omp taskwait
if (a != 19 || i !... |
google | android | loop-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-5.C | 320 | utf_8 | 415849793602a06b6efea7e3cfc289f6 | extern "C" void abort ();
int check;
int f1() { check |= 1; return 1; }
int f2() { check |= 2; return 11; }
int f3() { check |= 4; return 2; }
int a[12];
int main()
{
#pragma omp for
for (int i = f1(); i <= f2(); i += f3())
a[i] = 1;
for (int i = 0; i < 12; ++i)
if (a[i] != (i & 1))
abort ();
}
|
google | android | master-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/master-1.C | 237 | utf_8 | f228bd69972ac57d7838e7a77158e192 | // PR c++/24734
// { dg-do run }
extern "C" void abort ();
int i;
template<int> void
foo ()
{
#pragma omp parallel
{
#pragma omp master
i++;
}
}
int
main ()
{
foo<0> ();
if (i != 1)
abort ();
return 0;
}
|
google | android | cancel-for-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-for-2.C | 2,806 | utf_8 | 1390d00e8471a40c55b009573ddeaf72 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <omp.h>
#include "cancel-test.h"
__attribute__((noinline, noclone)) int
foo (int *x)
{
S a, b, c, d, e;
int v = 0, w = 0;
#pragma omp parallel num_threads (32) shared (v, w) private (c, d) firstprivate (e)
{
S g;
int i;
... |
google | android | task-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/task-5.C | 977 | utf_8 | 6cc1ae8058007b8afab8f6686080f1dc | // { dg-do run }
extern "C" void abort ();
struct A
{
A ();
~A ();
A (const A &);
unsigned long l;
};
int e;
A::A ()
{
l = 17;
}
A::~A ()
{
if (l > 130)
#pragma omp atomic
e++;
}
A::A (const A &r)
{
l = r.l + 64;
}
void
check (int i, A &a, int j, A &b)
{
if (i != 6 || a.l != 21 + 64 || ... |
google | android | affinity-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/affinity-1.C | 105 | utf_8 | 2cf1f823e10665f77ed445bc524240e7 | // { dg-do run }
// { dg-set-target-env-var OMP_PROC_BIND "true" }
#include "../libgomp.c/affinity-1.c"
|
google | android | pr49043 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr49043.C | 292 | utf_8 | d566c37edb50b4aac9c2b4fa4d381670 | // PR c++/49043
// { dg-options "-std=c++0x" }
// { dg-do run }
extern "C" void abort ();
int
main ()
{
int r = 0;
#pragma omp parallel for reduction (+:r)
for (int a = 0; a < 10; ++a)
{
auto func = [=] () { return a; };
r += func ();
}
if (r != 45)
abort ();
}
|
google | android | cancel-taskgroup-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-taskgroup-1.C | 116 | utf_8 | 64cf98b489f8246a4393a49439157721 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include "../libgomp.c/cancel-taskgroup-1.c"
|
google | android | ctor-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-5.C | 701 | utf_8 | 72da6a7795f81709b3fedf23755dfe73 | // { dg-do run }
// { dg-require-effective-target tls_runtime }
#include <omp.h>
#include <assert.h>
struct B
{
static int count;
static B *expected;
B& operator=(const B &);
};
int B::count;
B * B::expected;
static B thr;
#pragma omp threadprivate(thr)
B& B::operator= (const B &b)
{
assert (&b == expecte... |
google | android | loop-15 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-15.C | 55 | utf_8 | a4487425f45f36fbc979c0331aa6fb35 | /* { dg-do run } */
#include "../libgomp.c/loop-15.c"
|
google | android | pr24455 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr24455.C | 395 | utf_8 | e922df8c56b5c5885b9aa8d370725ea9 | // { dg-do run }
// { dg-additional-sources pr24455-1.C }
// { dg-require-effective-target tls_runtime }
// { dg-options "-fno-extern-tls-init" }
extern "C" void abort (void);
extern int i;
#pragma omp threadprivate(i)
int main()
{
i = 0;
#pragma omp parallel default(none) num_threads(10) copyin(i)
{
i+... |
google | android | cancel-taskgroup-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/cancel-taskgroup-3.C | 998 | utf_8 | 32ea51703b06ba963528c7c41d454527 | // { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <unistd.h>
#include <omp.h>
#include "cancel-test.h"
void
foo ()
{
S a, b, c, d, e, f;
#pragma omp parallel private (c, d) firstprivate (e, f)
#pragma omp taskgroup
{
c.bump ();
e.bump ();
#pragma omp task firstprivate ... |
google | android | pr30703 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr30703.C | 819 | utf_8 | e31d9cc17430983d0904112f3275e13c | // PR c++/30703
// { dg-do run }
#include <omp.h>
extern "C" void abort ();
int ctor, cctor, dtor;
struct A
{
A();
A(const A &);
~A();
int i;
};
A::A()
{
#pragma omp atomic
ctor++;
}
A::A(const A &r)
{
i = r.i;
#pragma omp atomic
cctor++;
}
A::~A()
{
#pragma omp atomic
dtor++;
}
void
foo (A a, A... |
google | android | udr-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-7.C | 1,128 | utf_8 | 18bc8983002568fa3de20df48f9b2c2f | // { dg-do run }
extern "C" void abort ();
struct S
{
int s;
void foo (S &x) { s += x.s; }
S (const S &x) { s = x.s + 1; }
S () { s = 6; }
~S () {}
};
void
bar (S &x, S &y)
{
if (x.s != 6 || y.s != 6)
abort ();
x.s = 8;
}
#pragma omp declare reduction (foo: S: omp_out.foo (omp_in)) \
initializer ... |
google | android | ctor-12 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-12.C | 880 | utf_8 | 223d0cf490744b1bfb4f1cc606e36f45 | // PR c++/36308
// { dg-do run }
extern "C" void abort ();
static int n;
struct A
{
A ()
{
l = 0;
#pragma omp atomic
ctors++;
}
A (const A &x)
{
l = x.l;
#pragma omp atomic
copyctors++;
}
virtual A& operator= (const A &x)
{
l = x.l;
#pragma omp atomic
assigno... |
google | android | loop-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-1.C | 2,206 | utf_8 | b2840419f7f70553698eb41dcd3bd6c6 | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <omp.h>
#define MAX 1000
void main1()
{
int i, N1, N2, step;
int a[MAX], b[MAX];
N1 = rand () % 13;
N2 = rand () % (MAX - 51) + 50;
step = rand () % 7 + 1;
printf ("N1 = %d\nN2 = %d\nstep = %d\n", N1, N2, step);
for (i = N1; i <= N2;... |
google | android | udr-11 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-11.C | 77 | utf_8 | b37d8cf5aa289c7aa3234a95a37ee6c7 | // { dg-do run }
// { dg-options "-fopenmp -std=c++11" }
#include "udr-1.C"
|
google | android | udr-5 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-5.C | 972 | utf_8 | 237e9df073e4ccf5adf875c41f053cb2 | // { dg-do run }
extern "C" void abort ();
struct S
{
void foo ()
{
S s;
int j = 0;
#pragma omp declare reduction (bar : int : omp_out += omp_in)
#pragma omp parallel reduction (bar : s) reduction(S::operator+ : j)
s.a = 4, j = 1;
if (s.a != 4 * j) abort ();
}
#pragma omp declare reduc... |
google | android | pr56217 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr56217.C | 545 | utf_8 | d2e531409ec3708a503019e5aec4cfd8 | // PR middle-end/56217
// { dg-do run }
// { dg-options "-std=c++0x" }
extern "C" void abort ();
template <typename T>
struct ptr {
T *p;
ptr () : p () {}
ptr (ptr &) = delete;
ptr (ptr &&o) : p(o) {}
operator T * () { return p; }
};
int a[6] = { 100, 101, 102, 103, 104, 105 };
static ptr<int>
f ()
{
pt... |
google | android | shared-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/shared-2.C | 662 | utf_8 | 7805db616bcb6a1c8b84054f686fa607 | extern "C" void abort (void);
void
parallel (int a, int b)
{
int bad, LASTPRIV, LASTPRIV_SEC;
int i;
a = b = 3;
bad = 0;
#pragma omp parallel firstprivate (a,b) shared (bad) num_threads (5)
{
if (a != 3 || b != 3)
bad = 1;
#pragma omp for lastprivate (LASTPRIV)
for (i = 0; i < 10; ... |
google | android | simd13 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd13.C | 198 | utf_8 | 96c3fedeca45853d33c4b89a99b13bf7 | // { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
#include "../libgomp.c/simd-17.c"
|
google | android | pr35185 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr35185.C | 339 | utf_8 | f288ebef02de5e114b5c8526bad9dc19 | // PR middle-end/35185
// { dg-do run }
extern "C" void abort ();
struct S
{
S () : s (6) {}
~S () {}
int s;
};
__attribute__((noinline))
bool
bar (S s)
{
return s.s != 6;
}
int
main ()
{
S s;
int err = 0;
#pragma omp parallel shared (s)
{
if (bar (s))
#pragma omp atomic
err++;
}
if (er... |
google | android | ctor-9 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-9.C | 990 | utf_8 | 0bd7fe39119bfc0574561c1e381edc5b | // { dg-do run }
// { dg-require-effective-target tls_runtime }
#include <omp.h>
#include <assert.h>
#define N 10
#define THR 4
struct B
{
B& operator=(const B &);
};
static B *base;
static B *threadbase;
static int singlethread;
#pragma omp threadprivate(threadbase)
static unsigned cmask[THR];
B& B::operator= ... |
google | android | atomic-4 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-4.C | 2,746 | utf_8 | f944acede3f9beeaf281ef9282c0ff44 | // { dg-do run }
extern "C" void abort (void);
template <typename T, typename T2>
int
foo (void)
{
extern T x;
extern T2 y;
T v;
T2 f;
#pragma omp atomic read
v = x;
if (v != 6)
abort ();
#pragma omp atomic write
x = 17;
#pragma omp atomic read
v = x;
if (v != 17)
abort ();
#pragm... |
google | android | loop-12 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-12.C | 9,594 | utf_8 | 2b91a43b8cbf2e2039ddc01ebeadd690 | // { dg-do run }
#include <omp.h>
extern "C" void abort ();
#define LLONG_MAX __LONG_LONG_MAX__
#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
#define INT_MAX __INT_MAX__
int arr[6 * 5];
void
set (int loopidx, int idx)
{
#pragma omp atomic
arr[loopidx * 5 + idx]++;
}
#define check(var, val, loopidx, idx) \
if (var... |
google | android | udr-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-2.C | 1,884 | utf_8 | d781578fb089699e0ef346a39952f9ba | // { dg-do run }
extern "C" void abort ();
namespace NS
{
struct U
{
void foo (U &, bool);
U ();
};
struct S
{
int s;
#pragma omp declare reduction (foo : U, S : omp_out.foo (omp_in, false))
#pragma omp declare reduction (foo : int : omp_out += omp_in) \
initializer (omp_priv = int ())
... |
google | android | for-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-1.C | 8,472 | utf_8 | e1ee4867ce68141a641f925070e14fdc | // { dg-do run }
typedef __PTRDIFF_TYPE__ ptrdiff_t;
extern "C" void abort ();
template <typename T>
class I
{
public:
typedef ptrdiff_t difference_type;
I ();
~I ();
I (T *);
I (const I &);
T &operator * ();
T *operator -> ();
T &operator [] (const difference_type &) const;
I &operator = (const I &... |
google | android | for-11 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-11.C | 2,279 | utf_8 | dfe85033dffc4c50dfe322315583cac7 | extern "C" void abort ();
#define M(x, y, z) O(x, y, z)
#define O(x, y, z) x ## _ ## y ## _ ## z
#pragma omp declare target
#define F distribute
#define G d
#define S
#define N(x) M(x, G, normal)
#include "../libgomp.c/for-2.h"
#undef S
#undef N
#undef F
#undef G
#define F distribute
#define G d_ds128
#define S dis... |
google | android | loop-13 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-13.C | 55 | utf_8 | d8e6af7b0afca5e42961fa079dbec65e | /* { dg-do run } */
#include "../libgomp.c/loop-13.c"
|
google | android | atomic-15 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/atomic-15.C | 2,122 | utf_8 | 156c6a231b71803eea67391fb8826eab | // { dg-do run }
extern "C" void abort (void);
template <typename T>
void
foo ()
{
extern T x;
T v, l = 2, s = 1;
#pragma omp atomic seq_cst
x = -3 + x;
#pragma omp atomic read seq_cst
v = x;
if (v != 3)
abort ();
#pragma omp atomic seq_cst update
x = 3 * 2 * 1 + x;
#pragma omp atomic re... |
google | android | copyin-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/copyin-2.C | 561 | utf_8 | 10ed00f527e0f70026947c8f56627828 | // { dg-do run }
// { dg-require-effective-target tls_runtime }
#include <omp.h>
extern "C" void abort (void);
struct S { int t; char buf[64]; } thr = { 32, "" };
#pragma omp threadprivate (thr)
int
main (void)
{
int l = 0;
omp_set_dynamic (0);
omp_set_num_threads (6);
#pragma omp parallel copyin (thr) redu... |
google | android | pr24455-1 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/pr24455-1.C | 112 | utf_8 | c57d4e906a72b08e5f49bef40306b63f | // { dg-do compile }
// { dg-require-effective-target tls }
extern int i;
#pragma omp threadprivate (i)
int i;
|
google | android | udr-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-6.C | 1,211 | utf_8 | 05359c9369906184ed3a5b1b706ae2cb | // { dg-do run }
extern "C" void abort ();
struct A { int a; A () : a (6) {} };
struct B { int b; B () : b (5) {} };
struct C { int c; C () : c (4) {} };
struct D { int d; D () : d (3) {} };
struct E : A, B {};
struct F : C, D {};
struct G : E, F {};
void foo (B &);
void foo (F &);
#pragma omp declare reduction (+:B:... |
google | android | for-2 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/for-2.C | 3,058 | utf_8 | b64542faf55a399e300d1e45dd199dea | // { dg-do run }
extern "C" void abort ();
template <typename T>
class J
{
public:
J(T x, T y) : b (x), e (y) {}
T begin ();
T end ();
private:
T b, e;
};
template <typename T> T J<T>::begin () { return b; }
template <typename T> T J<T>::end () { return e; }
int results[2000];
void
baz (int i)
{
if (i < ... |
google | android | reduction-3 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/reduction-3.C | 876 | utf_8 | e6be7ac480ea1328785bc17e9c2ecc9a | #include <omp.h>
#include <stdlib.h>
int
main (void)
{
int i = 0, j = 0, k = ~0, l;
double d = 1.0;
#pragma omp parallel num_threads(4)
{
#pragma omp single
{
i = 16;
k ^= (1 << 16);
d += 32.0;
}
#pragma omp for reduction(+:i) reduction(*:d) reduction(&:k) nowait
for (l = 0; l < 4;... |
google | android | ctor-7 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-7.C | 795 | utf_8 | 46280f072d47ab513989684a0c34bbbd | // { dg-do run }
#include <omp.h>
#include <assert.h>
#define N 10
struct B
{
static int icount;
static int dcount;
static int xcount;
B();
B(const B &);
~B();
B& operator=(const B &);
void doit();
};
int B::icount;
int B::dcount;
int B::xcount;
B::B()
{
#pragma omp atomic
icount++;
}
B::~... |
google | android | ctor-6 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/ctor-6.C | 625 | utf_8 | e4c259ceb3f0850ee4a9c2d8db93fa19 | // { dg-do run }
#include <omp.h>
#include <assert.h>
struct B
{
static int count;
static B *expected;
B& operator=(const B &);
};
int B::count;
B * B::expected;
B& B::operator= (const B &b)
{
assert (&b == expected);
assert (this != expected);
#pragma omp atomic
count++;
return *this;
}
static ... |
google | android | simd-8 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-8.C | 958 | utf_8 | 5e39603f7135e44a8a4eddc2486914e0 | // PR libgomp/58482
// { dg-do run }
// { dg-options "-O2" }
// { dg-additional-options "-msse2" { target sse2_runtime } }
// { dg-additional-options "-mavx" { target avx_runtime } }
extern "C" void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
struct S
{
int s;
S () : s (0) {}
~S () {}
};
#pragma... |
google | android | loop-10 | .C | toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/loop-10.C | 2,337 | utf_8 | c5fa025c49fa4f84574bce84b4f41edf | // { dg-do run }
#include <omp.h>
extern "C" void abort (void);
#define LLONG_MAX __LONG_LONG_MAX__
#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
#define INT_MAX __INT_MAX__
int v;
int
test1 (void)
{
int e = 0, cnt = 0;
long long i;
unsigned long long j;
char buf[6], *p;
#pragma omp for schedule(dynamic,1) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.