libgomp_g.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /* Copyright (C) 2005-2015 Free Software Foundation, Inc.
  2. Contributed by Richard Henderson <rth@redhat.com>.
  3. This file is part of the GNU Offloading and Multi Processing Library
  4. (libgomp).
  5. Libgomp is free software; you can redistribute it and/or modify it
  6. under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. more details.
  13. Under Section 7 of GPL version 3, you are granted additional
  14. permissions described in the GCC Runtime Library Exception, version
  15. 3.1, as published by the Free Software Foundation.
  16. You should have received a copy of the GNU General Public License and
  17. a copy of the GCC Runtime Library Exception along with this program;
  18. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. <http://www.gnu.org/licenses/>. */
  20. /* This file contains prototypes of functions in the external ABI.
  21. This file is included by files in the testsuite. */
  22. #ifndef LIBGOMP_G_H
  23. #define LIBGOMP_G_H 1
  24. #include <stdbool.h>
  25. #include <stddef.h>
  26. /* barrier.c */
  27. extern void GOMP_barrier (void);
  28. extern bool GOMP_barrier_cancel (void);
  29. /* critical.c */
  30. extern void GOMP_critical_start (void);
  31. extern void GOMP_critical_end (void);
  32. extern void GOMP_critical_name_start (void **);
  33. extern void GOMP_critical_name_end (void **);
  34. extern void GOMP_atomic_start (void);
  35. extern void GOMP_atomic_end (void);
  36. /* loop.c */
  37. extern bool GOMP_loop_static_start (long, long, long, long, long *, long *);
  38. extern bool GOMP_loop_dynamic_start (long, long, long, long, long *, long *);
  39. extern bool GOMP_loop_guided_start (long, long, long, long, long *, long *);
  40. extern bool GOMP_loop_runtime_start (long, long, long, long *, long *);
  41. extern bool GOMP_loop_ordered_static_start (long, long, long, long,
  42. long *, long *);
  43. extern bool GOMP_loop_ordered_dynamic_start (long, long, long, long,
  44. long *, long *);
  45. extern bool GOMP_loop_ordered_guided_start (long, long, long, long,
  46. long *, long *);
  47. extern bool GOMP_loop_ordered_runtime_start (long, long, long, long *, long *);
  48. extern bool GOMP_loop_static_next (long *, long *);
  49. extern bool GOMP_loop_dynamic_next (long *, long *);
  50. extern bool GOMP_loop_guided_next (long *, long *);
  51. extern bool GOMP_loop_runtime_next (long *, long *);
  52. extern bool GOMP_loop_ordered_static_next (long *, long *);
  53. extern bool GOMP_loop_ordered_dynamic_next (long *, long *);
  54. extern bool GOMP_loop_ordered_guided_next (long *, long *);
  55. extern bool GOMP_loop_ordered_runtime_next (long *, long *);
  56. extern void GOMP_parallel_loop_static_start (void (*)(void *), void *,
  57. unsigned, long, long, long, long);
  58. extern void GOMP_parallel_loop_dynamic_start (void (*)(void *), void *,
  59. unsigned, long, long, long, long);
  60. extern void GOMP_parallel_loop_guided_start (void (*)(void *), void *,
  61. unsigned, long, long, long, long);
  62. extern void GOMP_parallel_loop_runtime_start (void (*)(void *), void *,
  63. unsigned, long, long, long);
  64. extern void GOMP_parallel_loop_static (void (*)(void *), void *,
  65. unsigned, long, long, long, long,
  66. unsigned);
  67. extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
  68. unsigned, long, long, long, long,
  69. unsigned);
  70. extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
  71. unsigned, long, long, long, long,
  72. unsigned);
  73. extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
  74. unsigned, long, long, long,
  75. unsigned);
  76. extern void GOMP_loop_end (void);
  77. extern void GOMP_loop_end_nowait (void);
  78. extern bool GOMP_loop_end_cancel (void);
  79. /* loop_ull.c */
  80. extern bool GOMP_loop_ull_static_start (bool, unsigned long long,
  81. unsigned long long,
  82. unsigned long long,
  83. unsigned long long,
  84. unsigned long long *,
  85. unsigned long long *);
  86. extern bool GOMP_loop_ull_dynamic_start (bool, unsigned long long,
  87. unsigned long long,
  88. unsigned long long,
  89. unsigned long long,
  90. unsigned long long *,
  91. unsigned long long *);
  92. extern bool GOMP_loop_ull_guided_start (bool, unsigned long long,
  93. unsigned long long,
  94. unsigned long long,
  95. unsigned long long,
  96. unsigned long long *,
  97. unsigned long long *);
  98. extern bool GOMP_loop_ull_runtime_start (bool, unsigned long long,
  99. unsigned long long,
  100. unsigned long long,
  101. unsigned long long *,
  102. unsigned long long *);
  103. extern bool GOMP_loop_ull_ordered_static_start (bool, unsigned long long,
  104. unsigned long long,
  105. unsigned long long,
  106. unsigned long long,
  107. unsigned long long *,
  108. unsigned long long *);
  109. extern bool GOMP_loop_ull_ordered_dynamic_start (bool, unsigned long long,
  110. unsigned long long,
  111. unsigned long long,
  112. unsigned long long,
  113. unsigned long long *,
  114. unsigned long long *);
  115. extern bool GOMP_loop_ull_ordered_guided_start (bool, unsigned long long,
  116. unsigned long long,
  117. unsigned long long,
  118. unsigned long long,
  119. unsigned long long *,
  120. unsigned long long *);
  121. extern bool GOMP_loop_ull_ordered_runtime_start (bool, unsigned long long,
  122. unsigned long long,
  123. unsigned long long,
  124. unsigned long long *,
  125. unsigned long long *);
  126. extern bool GOMP_loop_ull_static_next (unsigned long long *,
  127. unsigned long long *);
  128. extern bool GOMP_loop_ull_dynamic_next (unsigned long long *,
  129. unsigned long long *);
  130. extern bool GOMP_loop_ull_guided_next (unsigned long long *,
  131. unsigned long long *);
  132. extern bool GOMP_loop_ull_runtime_next (unsigned long long *,
  133. unsigned long long *);
  134. extern bool GOMP_loop_ull_ordered_static_next (unsigned long long *,
  135. unsigned long long *);
  136. extern bool GOMP_loop_ull_ordered_dynamic_next (unsigned long long *,
  137. unsigned long long *);
  138. extern bool GOMP_loop_ull_ordered_guided_next (unsigned long long *,
  139. unsigned long long *);
  140. extern bool GOMP_loop_ull_ordered_runtime_next (unsigned long long *,
  141. unsigned long long *);
  142. /* ordered.c */
  143. extern void GOMP_ordered_start (void);
  144. extern void GOMP_ordered_end (void);
  145. /* parallel.c */
  146. extern void GOMP_parallel_start (void (*) (void *), void *, unsigned);
  147. extern void GOMP_parallel_end (void);
  148. extern void GOMP_parallel (void (*) (void *), void *, unsigned, unsigned);
  149. extern bool GOMP_cancel (int, bool);
  150. extern bool GOMP_cancellation_point (int);
  151. /* task.c */
  152. extern void GOMP_task (void (*) (void *), void *, void (*) (void *, void *),
  153. long, long, bool, unsigned, void **);
  154. extern void GOMP_taskwait (void);
  155. extern void GOMP_taskyield (void);
  156. extern void GOMP_taskgroup_start (void);
  157. extern void GOMP_taskgroup_end (void);
  158. /* sections.c */
  159. extern unsigned GOMP_sections_start (unsigned);
  160. extern unsigned GOMP_sections_next (void);
  161. extern void GOMP_parallel_sections_start (void (*) (void *), void *,
  162. unsigned, unsigned);
  163. extern void GOMP_parallel_sections (void (*) (void *), void *,
  164. unsigned, unsigned, unsigned);
  165. extern void GOMP_sections_end (void);
  166. extern void GOMP_sections_end_nowait (void);
  167. extern bool GOMP_sections_end_cancel (void);
  168. /* single.c */
  169. extern bool GOMP_single_start (void);
  170. extern void *GOMP_single_copy_start (void);
  171. extern void GOMP_single_copy_end (void *);
  172. /* target.c */
  173. extern void GOMP_target (int, void (*) (void *), const void *,
  174. size_t, void **, size_t *, unsigned char *);
  175. extern void GOMP_target_data (int, const void *,
  176. size_t, void **, size_t *, unsigned char *);
  177. extern void GOMP_target_end_data (void);
  178. extern void GOMP_target_update (int, const void *,
  179. size_t, void **, size_t *, unsigned char *);
  180. extern void GOMP_teams (unsigned int, unsigned int);
  181. /* oacc-parallel.c */
  182. extern void GOACC_data_start (int, size_t, void **, size_t *,
  183. unsigned short *);
  184. extern void GOACC_data_end (void);
  185. extern void GOACC_enter_exit_data (int, size_t, void **,
  186. size_t *, unsigned short *, int, int, ...);
  187. extern void GOACC_parallel (int, void (*) (void *), size_t,
  188. void **, size_t *, unsigned short *, int, int, int,
  189. int, int, ...);
  190. extern void GOACC_update (int, size_t, void **, size_t *,
  191. unsigned short *, int, int, ...);
  192. extern void GOACC_wait (int, int, ...);
  193. extern int GOACC_get_num_threads (void);
  194. extern int GOACC_get_thread_num (void);
  195. #endif /* LIBGOMP_G_H */