running_driver.doxy 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_Running_Drivers Running Drivers
  19. \struct starpu_driver
  20. structure for a driver
  21. \ingroup API_Running_Drivers
  22. \var enum starpu_worker_archtype starpu_driver::type
  23. Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER
  24. and ::STARPU_OPENCL_WORKER are currently supported.
  25. \var union starpu_driver::id
  26. Identifier of the driver.
  27. \fn int starpu_driver_run(struct starpu_driver *d)
  28. \ingroup API_Running_Drivers
  29. Initialize the given driver, run it until it receives a request to
  30. terminate, deinitialize it and return 0 on success. Return
  31. <c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type
  32. (::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).
  33. This is the same as using the following functions: calling
  34. starpu_driver_init(), then calling starpu_driver_run_once() in a loop,
  35. and finally starpu_driver_deinit().
  36. \fn int starpu_driver_init(struct starpu_driver *d)
  37. \ingroup API_Running_Drivers
  38. Initialize the given driver. Return 0 on success, <c>-EINVAL</c>
  39. if starpu_driver::type is not a valid ::starpu_worker_archtype.
  40. \fn int starpu_driver_run_once(struct starpu_driver *d)
  41. \ingroup API_Running_Drivers
  42. Run the driver once, then return 0 on success, <c>-EINVAL</c> if starpu_driver::type is not a valid ::starpu_worker_archtype.
  43. \fn int starpu_driver_deinit(struct starpu_driver *d)
  44. \ingroup API_Running_Drivers
  45. Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if
  46. starpu_driver::type is not a valid ::starpu_worker_archtype.
  47. \fn void starpu_drivers_request_termination(void)
  48. \ingroup API_Running_Drivers
  49. Notify all running drivers that they should terminate.
  50. */