mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
Bumps OpenMP from 4.5 (201511) to 5.2 (202111), with deprecation and
test support to 5.1 (202011). Adds new tests and a new warning.
Suppresses deprecation warnings in all relevant tests and removes
suppression pragmas visible outside of the testsuite. Additionally
implements new warning in the relevant frontends. Otherwise, cleans
up some whitespace and fixed a misspelled pragma in a testcase. Also
fixes an indentation error.
gcc/c-family/ChangeLog:
* c-cppbuiltin.cc (c_cpp_builtins): Bump _OPENMP version.
* c.opt (Wdeprecated-openmp): Add warning.
* c.opt.urls: Regenerated.
gcc/c/ChangeLog:
* c-parser.cc (c_parser_omp_clause_proc_bind): Deprecate master
affinity.
(c_parser_omp_master): Deprecate master construct.
(c_parser_transaction): Whitespace.
gcc/cp/ChangeLog:
* parser.cc (cp_parser_postfix_expression): Whitespace.
(cp_parser_builtin_c23_va_start): Ditto.
(cp_parser_omp_clause_proc_bind): Deprecate master affinity.
(cp_parser_omp_master): Deprecate master construct.
gcc/ChangeLog:
* doc/invoke.texi: Update docs for '-Wdeprecated-openmp'.
gcc/fortran/ChangeLog:
* cpp.cc (cpp_define_builtins): Bump _OPENMP version.
* invoke.texi: Update docs for '-Wdeprecated-openmp'.
* lang.opt (Wdeprecated-openmp): Add warning.
* lang.opt.urls: Regenerated.
* openmp.cc (gfc_match_omp_clauses): Deprecate master affinity
policy.
(gfc_match_omp_parallel_master): Deprecate master construct.
(gfc_match_omp_parallel_master_taskloop): Ditto.
(gfc_match_omp_parallel_master_taskloop_simd): Ditto.
(gfc_match_omp_master): Ditto.
(gfc_match_omp_master_taskloop): Ditto.
(gfc_match_omp_master_taskloop_simd): Ditto.
(resolve_omp_clauses): Warn for deprecated use of
{use,is}_device_ptr.
libgomp/ChangeLog:
* env.c (omp_display_env): Bump _OPENMP version.
* fortran.c (ialias_redirect): Remove suppression pragmas.
(omp_set_dynamic_8_): Ditto.
(omp_set_nested_8_): Ditto.
(omp_get_nested_): Ditto.
* icv.c (omp_get_dynamic): Ditto.
(omp_get_nested): Ditto.
(ialias): Ditto.
* omp_lib.f90.in: Bump openmp_version.
* omp_lib.h.in: Ditto.
* testsuite/libgomp.c++/affinity-1.C: Suppress deprecation
warnings.
* testsuite/libgomp.c++/ctor-1.C: Ditto.
* testsuite/libgomp.c++/ctor-11.C: Ditto.
* testsuite/libgomp.c++/ctor-13.C: Ditto.
* testsuite/libgomp.c++/ctor-2.C: Ditto.
* testsuite/libgomp.c++/ctor-5.C: Ditto.
* testsuite/libgomp.c++/ctor-7.C: Ditto.
* testsuite/libgomp.c++/depend-iterator-1.C: Ditto.
* testsuite/libgomp.c++/loop-13.C: Ditto.
* testsuite/libgomp.c++/master-1.C: Ditto.
* testsuite/libgomp.c++/pr26943.C: Ditto.
* testsuite/libgomp.c++/pr81130.C: Ditto.
* testsuite/libgomp.c++/pr81314.C: Ditto.
* testsuite/libgomp.c++/target-in-reduction-1.C: Ditto.
* testsuite/libgomp.c++/target-in-reduction-2.C: Ditto.
* testsuite/libgomp.c++/task-1.C: Ditto.
* testsuite/libgomp.c++/task-2.C: Ditto.
* testsuite/libgomp.c++/task-6.C: Ditto.
* testsuite/libgomp.c++/task-reduction-7.C: Ditto.
* testsuite/libgomp.c++/task-reduction-9.C: Ditto.
* testsuite/libgomp.c++/taskloop-reduction-1.C: Ditto.
* testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c: Ditto.
* testsuite/libgomp.c-c++-common/depend-inoutset-1.c: Ditto.
* testsuite/libgomp.c-c++-common/depend-iterator-1.c: Ditto.
* testsuite/libgomp.c-c++-common/master-combined-1.c: Ditto.
* testsuite/libgomp.c-c++-common/target-in-reduction-1.c: Ditto.
* testsuite/libgomp.c-c++-common/target-in-reduction-2.c: Ditto.
* testsuite/libgomp.c-c++-common/task-detach-12.c: Ditto.
* testsuite/libgomp.c-c++-common/task-reduction-15.c: Ditto.
* testsuite/libgomp.c-c++-common/task-reduction-5.c: Ditto.
* testsuite/libgomp.c-c++-common/task-reduction-6.c: Ditto.
* testsuite/libgomp.c-c++-common/task-reduction-8.c: Ditto.
* testsuite/libgomp.c-c++-common/taskloop-reduction-1.c: Ditto.
* testsuite/libgomp.c-c++-common/taskloop-reduction-3.c: Ditto.
* testsuite/libgomp.c-c++-common/taskloop-reduction-4.c: Ditto.
* testsuite/libgomp.c/affinity-1.c: Remove extraneous dg
instruction and add suppression.
* testsuite/libgomp.c/critical-2.c: Suppress deprecation
warnings.
* testsuite/libgomp.c/debug-1.c: Ditto.
* testsuite/libgomp.c/lib-1.c: Ditto.
* testsuite/libgomp.c/loop-24.c: Ditto.
* testsuite/libgomp.c/nestedfn-2.c: Ditto.
* testsuite/libgomp.c/nestedfn-3.c: Ditto.
* testsuite/libgomp.c/pr104385.c: Ditto.
* testsuite/libgomp.c/target-31.c: Ditto.
* testsuite/libgomp.c/target-34.c: Ditto.
* testsuite/libgomp.c/target-critical-1.c: Ditto.
* testsuite/libgomp.c/task-1.c: Ditto.
* testsuite/libgomp.c/task-3.c: Ditto.
* testsuite/libgomp.c/task-6.c: Ditto.
* testsuite/libgomp.c/task-reduction-1.c: Ditto.
* testsuite/libgomp.c/task-reduction-2.c: Ditto.
* testsuite/libgomp.c/teams-1.c: Ditto.
* testsuite/libgomp.c/vla-1.c: Ditto.
* testsuite/libgomp.fortran/crayptr1.f90: Ditto.
* testsuite/libgomp.fortran/depend-inoutset-1.f90: Ditto.
* testsuite/libgomp.fortran/is_device_ptr-1.f90: Ditto.
* testsuite/libgomp.fortran/is_device_ptr-2.f90: Ditto.
* testsuite/libgomp.fortran/lib1.f90: Ditto.
* testsuite/libgomp.fortran/lib2.f: Ditto.
* testsuite/libgomp.fortran/lib3.f: Ditto.
* testsuite/libgomp.fortran/omp_parse2.f90: Ditto.
* testsuite/libgomp.fortran/openmp_version-1.f: Bump OMP version.
* testsuite/libgomp.fortran/openmp_version-2.f90: Ditto.
* testsuite/libgomp.fortran/parallel-master.f90: Suppress
warnings.
* testsuite/libgomp.fortran/pointer2.f90: Ditto.
* testsuite/libgomp.fortran/reduction6.f90: Ditto.
* testsuite/libgomp.fortran/target-firstprivate-1.f90: Ditto.
* testsuite/libgomp.fortran/use_device_addr-1.f90: Ditto.
* testsuite/libgomp.fortran/use_device_addr-2.f90: Ditto.
* testsuite/libgomp.fortran/use_device_addr-3.f90: Ditto.
* testsuite/libgomp.fortran/use_device_addr-4.f90: Ditto.
* testsuite/libgomp.fortran/use_device_addr-5.f90: Ditto.
* testsuite/libgomp.fortran/use_device_ptr-1.f90: Ditto.
* testsuite/libgomp.fortran/use_device_ptr-3.f90: Ditto.
* testsuite/libgomp.fortran/use_device_ptr-4.f90: Ditto.
* testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: Ditto.
* testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto.
* testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: Ditto.
* testsuite/libgomp.c-c++-common/omp-atv-seq-dep.c: New test.
* testsuite/libgomp.c-c++-common/omp-lock-hint-contended-dep.c:
New test.
* testsuite/libgomp.c-c++-common/omp-lock-hint-none-dep.c: New test.
* testsuite/libgomp.c-c++-common/omp-lock-hint-speculative-dep.c:
New test.
* testsuite/libgomp.c-c++-common/omp-lock-hint-uncontended-dep.c:
New test.
* testsuite/libgomp.c/omp-proc-bind-master-dep.c: New test.
* testsuite/libgomp.fortran/omp-atv-seq-dep.f90: New test.
* testsuite/libgomp.fortran/omp-lock-hint-contended-dep.f90: New
test.
* testsuite/libgomp.fortran/omp-lock-hint-none-dep.f90: New test.
* testsuite/libgomp.fortran/omp-lock-hint-speculative-dep.f90: New
test.
* testsuite/libgomp.fortran/omp-lock-hint-uncontended-dep.f90: New
test.
gcc/testsuite/ChangeLog:
* c-c++-common/cpp/openmp-define-3.c: Bump OMP version.
* c-c++-common/gomp/Wparentheses-1.c: Suppress deprecation
warnings.
* c-c++-common/gomp/Wparentheses-3.c: Ditto.
* c-c++-common/gomp/affinity-3.c: Ditto.
* c-c++-common/gomp/allocate-18.c: Ditto.
* c-c++-common/gomp/cancel-1.c: Ditto.
* c-c++-common/gomp/clause-dups-1.c: Ditto.
* c-c++-common/gomp/clauses-1.c: Suppress deprecation
warnings and fix misspelled directive. Add
'-Wunknown-pragmas'.
* c-c++-common/gomp/clauses-6.c: Suppress deprecation warnings.
* c-c++-common/gomp/declare-variant-1.c: Ditto.
* c-c++-common/gomp/declare-variant-2.c: Ditto.
* c-c++-common/gomp/depend-iterator-1.c: Ditto.
* c-c++-common/gomp/lastprivate-conditional-1.c: Ditto.
* c-c++-common/gomp/loop-1.c: Ditto.
* c-c++-common/gomp/loop-2.c: Ditto.
* c-c++-common/gomp/loop-3.c: Ditto.
* c-c++-common/gomp/loop-4.c: Ditto.
* c-c++-common/gomp/master-combined-1.c: Ditto.
* c-c++-common/gomp/master-combined-2.c: Ditto.
* c-c++-common/gomp/nesting-2.c: Ditto.
* c-c++-common/gomp/pr100902-1.c: Ditto.
* c-c++-common/gomp/pr61486-2.c: Ditto.
* c-c++-common/gomp/pr85696.c: Ditto.
* c-c++-common/gomp/pr85956.c: Ditto.
* c-c++-common/gomp/pr98187.c: Ditto.
* c-c++-common/gomp/pr99928-1.c: Ditto.
* c-c++-common/gomp/pr99928-10.c: Ditto.
* c-c++-common/gomp/pr99928-11.c: Ditto.
* c-c++-common/gomp/pr99928-12.c: Ditto.
* c-c++-common/gomp/pr99928-13.c: Ditto.
* c-c++-common/gomp/pr99928-14.c: Ditto.
* c-c++-common/gomp/pr99928-2.c: Ditto.
* c-c++-common/gomp/pr99928-3.c: Ditto.
* c-c++-common/gomp/pr99928-4.c: Ditto.
* c-c++-common/gomp/pr99928-5.c: Ditto.
* c-c++-common/gomp/pr99928-6.c: Ditto.
* c-c++-common/gomp/pr99928-7.c: Ditto.
* c-c++-common/gomp/pr99928-8.c: Ditto.
* c-c++-common/gomp/pr99928-9.c: Ditto.
* c-c++-common/gomp/task-detach-1.c: Ditto.
* c-c++-common/gomp/teams-2.c: Ditto.
* g++.dg/gomp/attrs-1.C: Ditto.
* g++.dg/gomp/attrs-2.C: Ditto.
* g++.dg/gomp/attrs-4.C: Ditto.
* g++.dg/gomp/block-0.C: Ditto.
* g++.dg/gomp/block-10.C: Ditto.
* g++.dg/gomp/block-5.C: Ditto.
* g++.dg/gomp/block-9.C: Ditto.
* g++.dg/gomp/depend-iterator-1.C: Ditto.
* g++.dg/gomp/master-1.C: Ditto.
* g++.dg/gomp/master-2.C: Ditto.
* g++.dg/gomp/master-3.C: Ditto.
* g++.dg/gomp/method-1.C: Ditto.
* g++.dg/gomp/pr29965-3.C: Ditto.
* g++.dg/gomp/pr29965-9.C: Ditto.
* g++.dg/gomp/pr78363-4.C: Ditto.
* g++.dg/gomp/pr78363-6.C: Ditto.
* g++.dg/gomp/pr79664.C: Ditto.
* g++.dg/gomp/pr94477.C: Ditto.
* g++.dg/gomp/pr94512.C: Ditto.
* g++.dg/gomp/tpl-master-1.C: Ditto.
* gcc.dg/gomp/appendix-a/a.12.1.c: Ditto.
* gcc.dg/gomp/appendix-a/a.33.2.c: Ditto.
* gcc.dg/gomp/attrs-1.c: Ditto.
* gcc.dg/gomp/attrs-2.c: Ditto.
* gcc.dg/gomp/attrs-4.c: Ditto.
* gcc.dg/gomp/block-10.c: Ditto.
* gcc.dg/gomp/block-5.c: Ditto.
* gcc.dg/gomp/block-9.c: Ditto.
* gcc.dg/gomp/master-1.c: Ditto.
* gcc.dg/gomp/master-2.c: Ditto.
* gcc.dg/gomp/master-3.c: Ditto.
* gcc.dg/gomp/nesting-1.c: Ditto.
* gcc.dg/gomp/pr104517.c: Ditto.
* gcc.dg/gomp/pr29965-3.c: Ditto.
* gcc.dg/gomp/pr35818.c: Ditto.
* gcc.dg/gomp/pr91216.c: Ditto.
* gcc.dg/gomp/sharing-2.c: Ditto.
* gfortran.dg/gomp/adjust-args-10.f90: Ditto.
* gfortran.dg/gomp/affinity-1.f90: Ditto.
* gfortran.dg/gomp/allocate-clause.f90: Ditto.
* gfortran.dg/gomp/appendix-a/a.12.1.f90: Ditto.
* gfortran.dg/gomp/appendix-a/a.33.2.f90: Ditto.
* gfortran.dg/gomp/c_ptr_tests_20.f90: Ditto.
* gfortran.dg/gomp/c_ptr_tests_21.f90: Ditto.
* gfortran.dg/gomp/cancel-1.f90: Ditto.
* gfortran.dg/gomp/clauses-1.f90: Ditto.
* gfortran.dg/gomp/declare-variant-1.f90: Ditto.
* gfortran.dg/gomp/depend-iterator-1.f90: Ditto.
* gfortran.dg/gomp/depend-iterator-2.f90: Ditto.
* gfortran.dg/gomp/is_device_ptr-1.f90: Ditto.
* gfortran.dg/gomp/is_device_ptr-2.f90: Ditto.
* gfortran.dg/gomp/is_device_ptr-3.f90: Ditto.
* gfortran.dg/gomp/lastprivate-conditional-1.f90: Ditto.
* gfortran.dg/gomp/loop-4.f90: Ditto.
* gfortran.dg/gomp/loop-exit.f90: Ditto.
* gfortran.dg/gomp/map-3.f90: Ditto.
* gfortran.dg/gomp/nesting-2.f90: Ditto.
* gfortran.dg/gomp/nesting-3.f90: Ditto.
* gfortran.dg/gomp/nowait-2.f90: Ditto.
* gfortran.dg/gomp/nowait-4.f90: Ditto.
* gfortran.dg/gomp/nowait-5.f90: Ditto.
* gfortran.dg/gomp/openmp-simd-2.f90: Ditto.
* gfortran.dg/gomp/openmp-simd-3.f90: Ditto.
* gfortran.dg/gomp/parallel-master-1.f90: Ditto.
* gfortran.dg/gomp/parallel-master-2.f90: Ditto.
* gfortran.dg/gomp/pr107214-8.f90: Ditto.
* gfortran.dg/gomp/pr48117.f90: Ditto.
* gfortran.dg/gomp/pr94672.f90: Ditto.
* gfortran.dg/gomp/pr99928-1.f90: Suppression + fix whitespace.
* gfortran.dg/gomp/pr99928-11.f90: Suppression.
* gfortran.dg/gomp/pr99928-2.f90: Suppression + fix whitespace.
* gfortran.dg/gomp/pr99928-3.f90: Ditto.
* gfortran.dg/gomp/pr99928-4.f90: Ditto.
* gfortran.dg/gomp/pr99928-5.f90: Ditto.
* gfortran.dg/gomp/pr99928-6.f90: Ditto.
* gfortran.dg/gomp/pr99928-8.f90: Ditto.
* gfortran.dg/gomp/sharing-3.f90: Suppress deprecation warnings.
* gfortran.dg/gomp/strictly-structured-block-1.f90: Ditto.
* gfortran.dg/gomp/strictly-structured-block-2.f90: Ditto.
* gfortran.dg/gomp/target1.f90: Ditto.
* gfortran.dg/gomp/taskloop-1.f90: Ditto.
* gfortran.dg/gomp/taskloop-2.f90: Ditto.
* gfortran.dg/openmp-define-3.f90: Bump expected version.
* c-c++-common/gomp/master-construct-dep.c: New test.
* gfortran.dg/gomp/master-construct-dep.f90: New test.
426 lines
13 KiB
C
426 lines
13 KiB
C
/* { dg-do run } */
|
|
// { dg-additional-options "-Wno-deprecated-openmp" }
|
|
|
|
extern void abort (void);
|
|
|
|
signed char v[5][7][9][21][4][42][3];
|
|
volatile int zero = 0, one = 1, two = 2, three = 3;
|
|
volatile int five = 5, seven = 7, nine = 9, eleven = 11;
|
|
|
|
int
|
|
main ()
|
|
{
|
|
for (int i = 0; i < 5; i++)
|
|
for (int j = 0; j < 7; j++)
|
|
for (int k = 0; k < 9; k++)
|
|
for (int l = 2 * j; l < 3 * j; l++)
|
|
for (int m = 7; m < 11; m++)
|
|
for (int n = l; n < 2 * l; n++)
|
|
for (int o = 0; o < 3; o++)
|
|
v[i][j][k][l][m - 7][n][o] = 1;
|
|
|
|
int niters = 0;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(7) in_reduction(+:niters)
|
|
for (int i = 0; i < 5; i++)
|
|
for (int j = 0; j < 7; j++)
|
|
for (int k = 0; k < 9; k++)
|
|
for (int l = 2 * j; l < 3 * j; l++)
|
|
for (int m = 7; m < 11; m++)
|
|
for (int n = l; n < 2 * l; n++)
|
|
for (int o = 0; o < 3; o++)
|
|
{
|
|
niters++;
|
|
if (i < 0 || i >= 5
|
|
|| j < 0 || j >= 7
|
|
|| k < 0 || k >= 9
|
|
|| l < 2 * j || l >= 3 * j
|
|
|| m < 7 || m >= 11
|
|
|| n < l || n >= 2 * l
|
|
|| o < 0 || o >= 3)
|
|
abort ();
|
|
if (v[i][j][k][l][m - 7][n][o] != 1)
|
|
abort ();
|
|
v[i][j][k][l][m - 7][n][o]++;
|
|
}
|
|
|
|
if (niters != 117180)
|
|
abort ();
|
|
|
|
int niters2 = 0;
|
|
#pragma omp parallel master reduction(task, +:niters2)
|
|
#pragma omp taskloop collapse(7) in_reduction(+:niters2)
|
|
for (int i = zero; i < five; i += one)
|
|
for (int j = seven - one; j >= zero; j -= one)
|
|
for (int k = nine - one; k >= zero; k += -one)
|
|
for (int l = two * j + zero; l < three * j; l += one)
|
|
for (int m = eleven - one; m >= seven; m -= one)
|
|
for (int n = two * l - one; n > one * l - one; n -= one)
|
|
for (int o = zero; o < three; o += one)
|
|
{
|
|
niters2++;
|
|
if (i < 0 || i >= 5
|
|
|| j < 0 || j >= 7
|
|
|| k < 0 || k >= 9
|
|
|| l < 2 * j || l >= 3 * j
|
|
|| m < 7 || m >= 11
|
|
|| n < l || n >= 2 * l
|
|
|| o < 0 || o >= 3)
|
|
abort ();
|
|
if (v[i][j][k][l][m - 7][n][o] != 2)
|
|
abort ();
|
|
v[i][j][k][l][m - 7][n][o]++;
|
|
}
|
|
|
|
if (niters2 != 117180)
|
|
abort ();
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
for (int j = 0; j < 7; j++)
|
|
for (int k = 0; k < 9; k++)
|
|
for (int l = 2 * j; l < 3 * j; l++)
|
|
for (int m = 7; m < 11; m++)
|
|
for (int n = l; n < 2 * l; n++)
|
|
for (int o = 0; o < 3; o++)
|
|
if (v[i][j][k][l][m - 7][n][o] != 3)
|
|
abort ();
|
|
|
|
int niters3 = 0;
|
|
#pragma omp parallel master reduction(task, +:niters3)
|
|
#pragma omp taskloop collapse(5) in_reduction(+:niters3)
|
|
for (int i = 4; i >= 0; i--)
|
|
for (int j = 6; j >= 0; --j)
|
|
for (int l = 3 * j - 1; l >= 2 * j; l--)
|
|
for (int n = 2 * l + -1; n > l - 1; --n)
|
|
for (int o = 2; o >= 0; o--)
|
|
{
|
|
niters3++;
|
|
if (i < 0 || i >= 5
|
|
|| j < 0 || j >= 7
|
|
|| l < 2 * j || l >= 3 * j
|
|
|| n < l || n >= 2 * l
|
|
|| o < 0 || o >= 3)
|
|
abort ();
|
|
if (v[i][j][0][l][0][n][o] != 3)
|
|
abort ();
|
|
v[i][j][0][l][0][n][o]++;
|
|
}
|
|
|
|
if (niters3 != 3255)
|
|
abort ();
|
|
|
|
int niters4 = 0;
|
|
#pragma omp parallel master reduction(task, +:niters4)
|
|
#pragma omp taskloop collapse(5) in_reduction(+:niters4)
|
|
for (int i = zero; i < five; i += one)
|
|
for (int j = zero; j <= seven - one; j += one)
|
|
for (int l = j * two; l < three * j + zero; l += one)
|
|
for (int n = one * l; n <= l * two - one; n += one)
|
|
for (int o = zero; o < three; o += one)
|
|
{
|
|
niters4++;
|
|
if (i < 0 || i >= 5
|
|
|| j < 0 || j >= 7
|
|
|| l < 2 * j || l >= 3 * j
|
|
|| n < l || n >= 2 * l
|
|
|| o < 0 || o >= 3)
|
|
abort ();
|
|
if (v[i][j][0][l][0][n][o] != 4)
|
|
abort ();
|
|
v[i][j][0][l][0][n][o]++;
|
|
}
|
|
|
|
if (niters4 != 3255)
|
|
abort ();
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
for (int j = 0; j < 7; j++)
|
|
for (int l = 2 * j; l < 3 * j; l++)
|
|
for (int n = l; n < 2 * l; n++)
|
|
for (int o = 0; o < 3; o++)
|
|
if (v[i][j][0][l][0][n][o] != 5)
|
|
abort ();
|
|
|
|
int niters5 = 0;
|
|
#pragma omp parallel master reduction(task, +:niters5)
|
|
#pragma omp taskloop collapse(3) in_reduction(+:niters5)
|
|
for (int j = 6; j >= 0; --j)
|
|
for (int l = 2 * j; l <= 3 * j - 1; l++)
|
|
for (int n = 2 * l + -1; n > l - 1; --n)
|
|
{
|
|
niters5++;
|
|
if (j < 0 || j >= 7
|
|
|| l < 2 * j || l >= 3 * j
|
|
|| n < l || n >= 2 * l)
|
|
abort ();
|
|
if (v[0][j][0][l][0][n][0] != 5)
|
|
abort ();
|
|
v[0][j][0][l][0][n][0]++;
|
|
}
|
|
|
|
if (niters5 != 217)
|
|
abort ();
|
|
|
|
int niters6 = 0;
|
|
#pragma omp parallel master reduction(task, +:niters6)
|
|
#pragma omp taskloop collapse(3) in_reduction(+:niters6)
|
|
for (int j = seven - one; j > - one; j -= one)
|
|
for (int l = j * three - one; l >= j * two + zero; l += -one)
|
|
for (int n = two * l - one; n > l - one; n -= one)
|
|
{
|
|
niters6++;
|
|
if (j < 0 || j >= 7
|
|
|| l < 2 * j || l >= 3 * j
|
|
|| n < l || n >= 2 * l)
|
|
abort ();
|
|
if (v[0][j][0][l][0][n][0] != 6)
|
|
abort ();
|
|
v[0][j][0][l][0][n][0]++;
|
|
}
|
|
|
|
if (niters6 != 217)
|
|
abort ();
|
|
|
|
for (int j = 0; j < 7; j++)
|
|
for (int l = 2 * j; l < 3 * j; l++)
|
|
for (int n = l; n < 2 * l; n++)
|
|
if (v[0][j][0][l][0][n][0] != 7)
|
|
abort ();
|
|
|
|
{
|
|
static int i, j, x;
|
|
static volatile int a, b, c, d, e, f, g, h;
|
|
static int w[13][27];
|
|
for (i = -4; i < 8; i++)
|
|
for (j = 3 * i; j > 2 * i; j--)
|
|
w[i + 5][j + 5] = 1;
|
|
a = -4; b = 8; c = 1; d = 3; e = 0; f = 2; g = 0; h = -1;
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = -4; i < 8; i++)
|
|
for (j = 3 * i; j > 2 * i; j--)
|
|
{
|
|
if (i < -4 || i >= 8 || j > 3 * i || j <= i * 2 || w[i + 5][j + 5] != 1)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (i != 8 || j != 14 || x != 7183 || niters != 28)
|
|
abort ();
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = a; i < b; i += c)
|
|
for (j = d * i + e; j > g + i * f; j += h)
|
|
{
|
|
if (i < -4 || i >= 8 || j > 3 * i || j <= i * 2 || w[i + 5][j + 5] != 2)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (i != 8 || j != 14 || x != 7183 || niters != 28)
|
|
abort ();
|
|
for (int i = -4; i < 8; i++)
|
|
for (int j = 3 * i; j > 2 * i; j--)
|
|
if (w[i + 5][j + 5] == 3)
|
|
w[i + 5][j + 5] = 0;
|
|
else
|
|
abort ();
|
|
for (i = -2; i < 4; i++)
|
|
for (j = -2 * i + 3; j > -3; j -= 2)
|
|
w[i + 5][j + 5] = 1;
|
|
a = -2; b = 4; c = 1; d = -2; e = 3; f = 0; g = -3; h = -2;
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = -2; i < 4; i++)
|
|
for (j = -2 * i + 3; j > -3; j -= 2)
|
|
{
|
|
if (i < -2 || i >= 4 || j <= -3 || j > -2 * i + 3 || w[i + 5][j + 5] != 1)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (/* i != 4 || j != -3 || */x != 3071 || niters != 15)
|
|
abort ();
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = a; i < b; i += c)
|
|
for (j = d * i + e; j > g + i * f; j += h)
|
|
{
|
|
if (i < -2 || i >= 4 || j <= -3 || j > -2 * i + 3 || w[i + 5][j + 5] != 2)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (/*i != 4 || j != -3 || */x != 3071 || niters != 15)
|
|
abort ();
|
|
for (i = -2; i < 4; i++)
|
|
for (j = -2 * i + 3; j > -3; j -= 2)
|
|
if (w[i + 5][j + 5] == 3)
|
|
w[i + 5][j + 5] = 0;
|
|
else
|
|
abort ();
|
|
for (i = 3; i > -3; i--)
|
|
for (j = -2 * i + 7; j > 2 * i + 1; j--)
|
|
w[i + 5][j + 5] = 1;
|
|
a = 3; b = -3; c = -1; d = -2; e = 7; f = 2; g = 1; h = -1;
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = 3; i > -3; i--)
|
|
for (j = -2 * i + 7; j > 2 * i + 1; j--)
|
|
{
|
|
if (i <= -3 || i > 3 || j <= 2 * i + 1 || j > -2 * i + 7 || w[i + 5][j + 5] != 1)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (i != -3 || j != -3 || x != -1026 || niters != 32)
|
|
abort ();
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = a; i > b; i += c)
|
|
for (j = d * i + e; j > g + i * f; j += h)
|
|
{
|
|
if (i <= -3 || i > 3 || j <= 2 * i + 1 || j > -2 * i + 7 || w[i + 5][j + 5] != 2)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (i != -3 || j != -3 || x != -1026 || niters != 32)
|
|
abort ();
|
|
for (i = 3; i > -3; i--)
|
|
for (j = -2 * i + 7; j > 2 * i + 1; j--)
|
|
if (w[i + 5][j + 5] == 3)
|
|
w[i + 5][j + 5] = 0;
|
|
else
|
|
abort ();
|
|
for (i = 3; i > -3; i--)
|
|
for (j = 2 * i + 7; j > -2 * i + 1; j--)
|
|
w[i + 5][j + 5] = 1;
|
|
a = 3; b = -3; c = -1; d = 2; e = 7; f = -2; g = 1; h = -1;
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = 3; i > -3; i--)
|
|
for (j = 2 * i + 7; j > -2 * i + 1; j--)
|
|
{
|
|
if (i <= -3 || i > 3 || j <= -2 * i + 1 || j > 2 * i + 7 || w[i + 5][j + 5] != 1)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (/*i != -3 || j != 3 || */x != -1020 || niters != 50)
|
|
abort ();
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = a; i > b; i += c)
|
|
for (j = d * i + e; j > g + i * f; j += h)
|
|
{
|
|
if (i <= -3 || i > 3 || j <= -2 * i + 1 || j > 2 * i + 7 || w[i + 5][j + 5] != 2)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (/*i != -3 || j != 3 || */x != -1020 || niters != 50)
|
|
abort ();
|
|
for (i = 3; i > -3; i--)
|
|
for (j = 2 * i + 7; j > -2 * i + 1; j--)
|
|
if (w[i + 5][j + 5] == 3)
|
|
w[i + 5][j + 5] = 0;
|
|
else
|
|
abort ();
|
|
for (i = 6; i > -6; i--)
|
|
for (j = 2 * i + 7; j <= -2 * i + 1; j++)
|
|
w[i + 5][j + 5] = 1;
|
|
a = 6; b = -6; c = -1; d = 2; e = 7; f = -2; g = 2; h = 1;
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = 6; i > -6; i--)
|
|
for (j = 2 * i + 7; j <= -2 * i + 1; j++)
|
|
{
|
|
if (i <= -6 || i > 6 || j < 2 * i + 7 || j >= -2 * i + 2 || w[i + 5][j + 5] != 1)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (i != -6 || j != 12 || x != -5109 || niters != 36)
|
|
abort ();
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = a; i > b; i += c)
|
|
for (j = d * i + e; j < g + i * f; j += h)
|
|
{
|
|
if (i <= -6 || i > 6 || j < 2 * i + 7 || j >= -2 * i + 2 || w[i + 5][j + 5] != 2)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (i != -6 || j != 12 || x != -5109 || niters != 36)
|
|
abort ();
|
|
for (i = 6; i > -6; i--)
|
|
for (j = 2 * i + 7; j <= -2 * i + 1; j++)
|
|
if (w[i + 5][j + 5] == 3)
|
|
w[i + 5][j + 5] = 0;
|
|
else
|
|
abort ();
|
|
for (i = 6; i > -6; i -= 2)
|
|
for (j = -2 * i + 7; j <= 2 * i + 1; j++)
|
|
w[i + 5][j + 5] = 1;
|
|
a = 6; b = -6; c = -2; d = -2; e = 7; f = 2; g = 2; h = 1;
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = 6; i > -6; i -= 2)
|
|
for (j = -2 * i + 7; j <= 2 * i + 1; j++)
|
|
{
|
|
if (i <= -6 || i > 6 || j < -2 * i + 7 || j >= 2 * i + 2 || w[i + 5][j + 5] != 1)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (/*i != -6 || j != 15 || */x != 2053 || niters != 33)
|
|
abort ();
|
|
niters = 0; i = -100; j = -100; x = -100;
|
|
#pragma omp parallel master reduction(task, +:niters)
|
|
#pragma omp taskloop collapse(2) lastprivate (i, j, x) in_reduction(+:niters)
|
|
for (i = a; i > b; i += c)
|
|
for (j = d * i + e; j < g + i * f; j += h)
|
|
{
|
|
if (i <= -6 || i > 6 || j < -2 * i + 7 || j >= 2 * i + 2 || w[i + 5][j + 5] != 2)
|
|
abort ();
|
|
w[i + 5][j + 5]++;
|
|
x = i * 1024 + (j & 1023);
|
|
niters++;
|
|
}
|
|
if (/*i != -6 || j != 15 || */x != 2053 || niters != 33)
|
|
abort ();
|
|
for (i = 6; i > -6; i -= 2)
|
|
for (j = -2 * i + 7; j <= 2 * i + 1; j++)
|
|
if (w[i + 5][j + 5] == 3)
|
|
w[i + 5][j + 5] = 0;
|
|
else
|
|
abort ();
|
|
}
|
|
|
|
return 0;
|
|
}
|