for-14.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* { dg-additional-options "-std=gnu99" { target c } } */
  2. extern
  3. #ifdef __cplusplus
  4. "C"
  5. #endif
  6. void abort ();
  7. #define DO_PRAGMA(x) _Pragma (#x)
  8. #define OMPTEAMS DO_PRAGMA (omp teams)
  9. #define M(x, y, z) O(x, y, z)
  10. #define O(x, y, z) x ## _ ## y ## _ ## z
  11. #define F distribute
  12. #define G d
  13. #define S
  14. #define N(x) M(x, G, normal)
  15. #include "for-2.h"
  16. #undef S
  17. #undef N
  18. #undef F
  19. #undef G
  20. #define F distribute
  21. #define G d_ds128
  22. #define S dist_schedule(static, 128)
  23. #define N(x) M(x, G, normal)
  24. #include "for-2.h"
  25. #undef S
  26. #undef N
  27. #undef F
  28. #undef G
  29. #define F distribute simd
  30. #define G ds
  31. #define S
  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. #define F distribute simd
  39. #define G ds_ds128
  40. #define S dist_schedule(static, 128)
  41. #define N(x) M(x, G, normal)
  42. #include "for-2.h"
  43. #undef S
  44. #undef N
  45. #undef F
  46. #undef G
  47. #define F distribute parallel for
  48. #define G dpf
  49. #include "for-1.h"
  50. #undef F
  51. #undef G
  52. #define F distribute parallel for dist_schedule(static, 128)
  53. #define G dpf_ds128
  54. #include "for-1.h"
  55. #undef F
  56. #undef G
  57. #define F distribute parallel for simd
  58. #define G dpfs
  59. #include "for-1.h"
  60. #undef F
  61. #undef G
  62. #define F distribute parallel for simd dist_schedule(static, 128)
  63. #define G dpfs_ds128
  64. #include "for-1.h"
  65. #undef F
  66. #undef G
  67. int
  68. main ()
  69. {
  70. int err = 0;
  71. err |= test_d_normal ();
  72. err |= test_d_ds128_normal ();
  73. err |= test_ds_normal ();
  74. err |= test_ds_ds128_normal ();
  75. err |= test_dpf_static ();
  76. err |= test_dpf_static32 ();
  77. err |= test_dpf_auto ();
  78. err |= test_dpf_guided32 ();
  79. err |= test_dpf_runtime ();
  80. err |= test_dpf_ds128_static ();
  81. err |= test_dpf_ds128_static32 ();
  82. err |= test_dpf_ds128_auto ();
  83. err |= test_dpf_ds128_guided32 ();
  84. err |= test_dpf_ds128_runtime ();
  85. err |= test_dpfs_static ();
  86. err |= test_dpfs_static32 ();
  87. err |= test_dpfs_auto ();
  88. err |= test_dpfs_guided32 ();
  89. err |= test_dpfs_runtime ();
  90. err |= test_dpfs_ds128_static ();
  91. err |= test_dpfs_ds128_static32 ();
  92. err |= test_dpfs_ds128_auto ();
  93. err |= test_dpfs_ds128_guided32 ();
  94. err |= test_dpfs_ds128_runtime ();
  95. if (err)
  96. abort ();
  97. return 0;
  98. }