StarPU Internal Handbook
driver_cpu.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2008-2022 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 __DRIVER_CPU_H__
18#define __DRIVER_CPU_H__
19
22#include <core/workers.h>
23#include <common/config.h>
24#include <datawizard/node_ops.h>
25
26#pragma GCC visibility push(hidden)
27
28void _starpu_cpu_preinit(void);
29
30extern struct _starpu_driver_ops _starpu_driver_cpu_ops;
31extern struct _starpu_node_ops _starpu_driver_cpu_node_ops;
32
33/* Reserve one CPU core as busy for starting a driver thread */
34void _starpu_cpu_busy_cpu(unsigned num);
35
36void _starpu_init_cpu_config(struct _starpu_machine_topology *topology, struct _starpu_machine_config *config);
37void _starpu_cpu_init_worker_binding(struct _starpu_machine_config *config, int no_mp_config STARPU_ATTRIBUTE_UNUSED, struct _starpu_worker *workerarg);
38void _starpu_cpu_init_worker_memory(struct _starpu_machine_config *config, int no_mp_config STARPU_ATTRIBUTE_UNUSED, struct _starpu_worker *workerarg);
39
40void *_starpu_cpu_worker(void *);
41
42int _starpu_cpu_copy_interface(starpu_data_handle_t handle, void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, struct _starpu_data_request *req);
43int _starpu_cpu_copy_data(uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t ssize, struct _starpu_async_channel *async_channel);
44
45int _starpu_cpu_is_direct_access_supported(unsigned node, unsigned handling_node);
46uintptr_t _starpu_cpu_malloc_on_node(unsigned dst_node, size_t size, int flags);
47void _starpu_cpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size, int flags);
48
49#pragma GCC visibility pop
50
51#endif // __DRIVER_CPU_H__
Definition: copy_driver.h:71
Definition: drivers.h:26
Definition: workers.h:441
Definition: workers.h:352
Definition: node_ops.h:92
Definition: workers.h:155