task_bundles.doxy 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013 CNRS
  5. * Copyright (C) 2011, 2012 INRIA
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_Task_Bundles Task Bundles
  9. \typedef starpu_task_bundle_t
  10. \ingroup API_Task_Bundles
  11. Opaque structure describing a list of tasks that should be scheduled
  12. on the same worker whenever it’s possible. It must be considered as a
  13. hint given to the scheduler as there is no guarantee that they will be
  14. executed on the same worker.
  15. \fn void starpu_task_bundle_create(starpu_task_bundle_t *bundle)
  16. \ingroup API_Task_Bundles
  17. Factory function creating and initializing \p bundle, when the call
  18. returns, memory needed is allocated and \p bundle is ready to use.
  19. \fn int starpu_task_bundle_insert(starpu_task_bundle_t bundle, struct starpu_task *task)
  20. \ingroup API_Task_Bundles
  21. Insert \p task in \p bundle. Until \p task is removed from \p bundle
  22. its expected length and data transfer time will be considered along
  23. those of the other tasks of bundle. This function must not be called
  24. if \p bundle is already closed and/or \p task is already submitted.
  25. On success, it returns 0. There are two cases of error : if \p bundle
  26. is already closed it returns <c>-EPERM</c>, if \p task was already
  27. submitted it returns <c>-EINVAL</c>.
  28. \fn int starpu_task_bundle_remove(starpu_task_bundle_t bundle, struct starpu_task *task)
  29. \ingroup API_Task_Bundles
  30. Remove \p task from \p bundle. Of course \p task must have been
  31. previously inserted in \p bundle. This function must not be called if
  32. \p bundle is already closed and/or \p task is already submitted. Doing
  33. so would result in undefined behaviour. On success, it returns 0. If
  34. \p bundle is already closed it returns <c>-ENOENT</c>.
  35. \fn void starpu_task_bundle_close(starpu_task_bundle_t bundle)
  36. \ingroup API_Task_Bundles
  37. Inform the runtime that the user will not modify \p bundle anymore, it
  38. means no more inserting or removing task. Thus the runtime can destroy
  39. it when possible.
  40. \fn double starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, struct starpu_perfmodel_arch *arch, unsigned nimpl)
  41. \ingroup API_Task_Bundles
  42. Return the expected duration of \p bundle in micro-seconds.
  43. \fn double starpu_task_bundle_expected_power(starpu_task_bundle_t bundle, struct starpu_perfmodel_arch *arch, unsigned nimpl)
  44. \ingroup API_Task_Bundles
  45. Return the expected power consumption of \p bundle in J.
  46. \fn double starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node)
  47. \ingroup API_Task_Bundles
  48. Return the time (in micro-seconds) expected to transfer all data used within \p bundle.
  49. */