task_bundles.doxy 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2013,2015,2017 CNRS
  4. * Copyright (C) 2009-2011,2014,2016 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_Task_Bundles Task Bundles
  19. \typedef starpu_task_bundle_t
  20. \ingroup API_Task_Bundles
  21. Opaque structure describing a list of tasks that should be scheduled
  22. on the same worker whenever it’s possible. It must be considered as a
  23. hint given to the scheduler as there is no guarantee that they will be
  24. executed on the same worker.
  25. \fn void starpu_task_bundle_create(starpu_task_bundle_t *bundle)
  26. \ingroup API_Task_Bundles
  27. Factory function creating and initializing \p bundle, when the call
  28. returns, memory needed is allocated and \p bundle is ready to use.
  29. \fn int starpu_task_bundle_insert(starpu_task_bundle_t bundle, struct starpu_task *task)
  30. \ingroup API_Task_Bundles
  31. Insert \p task in \p bundle. Until \p task is removed from \p bundle
  32. its expected length and data transfer time will be considered along
  33. those of the other tasks of bundle. This function must not be called
  34. if \p bundle is already closed and/or \p task is already submitted.
  35. On success, it returns 0. There are two cases of error : if \p bundle
  36. is already closed it returns <c>-EPERM</c>, if \p task was already
  37. submitted it returns <c>-EINVAL</c>.
  38. \fn int starpu_task_bundle_remove(starpu_task_bundle_t bundle, struct starpu_task *task)
  39. \ingroup API_Task_Bundles
  40. Remove \p task from \p bundle. Of course \p task must have been
  41. previously inserted in \p bundle. This function must not be called if
  42. \p bundle is already closed and/or \p task is already submitted. Doing
  43. so would result in undefined behaviour. On success, it returns 0. If
  44. \p bundle is already closed it returns <c>-ENOENT</c>.
  45. \fn void starpu_task_bundle_close(starpu_task_bundle_t bundle)
  46. \ingroup API_Task_Bundles
  47. Inform the runtime that the user will not modify \p bundle anymore, it
  48. means no more inserting or removing task. Thus the runtime can destroy
  49. it when possible.
  50. \fn double starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, struct starpu_perfmodel_arch *arch, unsigned nimpl)
  51. \ingroup API_Task_Bundles
  52. Return the expected duration of \p bundle in micro-seconds.
  53. \fn double starpu_task_bundle_expected_energy(starpu_task_bundle_t bundle, struct starpu_perfmodel_arch *arch, unsigned nimpl)
  54. \ingroup API_Task_Bundles
  55. Return the expected energy consumption of \p bundle in J.
  56. \fn double starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node)
  57. \ingroup API_Task_Bundles
  58. Return the time (in micro-seconds) expected to transfer all data used within \p bundle.
  59. */