parallel_tasks.doxy 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2013,2015,2017 CNRS
  4. * Copyright (C) 2009-2011,2014 Université de Bordeaux
  5. * Copyright (C) 2011-2012 Inria
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. /*! \defgroup API_Parallel_Tasks Parallel Tasks
  19. \fn int starpu_combined_worker_get_size(void)
  20. \ingroup API_Parallel_Tasks
  21. Return the size of the current combined worker, i.e. the total number
  22. of cpus running the same task in the case of ::STARPU_SPMD parallel
  23. tasks, or the total number of threads that the task is allowed to
  24. start in the case of ::STARPU_FORKJOIN parallel tasks.
  25. \fn int starpu_combined_worker_get_rank(void)
  26. \ingroup API_Parallel_Tasks
  27. Return the rank of the current thread within the combined worker. Can
  28. only be used in ::STARPU_FORKJOIN parallel tasks, to know which part
  29. of the task to work on.
  30. \fn unsigned starpu_combined_worker_get_count(void)
  31. \ingroup API_Parallel_Tasks
  32. Return the number of different combined workers.
  33. \fn int starpu_combined_worker_get_id(void)
  34. \ingroup API_Parallel_Tasks
  35. Return the identifier of the current combined worker.
  36. \fn int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
  37. \ingroup API_Parallel_Tasks
  38. Register a new combined worker and get its identifier
  39. \fn int starpu_combined_worker_get_description(int workerid, int *worker_size, int **combined_workerid)
  40. \ingroup API_Parallel_Tasks
  41. Get the description of a combined worker
  42. \fn int starpu_combined_worker_can_execute_task(unsigned workerid, struct starpu_task *task, unsigned nimpl)
  43. \ingroup API_Parallel_Tasks
  44. Variant of starpu_worker_can_execute_task() compatible with combined
  45. workers
  46. \fn void starpu_parallel_task_barrier_init(struct starpu_task *task, int workerid)
  47. \ingroup API_Parallel_Tasks
  48. Initialise the barrier for the parallel task, and dispatch the task
  49. between the different workers of the given combined worker.
  50. \fn void starpu_parallel_task_barrier_init_n(struct starpu_task *task, int worker_size)
  51. \ingroup API_Parallel_Tasks
  52. Initialise the barrier for the parallel task, to be pushed to \p worker_size
  53. workers (without having to explicit a given combined worker).
  54. */