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,2017,2019 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 
40 {
49  union
50  {
51  unsigned cpu_id;
52  unsigned cuda_id;
53 #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
54  cl_device_id opencl_id;
55 #elif defined(STARPU_SIMGRID)
56  unsigned opencl_id;
57 #endif
58  } id;
59 };
60 
71 int starpu_driver_run(struct starpu_driver *d);
72 
77 
82 int starpu_driver_init(struct starpu_driver *d);
83 
89 
94 int starpu_driver_deinit(struct starpu_driver *d);
95 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif /* __STARPU_DRIVER_H__ */
enum starpu_worker_archtype type
Definition: starpu_driver.h:45
union starpu_driver::@0 id
starpu_worker_archtype
Definition: starpu_worker.h:61
void starpu_drivers_request_termination(void)
int starpu_driver_run_once(struct starpu_driver *d)
int starpu_driver_init(struct starpu_driver *d)
int starpu_driver_deinit(struct starpu_driver *d)
int starpu_driver_run(struct starpu_driver *d)
Definition: starpu_driver.h:39