StarPU Internal Handbook
copy_driver.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 * Copyright (C) 2021 Federal University of Rio Grande do Sul (UFRGS)
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 __COPY_DRIVER_H__
19#define __COPY_DRIVER_H__
20
23#ifdef HAVE_AIO_H
24#include <aio.h>
25#endif
26
27#include <common/config.h>
28#include <common/list.h>
29
30#pragma GCC visibility push(hidden)
31
32#ifdef __cplusplus
33extern "C"
34{
35#endif
36
37struct _starpu_data_request;
39
40enum _starpu_may_alloc
41{
42 _STARPU_DATAWIZARD_DO_NOT_ALLOC,
43 _STARPU_DATAWIZARD_DO_ALLOC,
44 _STARPU_DATAWIZARD_ONLY_FAST_ALLOC
45};
46
47
49 void *backend_event;
50);
51
53{
54 unsigned memory_node;
55 unsigned node;
56 struct _starpu_disk_backend_event_list * requests;
57
58 void * ptr;
59 size_t size;
60 starpu_data_handle_t handle;
61};
62
66{
67 char data[40];
68};
69
71{
73 const struct _starpu_node_ops *node_ops;
75 struct _starpu_mp_node *polling_node_sender;
76 struct _starpu_mp_node *polling_node_receiver;
79 volatile int starpu_mp_common_finished_receiver;
80};
81
82void _starpu_wake_all_blocked_workers_on_node(unsigned nodeid);
83
84int _starpu_driver_copy_data_1_to_1(starpu_data_handle_t handle,
85 struct _starpu_data_replicate *src_replicate,
86 struct _starpu_data_replicate *dst_replicate,
87 unsigned donotread,
88 struct _starpu_data_request *req,
89 enum _starpu_may_alloc may_alloc,
90 enum starpu_is_prefetch prefetch);
91
92int _starpu_copy_interface_any_to_any(starpu_data_handle_t handle, void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, struct _starpu_data_request *req);
93
94unsigned _starpu_driver_test_request_completion(struct _starpu_async_channel *async_channel);
95void _starpu_driver_wait_request_completion(struct _starpu_async_channel *async_channel);
96
97#ifdef __cplusplus
98}
99#endif
100
101#pragma GCC visibility pop
102
103#endif // __COPY_DRIVER_H__
Definition: coherency.h:47
volatile int starpu_mp_common_finished_sender
Definition: copy_driver.h:78
struct _starpu_mp_node * polling_node_sender
Definition: copy_driver.h:75
Definition: copy_driver.h:71
Definition: copy_driver.h:48
Definition: copy_driver.h:53
Definition: copy_driver.h:66
Definition: node_ops.h:92