parallel_tasks.doxy 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup Parallel_Tasks Parallel Tasks
  9. \fn int starpu_combined_worker_get_size(void)
  10. \ingroup Parallel_Tasks
  11. Return the size of the current combined worker, i.e. the total number
  12. of cpus running the same task in the case of ::STARPU_SPMD parallel
  13. tasks, or the total number of threads that the task is allowed to
  14. start in the case of ::STARPU_FORKJOIN parallel tasks.
  15. \fn int starpu_combined_worker_get_rank(void)
  16. \ingroup Parallel_Tasks
  17. Return the rank of the current thread within the combined worker. Can
  18. only be used in ::STARPU_FORKJOIN parallel tasks, to know which part
  19. of the task to work on.
  20. \fn unsigned starpu_combined_worker_get_count(void)
  21. \ingroup Parallel_Tasks
  22. Return the number of different combined workers.
  23. \fn int starpu_combined_worker_get_id(void)
  24. \ingroup Parallel_Tasks
  25. Return the identifier of the current combined worker.
  26. \fn int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
  27. \ingroup Parallel_Tasks
  28. Register a new combined worker and get its identifier
  29. \fn int starpu_combined_worker_get_description(int workerid, int *worker_size, int **combined_workerid)
  30. \ingroup Parallel_Tasks
  31. Get the description of a combined worker
  32. \fn int starpu_combined_worker_can_execute_task(unsigned workerid, struct starpu_task *task, unsigned nimpl)
  33. \ingroup Parallel_Tasks
  34. Variant of starpu_worker_can_execute_task() compatible with combined
  35. workers
  36. \fn void starpu_parallel_task_barrier_init(struct starpu_task*task, int workerid)
  37. \ingroup Parallel_Tasks
  38. Initialise the barrier for the parallel task, and dispatch the task
  39. between the different combined workers.
  40. \struct starpu_machine_topology
  41. \ingroup Parallel_Tasks
  42. \var starpu_machine_topology::nworkers
  43. Total number of workers.
  44. \var starpu_machine_topology::ncombinedworkers
  45. Total number of combined workers.
  46. \var starpu_machine_topology::hwtopology
  47. Topology as detected by hwloc. To maintain ABI compatibility
  48. when hwloc is not available, the field is replaced with <c>void *dummy</c>
  49. \var starpu_machine_topology::nhwcpus
  50. Total number of CPUs, as detected by the topology code. May be
  51. different from the actual number of CPU workers.
  52. \var starpu_machine_topology::nhwcudagpus
  53. Total number of CUDA devices, as detected. May be different
  54. from the actual number of CUDA workers.
  55. \var starpu_machine_topology::nhwopenclgpus
  56. Total number of OpenCL devices, as detected. May be different
  57. from the actual number of OpenCL workers.
  58. \var starpu_machine_topology::ncpus
  59. Actual number of CPU workers used by StarPU.
  60. \var starpu_machine_topology::ncudagpus
  61. Actual number of CUDA workers used by StarPU.
  62. \var starpu_machine_topology::nopenclgpus
  63. Actual number of OpenCL workers used by StarPU.
  64. \var starpu_machine_topology::workers_bindid
  65. Indicates the successive cpu identifier that should be used to
  66. bind the workers. It is either filled according to the user’s
  67. explicit parameters (from starpu_conf()) or according to the
  68. STARPU_WORKERS_CPUID environment variable. Otherwise, a
  69. round-robin policy is used to distributed the workers over the cpus.
  70. \var starpu_machine_topology::workers_cuda_gpuid
  71. Indicates the successive cuda identifier that should be used by
  72. the CUDA driver. It is either filled according to the user’s
  73. explicit parameters (from starpu_conf()) or according to the
  74. STARPU_WORKERS_CUDAID environment variable. Otherwise, they are taken
  75. in ID order.
  76. \var starpu_machine_topology::workers_opencl_gpuid
  77. Indicates the successive OpenCL identifier that should be used
  78. by the OpenCL driver. It is either filled according to the
  79. user’s explicit parameters (from starpu_conf()) or according to
  80. the STARPU_WORKERS_OPENCLID environment variable. Otherwise,
  81. they are taken in ID order.
  82. */