/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2010-2013,2015,2017 CNRS
* Copyright (C) 2009-2011,2014 Université de Bordeaux
* Copyright (C) 2011-2012 Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
/*! \defgroup API_Running_Drivers Running Drivers
\struct starpu_driver
structure for a driver
\ingroup API_Running_Drivers
\var enum starpu_worker_archtype starpu_driver::type
Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER
and ::STARPU_OPENCL_WORKER are currently supported.
\var union starpu_driver::id
Identifier of the driver.
\fn int starpu_driver_run(struct starpu_driver *d)
\ingroup API_Running_Drivers
Initialize the given driver, run it until it receives a request to
terminate, deinitialize it and return 0 on success. Return
-EINVAL if starpu_driver::type is not a valid StarPU device type
(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).
This is the same as using the following functions: calling
starpu_driver_init(), then calling starpu_driver_run_once() in a loop,
and finally starpu_driver_deinit().
\fn int starpu_driver_init(struct starpu_driver *d)
\ingroup API_Running_Drivers
Initialize the given driver. Return 0 on success, -EINVAL
if starpu_driver::type is not a valid ::starpu_worker_archtype.
\fn int starpu_driver_run_once(struct starpu_driver *d)
\ingroup API_Running_Drivers
Run the driver once, then return 0 on success, -EINVAL if starpu_driver::type is not a valid ::starpu_worker_archtype.
\fn int starpu_driver_deinit(struct starpu_driver *d)
\ingroup API_Running_Drivers
Deinitialize the given driver. Return 0 on success, -EINVAL if
starpu_driver::type is not a valid ::starpu_worker_archtype.
\fn void starpu_drivers_request_termination(void)
\ingroup API_Running_Drivers
Notify all running drivers that they should terminate.
*/