running_driver.doxy 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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_Running_Drivers Running Drivers
  9. \fn int starpu_driver_run(struct starpu_driver *d)
  10. \ingroup API_Running_Drivers
  11. Initialize the given driver, run it until it receives a request to
  12. terminate, deinitialize it and return 0 on success. It returns
  13. <c>-EINVAL</c> if <c>d->type</c> is not a valid StarPU device type
  14. (::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER). This
  15. is the same as using the following functions: calling
  16. starpu_driver_init(), then calling starpu_driver_run_once() in a loop,
  17. and eventually starpu_driver_deinit().
  18. \fn int starpu_driver_init(struct starpu_driver *d)
  19. \ingroup API_Running_Drivers
  20. Initialize the given driver. Returns 0 on success, <c>-EINVAL</c> if
  21. <c>d->type</c> is not a valid ::starpu_worker_archtype.
  22. \fn int starpu_driver_run_once(struct starpu_driver *d)
  23. \ingroup API_Running_Drivers
  24. Run the driver once, then returns 0 on success, <c>-EINVAL</c> if <c>d->type</c> is not a valid ::starpu_worker_archtype.
  25. \fn int starpu_driver_deinit(struct starpu_driver *d)
  26. \ingroup API_Running_Drivers
  27. Deinitialize the given driver. Returns 0 on success, <c>-EINVAL</c> if
  28. <c>d->type</c> is not a valid ::starpu_worker_archtype.
  29. \fn void starpu_drivers_request_termination(void)
  30. \ingroup API_Running_Drivers
  31. Notify all running drivers they should terminate.
  32. */