(root)/
gcc-13.2.0/
libgomp/
testsuite/
libgomp.c-c++-common/
for-3.c
       1  /* { dg-additional-options "-std=gnu99" { target c } } */
       2  
       3  extern
       4  #ifdef __cplusplus
       5  "C"
       6  #endif
       7  void abort ();
       8  
       9  #define M(x, y, z) O(x, y, z)
      10  #define O(x, y, z) x ## _ ## y ## _ ## z
      11  
      12  #define DO_PRAGMA(x) _Pragma (#x)
      13  #define OMPTEAMS DO_PRAGMA (omp target teams)
      14  #define OMPFROM(v) DO_PRAGMA (omp target update from(v))
      15  #define OMPTO(v) DO_PRAGMA (omp target update to(v))
      16  
      17  #pragma omp declare target
      18  
      19  #define F distribute
      20  #define G d
      21  #define S
      22  #define N(x) M(x, G, normal)
      23  #include "for-2.h"
      24  #undef S
      25  #undef N
      26  #undef F
      27  #undef G
      28  
      29  #define F distribute
      30  #define G d_ds128
      31  #define S dist_schedule(static, 128)
      32  #define N(x) M(x, G, normal)
      33  #include "for-2.h"
      34  #undef S
      35  #undef N
      36  #undef F
      37  #undef G
      38  
      39  #define F distribute simd
      40  #define G ds
      41  #define S
      42  #define N(x) M(x, G, normal)
      43  #include "for-2.h"
      44  #undef S
      45  #undef N
      46  #undef F
      47  #undef G
      48  
      49  #define F distribute simd
      50  #define G ds_ds128
      51  #define S dist_schedule(static, 128)
      52  #define N(x) M(x, G, normal)
      53  #include "for-2.h"
      54  #undef S
      55  #undef N
      56  #undef F
      57  #undef G
      58  
      59  #define F distribute parallel for
      60  #define G dpf
      61  #include "for-1.h"
      62  #undef F
      63  #undef G
      64  
      65  #define F distribute parallel for dist_schedule(static, 128)
      66  #define G dpf_ds128
      67  #include "for-1.h"
      68  #undef F
      69  #undef G
      70  
      71  #define F distribute parallel for simd
      72  #define G dpfs
      73  #include "for-1.h"
      74  #undef F
      75  #undef G
      76  
      77  #define F distribute parallel for simd dist_schedule(static, 128)
      78  #define G dpfs_ds128
      79  #include "for-1.h"
      80  #undef F
      81  #undef G
      82  
      83  #pragma omp end declare target
      84  
      85  int
      86  main ()
      87  {
      88    int err = 0;
      89    err |= test_d_normal ();
      90    err |= test_d_ds128_normal ();
      91    err |= test_ds_normal ();
      92    err |= test_ds_ds128_normal ();
      93    err |= test_dpf_static ();
      94    err |= test_dpf_static32 ();
      95    err |= test_dpf_auto ();
      96    err |= test_dpf_guided32 ();
      97    err |= test_dpf_runtime ();
      98    err |= test_dpf_ds128_static ();
      99    err |= test_dpf_ds128_static32 ();
     100    err |= test_dpf_ds128_auto ();
     101    err |= test_dpf_ds128_guided32 ();
     102    err |= test_dpf_ds128_runtime ();
     103    err |= test_dpfs_static ();
     104    err |= test_dpfs_static32 ();
     105    err |= test_dpfs_auto ();
     106    err |= test_dpfs_guided32 ();
     107    err |= test_dpfs_runtime ();
     108    err |= test_dpfs_ds128_static ();
     109    err |= test_dpfs_ds128_static32 ();
     110    err |= test_dpfs_ds128_auto ();
     111    err |= test_dpfs_ds128_guided32 ();
     112    err |= test_dpfs_ds128_runtime ();
     113    if (err)
     114      abort ();
     115    return 0;
     116  }