StarPU Internal Handbook
data_interface.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 __DATA_INTERFACE_H__
18 #define __DATA_INTERFACE_H__
19 
22 #include <starpu.h>
23 #include <common/config.h>
24 #include <common/uthash.h>
25 #ifdef STARPU_OPENMP
27 #endif
28 
29 #pragma GCC visibility push(hidden)
30 
35 {
36  /* struct starpu_void_interface void; void doesn't have any data */
37  struct starpu_variable_interface variable;
38  struct starpu_vector_interface vector;
39  struct starpu_matrix_interface matrix;
40  struct starpu_block_interface block;
41  struct starpu_tensor_interface tensor;
42  struct starpu_csr_interface csr;
43  struct starpu_bcsr_interface bcsr;
44  struct starpu_coo_interface coo;
45 };
46 
48 extern struct starpu_data_interface_ops starpu_interface_multiformat_ops;
49 
50 void _starpu_data_free_interfaces(starpu_data_handle_t handle);
51 
52 extern int _starpu_data_handle_init(starpu_data_handle_t handle, struct starpu_data_interface_ops *interface_ops, unsigned int mf_node);
53 void _starpu_data_initialize_per_worker(starpu_data_handle_t handle);
54 
55 extern struct starpu_arbiter *_starpu_global_arbiter;
56 extern void _starpu_data_interface_init(void);
57 extern int __starpu_data_check_not_busy(starpu_data_handle_t handle) STARPU_ATTRIBUTE_WARN_UNUSED_RESULT;
58 #define _starpu_data_check_not_busy(handle) \
59  (STARPU_UNLIKELY(!handle->busy_count && \
60  (handle->busy_waiting || handle->lazy_unregister)) ? \
61  __starpu_data_check_not_busy(handle) : 0)
62 extern void _starpu_data_interface_shutdown(void);
63 
64 struct starpu_data_interface_ops *_starpu_data_interface_get_ops(unsigned interface_id) STARPU_ATTRIBUTE_VISIBILITY_DEFAULT;
65 
66 #define _starpu_data_is_multiformat_handle(handle) handle->ops->is_multiformat
67 
68 void _starpu_data_invalidate_submit_noplan(starpu_data_handle_t handle);
69 
70 #pragma GCC visibility pop
71 
72 #endif // __DATA_INTERFACE_H__
struct starpu_data_interface_ops starpu_interface_multiformat_ops
Definition: data_interface.h:35
Definition: malloc.h:75