for-15.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* { dg-additional-options "-std=gnu99" { target c } } */
  2. extern
  3. #ifdef __cplusplus
  4. "C"
  5. #endif
  6. void abort ();
  7. #define M(x, y, z) O(x, y, z)
  8. #define O(x, y, z) x ## _ ## y ## _ ## z
  9. #define F for
  10. #define G f
  11. #define S
  12. #define N(x) M(x, G, normal)
  13. #include "for-2.h"
  14. #undef S
  15. #undef N
  16. #undef F
  17. #undef G
  18. #define F teams distribute
  19. #define G td
  20. #define S
  21. #define N(x) M(x, G, normal)
  22. #include "for-2.h"
  23. #undef S
  24. #undef N
  25. #undef F
  26. #undef G
  27. #define F teams distribute
  28. #define G td_ds128
  29. #define S dist_schedule(static, 128)
  30. #define N(x) M(x, G, normal)
  31. #include "for-2.h"
  32. #undef S
  33. #undef N
  34. #undef F
  35. #undef G
  36. #define F teams distribute simd
  37. #define G tds
  38. #define S
  39. #define N(x) M(x, G, normal)
  40. #include "for-2.h"
  41. #undef S
  42. #undef N
  43. #undef F
  44. #undef G
  45. #define F teams distribute simd
  46. #define G tds_ds128
  47. #define S dist_schedule(static, 128)
  48. #define N(x) M(x, G, normal)
  49. #include "for-2.h"
  50. #undef S
  51. #undef N
  52. #undef F
  53. #undef G
  54. #define F teams distribute parallel for
  55. #define G tdpf
  56. #include "for-1.h"
  57. #undef F
  58. #undef G
  59. #define F teams distribute parallel for dist_schedule(static, 128)
  60. #define G tdpf_ds128
  61. #include "for-1.h"
  62. #undef F
  63. #undef G
  64. #define F teams distribute parallel for simd
  65. #define G tdpfs
  66. #include "for-1.h"
  67. #undef F
  68. #undef G
  69. #define F teams distribute parallel for simd dist_schedule(static, 128)
  70. #define G tdpfs_ds128
  71. #include "for-1.h"
  72. #undef F
  73. #undef G
  74. int
  75. main ()
  76. {
  77. if (test_td_normal ()
  78. || test_td_ds128_normal ()
  79. || test_tds_normal ()
  80. || test_tds_ds128_normal ()
  81. || test_tdpf_static ()
  82. || test_tdpf_static32 ()
  83. || test_tdpf_auto ()
  84. || test_tdpf_guided32 ()
  85. || test_tdpf_runtime ()
  86. || test_tdpf_ds128_static ()
  87. || test_tdpf_ds128_static32 ()
  88. || test_tdpf_ds128_auto ()
  89. || test_tdpf_ds128_guided32 ()
  90. || test_tdpf_ds128_runtime ()
  91. || test_tdpfs_static ()
  92. || test_tdpfs_static32 ()
  93. || test_tdpfs_auto ()
  94. || test_tdpfs_guided32 ()
  95. || test_tdpfs_runtime ()
  96. || test_tdpfs_ds128_static ()
  97. || test_tdpfs_ds128_static32 ()
  98. || test_tdpfs_ds128_auto ()
  99. || test_tdpfs_ds128_guided32 ()
  100. || test_tdpfs_ds128_runtime ())
  101. abort ();
  102. return 0;
  103. }