StarPU Handbook

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