loop.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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 handles the LOOP (FOR/DO) construct. */
  21. #include <limits.h>
  22. #include <stdlib.h>
  23. #include "libgomp.h"
  24. /* Initialize the given work share construct from the given arguments. */
  25. static inline void
  26. gomp_loop_init (struct gomp_work_share *ws, long start, long end, long incr,
  27. enum gomp_schedule_type sched, long chunk_size)
  28. {
  29. ws->sched = sched;
  30. ws->chunk_size = chunk_size;
  31. /* Canonicalize loops that have zero iterations to ->next == ->end. */
  32. ws->end = ((incr > 0 && start > end) || (incr < 0 && start < end))
  33. ? start : end;
  34. ws->incr = incr;
  35. ws->next = start;
  36. if (sched == GFS_DYNAMIC)
  37. {
  38. ws->chunk_size *= incr;
  39. #ifdef HAVE_SYNC_BUILTINS
  40. {
  41. /* For dynamic scheduling prepare things to make each iteration
  42. faster. */
  43. struct gomp_thread *thr = gomp_thread ();
  44. struct gomp_team *team = thr->ts.team;
  45. long nthreads = team ? team->nthreads : 1;
  46. if (__builtin_expect (incr > 0, 1))
  47. {
  48. /* Cheap overflow protection. */
  49. if (__builtin_expect ((nthreads | ws->chunk_size)
  50. >= 1UL << (sizeof (long)
  51. * __CHAR_BIT__ / 2 - 1), 0))
  52. ws->mode = 0;
  53. else
  54. ws->mode = ws->end < (LONG_MAX
  55. - (nthreads + 1) * ws->chunk_size);
  56. }
  57. /* Cheap overflow protection. */
  58. else if (__builtin_expect ((nthreads | -ws->chunk_size)
  59. >= 1UL << (sizeof (long)
  60. * __CHAR_BIT__ / 2 - 1), 0))
  61. ws->mode = 0;
  62. else
  63. ws->mode = ws->end > (nthreads + 1) * -ws->chunk_size - LONG_MAX;
  64. }
  65. #endif
  66. }
  67. }
  68. /* The *_start routines are called when first encountering a loop construct
  69. that is not bound directly to a parallel construct. The first thread
  70. that arrives will create the work-share construct; subsequent threads
  71. will see the construct exists and allocate work from it.
  72. START, END, INCR are the bounds of the loop; due to the restrictions of
  73. OpenMP, these values must be the same in every thread. This is not
  74. verified (nor is it entirely verifiable, since START is not necessarily
  75. retained intact in the work-share data structure). CHUNK_SIZE is the
  76. scheduling parameter; again this must be identical in all threads.
  77. Returns true if there's any work for this thread to perform. If so,
  78. *ISTART and *IEND are filled with the bounds of the iteration block
  79. allocated to this thread. Returns false if all work was assigned to
  80. other threads prior to this thread's arrival. */
  81. static bool
  82. gomp_loop_static_start (long start, long end, long incr, long chunk_size,
  83. long *istart, long *iend)
  84. {
  85. struct gomp_thread *thr = gomp_thread ();
  86. thr->ts.static_trip = 0;
  87. if (gomp_work_share_start (false))
  88. {
  89. gomp_loop_init (thr->ts.work_share, start, end, incr,
  90. GFS_STATIC, chunk_size);
  91. gomp_work_share_init_done ();
  92. }
  93. return !gomp_iter_static_next (istart, iend);
  94. }
  95. static bool
  96. gomp_loop_dynamic_start (long start, long end, long incr, long chunk_size,
  97. long *istart, long *iend)
  98. {
  99. struct gomp_thread *thr = gomp_thread ();
  100. bool ret;
  101. if (gomp_work_share_start (false))
  102. {
  103. gomp_loop_init (thr->ts.work_share, start, end, incr,
  104. GFS_DYNAMIC, chunk_size);
  105. gomp_work_share_init_done ();
  106. }
  107. #ifdef HAVE_SYNC_BUILTINS
  108. ret = gomp_iter_dynamic_next (istart, iend);
  109. #else
  110. gomp_mutex_lock (&thr->ts.work_share->lock);
  111. ret = gomp_iter_dynamic_next_locked (istart, iend);
  112. gomp_mutex_unlock (&thr->ts.work_share->lock);
  113. #endif
  114. return ret;
  115. }
  116. static bool
  117. gomp_loop_guided_start (long start, long end, long incr, long chunk_size,
  118. long *istart, long *iend)
  119. {
  120. struct gomp_thread *thr = gomp_thread ();
  121. bool ret;
  122. if (gomp_work_share_start (false))
  123. {
  124. gomp_loop_init (thr->ts.work_share, start, end, incr,
  125. GFS_GUIDED, chunk_size);
  126. gomp_work_share_init_done ();
  127. }
  128. #ifdef HAVE_SYNC_BUILTINS
  129. ret = gomp_iter_guided_next (istart, iend);
  130. #else
  131. gomp_mutex_lock (&thr->ts.work_share->lock);
  132. ret = gomp_iter_guided_next_locked (istart, iend);
  133. gomp_mutex_unlock (&thr->ts.work_share->lock);
  134. #endif
  135. return ret;
  136. }
  137. bool
  138. GOMP_loop_runtime_start (long start, long end, long incr,
  139. long *istart, long *iend)
  140. {
  141. struct gomp_task_icv *icv = gomp_icv (false);
  142. switch (icv->run_sched_var)
  143. {
  144. case GFS_STATIC:
  145. return gomp_loop_static_start (start, end, incr, icv->run_sched_modifier,
  146. istart, iend);
  147. case GFS_DYNAMIC:
  148. return gomp_loop_dynamic_start (start, end, incr, icv->run_sched_modifier,
  149. istart, iend);
  150. case GFS_GUIDED:
  151. return gomp_loop_guided_start (start, end, incr, icv->run_sched_modifier,
  152. istart, iend);
  153. case GFS_AUTO:
  154. /* For now map to schedule(static), later on we could play with feedback
  155. driven choice. */
  156. return gomp_loop_static_start (start, end, incr, 0, istart, iend);
  157. default:
  158. abort ();
  159. }
  160. }
  161. /* The *_ordered_*_start routines are similar. The only difference is that
  162. this work-share construct is initialized to expect an ORDERED section. */
  163. static bool
  164. gomp_loop_ordered_static_start (long start, long end, long incr,
  165. long chunk_size, long *istart, long *iend)
  166. {
  167. struct gomp_thread *thr = gomp_thread ();
  168. thr->ts.static_trip = 0;
  169. if (gomp_work_share_start (true))
  170. {
  171. gomp_loop_init (thr->ts.work_share, start, end, incr,
  172. GFS_STATIC, chunk_size);
  173. gomp_ordered_static_init ();
  174. gomp_work_share_init_done ();
  175. }
  176. return !gomp_iter_static_next (istart, iend);
  177. }
  178. static bool
  179. gomp_loop_ordered_dynamic_start (long start, long end, long incr,
  180. long chunk_size, long *istart, long *iend)
  181. {
  182. struct gomp_thread *thr = gomp_thread ();
  183. bool ret;
  184. if (gomp_work_share_start (true))
  185. {
  186. gomp_loop_init (thr->ts.work_share, start, end, incr,
  187. GFS_DYNAMIC, chunk_size);
  188. gomp_mutex_lock (&thr->ts.work_share->lock);
  189. gomp_work_share_init_done ();
  190. }
  191. else
  192. gomp_mutex_lock (&thr->ts.work_share->lock);
  193. ret = gomp_iter_dynamic_next_locked (istart, iend);
  194. if (ret)
  195. gomp_ordered_first ();
  196. gomp_mutex_unlock (&thr->ts.work_share->lock);
  197. return ret;
  198. }
  199. static bool
  200. gomp_loop_ordered_guided_start (long start, long end, long incr,
  201. long chunk_size, long *istart, long *iend)
  202. {
  203. struct gomp_thread *thr = gomp_thread ();
  204. bool ret;
  205. if (gomp_work_share_start (true))
  206. {
  207. gomp_loop_init (thr->ts.work_share, start, end, incr,
  208. GFS_GUIDED, chunk_size);
  209. gomp_mutex_lock (&thr->ts.work_share->lock);
  210. gomp_work_share_init_done ();
  211. }
  212. else
  213. gomp_mutex_lock (&thr->ts.work_share->lock);
  214. ret = gomp_iter_guided_next_locked (istart, iend);
  215. if (ret)
  216. gomp_ordered_first ();
  217. gomp_mutex_unlock (&thr->ts.work_share->lock);
  218. return ret;
  219. }
  220. bool
  221. GOMP_loop_ordered_runtime_start (long start, long end, long incr,
  222. long *istart, long *iend)
  223. {
  224. struct gomp_task_icv *icv = gomp_icv (false);
  225. switch (icv->run_sched_var)
  226. {
  227. case GFS_STATIC:
  228. return gomp_loop_ordered_static_start (start, end, incr,
  229. icv->run_sched_modifier,
  230. istart, iend);
  231. case GFS_DYNAMIC:
  232. return gomp_loop_ordered_dynamic_start (start, end, incr,
  233. icv->run_sched_modifier,
  234. istart, iend);
  235. case GFS_GUIDED:
  236. return gomp_loop_ordered_guided_start (start, end, incr,
  237. icv->run_sched_modifier,
  238. istart, iend);
  239. case GFS_AUTO:
  240. /* For now map to schedule(static), later on we could play with feedback
  241. driven choice. */
  242. return gomp_loop_ordered_static_start (start, end, incr,
  243. 0, istart, iend);
  244. default:
  245. abort ();
  246. }
  247. }
  248. /* The *_next routines are called when the thread completes processing of
  249. the iteration block currently assigned to it. If the work-share
  250. construct is bound directly to a parallel construct, then the iteration
  251. bounds may have been set up before the parallel. In which case, this
  252. may be the first iteration for the thread.
  253. Returns true if there is work remaining to be performed; *ISTART and
  254. *IEND are filled with a new iteration block. Returns false if all work
  255. has been assigned. */
  256. static bool
  257. gomp_loop_static_next (long *istart, long *iend)
  258. {
  259. return !gomp_iter_static_next (istart, iend);
  260. }
  261. static bool
  262. gomp_loop_dynamic_next (long *istart, long *iend)
  263. {
  264. bool ret;
  265. #ifdef HAVE_SYNC_BUILTINS
  266. ret = gomp_iter_dynamic_next (istart, iend);
  267. #else
  268. struct gomp_thread *thr = gomp_thread ();
  269. gomp_mutex_lock (&thr->ts.work_share->lock);
  270. ret = gomp_iter_dynamic_next_locked (istart, iend);
  271. gomp_mutex_unlock (&thr->ts.work_share->lock);
  272. #endif
  273. return ret;
  274. }
  275. static bool
  276. gomp_loop_guided_next (long *istart, long *iend)
  277. {
  278. bool ret;
  279. #ifdef HAVE_SYNC_BUILTINS
  280. ret = gomp_iter_guided_next (istart, iend);
  281. #else
  282. struct gomp_thread *thr = gomp_thread ();
  283. gomp_mutex_lock (&thr->ts.work_share->lock);
  284. ret = gomp_iter_guided_next_locked (istart, iend);
  285. gomp_mutex_unlock (&thr->ts.work_share->lock);
  286. #endif
  287. return ret;
  288. }
  289. bool
  290. GOMP_loop_runtime_next (long *istart, long *iend)
  291. {
  292. struct gomp_thread *thr = gomp_thread ();
  293. switch (thr->ts.work_share->sched)
  294. {
  295. case GFS_STATIC:
  296. case GFS_AUTO:
  297. return gomp_loop_static_next (istart, iend);
  298. case GFS_DYNAMIC:
  299. return gomp_loop_dynamic_next (istart, iend);
  300. case GFS_GUIDED:
  301. return gomp_loop_guided_next (istart, iend);
  302. default:
  303. abort ();
  304. }
  305. }
  306. /* The *_ordered_*_next routines are called when the thread completes
  307. processing of the iteration block currently assigned to it.
  308. Returns true if there is work remaining to be performed; *ISTART and
  309. *IEND are filled with a new iteration block. Returns false if all work
  310. has been assigned. */
  311. static bool
  312. gomp_loop_ordered_static_next (long *istart, long *iend)
  313. {
  314. struct gomp_thread *thr = gomp_thread ();
  315. int test;
  316. gomp_ordered_sync ();
  317. gomp_mutex_lock (&thr->ts.work_share->lock);
  318. test = gomp_iter_static_next (istart, iend);
  319. if (test >= 0)
  320. gomp_ordered_static_next ();
  321. gomp_mutex_unlock (&thr->ts.work_share->lock);
  322. return test == 0;
  323. }
  324. static bool
  325. gomp_loop_ordered_dynamic_next (long *istart, long *iend)
  326. {
  327. struct gomp_thread *thr = gomp_thread ();
  328. bool ret;
  329. gomp_ordered_sync ();
  330. gomp_mutex_lock (&thr->ts.work_share->lock);
  331. ret = gomp_iter_dynamic_next_locked (istart, iend);
  332. if (ret)
  333. gomp_ordered_next ();
  334. else
  335. gomp_ordered_last ();
  336. gomp_mutex_unlock (&thr->ts.work_share->lock);
  337. return ret;
  338. }
  339. static bool
  340. gomp_loop_ordered_guided_next (long *istart, long *iend)
  341. {
  342. struct gomp_thread *thr = gomp_thread ();
  343. bool ret;
  344. gomp_ordered_sync ();
  345. gomp_mutex_lock (&thr->ts.work_share->lock);
  346. ret = gomp_iter_guided_next_locked (istart, iend);
  347. if (ret)
  348. gomp_ordered_next ();
  349. else
  350. gomp_ordered_last ();
  351. gomp_mutex_unlock (&thr->ts.work_share->lock);
  352. return ret;
  353. }
  354. bool
  355. GOMP_loop_ordered_runtime_next (long *istart, long *iend)
  356. {
  357. struct gomp_thread *thr = gomp_thread ();
  358. switch (thr->ts.work_share->sched)
  359. {
  360. case GFS_STATIC:
  361. case GFS_AUTO:
  362. return gomp_loop_ordered_static_next (istart, iend);
  363. case GFS_DYNAMIC:
  364. return gomp_loop_ordered_dynamic_next (istart, iend);
  365. case GFS_GUIDED:
  366. return gomp_loop_ordered_guided_next (istart, iend);
  367. default:
  368. abort ();
  369. }
  370. }
  371. /* The GOMP_parallel_loop_* routines pre-initialize a work-share construct
  372. to avoid one synchronization once we get into the loop. */
  373. static void
  374. gomp_parallel_loop_start (void (*fn) (void *), void *data,
  375. unsigned num_threads, long start, long end,
  376. long incr, enum gomp_schedule_type sched,
  377. long chunk_size, unsigned int flags)
  378. {
  379. struct gomp_team *team;
  380. num_threads = gomp_resolve_num_threads (num_threads, 0);
  381. team = gomp_new_team (num_threads);
  382. gomp_loop_init (&team->work_shares[0], start, end, incr, sched, chunk_size);
  383. gomp_team_start (fn, data, num_threads, flags, team);
  384. }
  385. void
  386. GOMP_parallel_loop_static_start (void (*fn) (void *), void *data,
  387. unsigned num_threads, long start, long end,
  388. long incr, long chunk_size)
  389. {
  390. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  391. GFS_STATIC, chunk_size, 0);
  392. }
  393. void
  394. GOMP_parallel_loop_dynamic_start (void (*fn) (void *), void *data,
  395. unsigned num_threads, long start, long end,
  396. long incr, long chunk_size)
  397. {
  398. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  399. GFS_DYNAMIC, chunk_size, 0);
  400. }
  401. void
  402. GOMP_parallel_loop_guided_start (void (*fn) (void *), void *data,
  403. unsigned num_threads, long start, long end,
  404. long incr, long chunk_size)
  405. {
  406. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  407. GFS_GUIDED, chunk_size, 0);
  408. }
  409. void
  410. GOMP_parallel_loop_runtime_start (void (*fn) (void *), void *data,
  411. unsigned num_threads, long start, long end,
  412. long incr)
  413. {
  414. struct gomp_task_icv *icv = gomp_icv (false);
  415. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  416. icv->run_sched_var, icv->run_sched_modifier, 0);
  417. }
  418. ialias_redirect (GOMP_parallel_end)
  419. void
  420. GOMP_parallel_loop_static (void (*fn) (void *), void *data,
  421. unsigned num_threads, long start, long end,
  422. long incr, long chunk_size, unsigned flags)
  423. {
  424. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  425. GFS_STATIC, chunk_size, flags);
  426. fn (data);
  427. GOMP_parallel_end ();
  428. }
  429. void
  430. GOMP_parallel_loop_dynamic (void (*fn) (void *), void *data,
  431. unsigned num_threads, long start, long end,
  432. long incr, long chunk_size, unsigned flags)
  433. {
  434. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  435. GFS_DYNAMIC, chunk_size, flags);
  436. fn (data);
  437. GOMP_parallel_end ();
  438. }
  439. void
  440. GOMP_parallel_loop_guided (void (*fn) (void *), void *data,
  441. unsigned num_threads, long start, long end,
  442. long incr, long chunk_size, unsigned flags)
  443. {
  444. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  445. GFS_GUIDED, chunk_size, flags);
  446. fn (data);
  447. GOMP_parallel_end ();
  448. }
  449. void
  450. GOMP_parallel_loop_runtime (void (*fn) (void *), void *data,
  451. unsigned num_threads, long start, long end,
  452. long incr, unsigned flags)
  453. {
  454. struct gomp_task_icv *icv = gomp_icv (false);
  455. gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
  456. icv->run_sched_var, icv->run_sched_modifier,
  457. flags);
  458. fn (data);
  459. GOMP_parallel_end ();
  460. }
  461. /* The GOMP_loop_end* routines are called after the thread is told that
  462. all loop iterations are complete. The first two versions synchronize
  463. all threads; the nowait version does not. */
  464. void
  465. GOMP_loop_end (void)
  466. {
  467. gomp_work_share_end ();
  468. }
  469. bool
  470. GOMP_loop_end_cancel (void)
  471. {
  472. return gomp_work_share_end_cancel ();
  473. }
  474. void
  475. GOMP_loop_end_nowait (void)
  476. {
  477. gomp_work_share_end_nowait ();
  478. }
  479. /* We use static functions above so that we're sure that the "runtime"
  480. function can defer to the proper routine without interposition. We
  481. export the static function with a strong alias when possible, or with
  482. a wrapper function otherwise. */
  483. #ifdef HAVE_ATTRIBUTE_ALIAS
  484. extern __typeof(gomp_loop_static_start) GOMP_loop_static_start
  485. __attribute__((alias ("gomp_loop_static_start")));
  486. extern __typeof(gomp_loop_dynamic_start) GOMP_loop_dynamic_start
  487. __attribute__((alias ("gomp_loop_dynamic_start")));
  488. extern __typeof(gomp_loop_guided_start) GOMP_loop_guided_start
  489. __attribute__((alias ("gomp_loop_guided_start")));
  490. extern __typeof(gomp_loop_ordered_static_start) GOMP_loop_ordered_static_start
  491. __attribute__((alias ("gomp_loop_ordered_static_start")));
  492. extern __typeof(gomp_loop_ordered_dynamic_start) GOMP_loop_ordered_dynamic_start
  493. __attribute__((alias ("gomp_loop_ordered_dynamic_start")));
  494. extern __typeof(gomp_loop_ordered_guided_start) GOMP_loop_ordered_guided_start
  495. __attribute__((alias ("gomp_loop_ordered_guided_start")));
  496. extern __typeof(gomp_loop_static_next) GOMP_loop_static_next
  497. __attribute__((alias ("gomp_loop_static_next")));
  498. extern __typeof(gomp_loop_dynamic_next) GOMP_loop_dynamic_next
  499. __attribute__((alias ("gomp_loop_dynamic_next")));
  500. extern __typeof(gomp_loop_guided_next) GOMP_loop_guided_next
  501. __attribute__((alias ("gomp_loop_guided_next")));
  502. extern __typeof(gomp_loop_ordered_static_next) GOMP_loop_ordered_static_next
  503. __attribute__((alias ("gomp_loop_ordered_static_next")));
  504. extern __typeof(gomp_loop_ordered_dynamic_next) GOMP_loop_ordered_dynamic_next
  505. __attribute__((alias ("gomp_loop_ordered_dynamic_next")));
  506. extern __typeof(gomp_loop_ordered_guided_next) GOMP_loop_ordered_guided_next
  507. __attribute__((alias ("gomp_loop_ordered_guided_next")));
  508. #else
  509. bool
  510. GOMP_loop_static_start (long start, long end, long incr, long chunk_size,
  511. long *istart, long *iend)
  512. {
  513. return gomp_loop_static_start (start, end, incr, chunk_size, istart, iend);
  514. }
  515. bool
  516. GOMP_loop_dynamic_start (long start, long end, long incr, long chunk_size,
  517. long *istart, long *iend)
  518. {
  519. return gomp_loop_dynamic_start (start, end, incr, chunk_size, istart, iend);
  520. }
  521. bool
  522. GOMP_loop_guided_start (long start, long end, long incr, long chunk_size,
  523. long *istart, long *iend)
  524. {
  525. return gomp_loop_guided_start (start, end, incr, chunk_size, istart, iend);
  526. }
  527. bool
  528. GOMP_loop_ordered_static_start (long start, long end, long incr,
  529. long chunk_size, long *istart, long *iend)
  530. {
  531. return gomp_loop_ordered_static_start (start, end, incr, chunk_size,
  532. istart, iend);
  533. }
  534. bool
  535. GOMP_loop_ordered_dynamic_start (long start, long end, long incr,
  536. long chunk_size, long *istart, long *iend)
  537. {
  538. return gomp_loop_ordered_dynamic_start (start, end, incr, chunk_size,
  539. istart, iend);
  540. }
  541. bool
  542. GOMP_loop_ordered_guided_start (long start, long end, long incr,
  543. long chunk_size, long *istart, long *iend)
  544. {
  545. return gomp_loop_ordered_guided_start (start, end, incr, chunk_size,
  546. istart, iend);
  547. }
  548. bool
  549. GOMP_loop_static_next (long *istart, long *iend)
  550. {
  551. return gomp_loop_static_next (istart, iend);
  552. }
  553. bool
  554. GOMP_loop_dynamic_next (long *istart, long *iend)
  555. {
  556. return gomp_loop_dynamic_next (istart, iend);
  557. }
  558. bool
  559. GOMP_loop_guided_next (long *istart, long *iend)
  560. {
  561. return gomp_loop_guided_next (istart, iend);
  562. }
  563. bool
  564. GOMP_loop_ordered_static_next (long *istart, long *iend)
  565. {
  566. return gomp_loop_ordered_static_next (istart, iend);
  567. }
  568. bool
  569. GOMP_loop_ordered_dynamic_next (long *istart, long *iend)
  570. {
  571. return gomp_loop_ordered_dynamic_next (istart, iend);
  572. }
  573. bool
  574. GOMP_loop_ordered_guided_next (long *istart, long *iend)
  575. {
  576. return gomp_loop_ordered_guided_next (istart, iend);
  577. }
  578. #endif