StarPU Handbook
starpu_driver.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2010-2013,2015 CNRS
4  * Copyright (C) 2009-2014 Université de Bordeaux
5  *
6  * StarPU is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or (at
9  * your option) any later version.
10  *
11  * StarPU is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  *
15  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
16  */
17 
18 #ifndef __STARPU_DRIVER_H__
19 #define __STARPU_DRIVER_H__
20 
21 #include <starpu_config.h>
22 #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
23 #include <starpu_opencl.h>
24 #endif
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
32 {
34  union
35  {
36  unsigned cpu_id;
37  unsigned cuda_id;
38 #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
39  cl_device_id opencl_id;
40 #elif defined(STARPU_SIMGRID)
41  unsigned opencl_id;
42 #endif
43  } id;
44 };
45 
46 int starpu_driver_run(struct starpu_driver *d);
48 
49 int starpu_driver_init(struct starpu_driver *d);
51 int starpu_driver_deinit(struct starpu_driver *d);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif /* __STARPU_DRIVER_H__ */
enum starpu_worker_archtype type
Definition: starpu_driver.h:33
Definition: starpu_driver.h:31
starpu_worker_archtype
Definition: starpu_worker.h:31
void starpu_drivers_request_termination(void)
int starpu_driver_run_once(struct starpu_driver *d)
int starpu_driver_init(struct starpu_driver *d)
union starpu_driver::@0 id
int starpu_driver_deinit(struct starpu_driver *d)
int starpu_driver_run(struct starpu_driver *d)