StarPU Handbook

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
starpu_data_interfaces.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2010-2013 Université de Bordeaux 1
4 * Copyright (C) 2010-2013 Centre National de la Recherche Scientifique
5 * Copyright (C) 2011-2012 Institut National de Recherche en Informatique et Automatique
6 *
7 * StarPU is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
11 *
12 * StarPU is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 *
16 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
17 */
18
19 #ifndef __STARPU_DATA_INTERFACES_H__
20 #define __STARPU_DATA_INTERFACES_H__
21
22 #include <starpu.h>
23
24 #ifdef STARPU_USE_CUDA
25 /* to use CUDA streams */
26 # ifdef STARPU_DONT_INCLUDE_CUDA_HEADERS
27 typedef void *cudaStream_t;
28 # else
29 # include <cuda_runtime.h>
30 # endif
31 #endif
32
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37
38 struct starpu_data_copy_methods
39 {
40 int (*ram_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
41 int (*ram_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
42 int (*ram_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
43
44 int (*cuda_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
45 int (*cuda_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
46 int (*cuda_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
47
48 int (*opencl_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
49 int (*opencl_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
50 int (*opencl_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
51
52 #ifdef STARPU_USE_CUDA
53 int (*ram_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream);
54 int (*cuda_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream);
55 int (*cuda_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream);
56 #else
57 #ifdef STARPU_SIMGRID
58 int cuda_to_cuda_async;
59 #endif
60 #endif
61
62 #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
63 int (*ram_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
64 int (*opencl_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
65 int (*opencl_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
66 #endif
67
68 int (*any_to_any)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
69 };
70
71 int starpu_interface_copy(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, void *async_data);
72 uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size);
73 void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size);
74
75 enum starpu_data_interface_id
76 {
77 STARPU_UNKNOWN_INTERFACE_ID = -1,
78 STARPU_MATRIX_INTERFACE_ID=0,
79 STARPU_BLOCK_INTERFACE_ID=1,
80 STARPU_VECTOR_INTERFACE_ID=2,
81 STARPU_CSR_INTERFACE_ID=3,
82 STARPU_BCSR_INTERFACE_ID=4,
83 STARPU_VARIABLE_INTERFACE_ID=5,
84 STARPU_VOID_INTERFACE_ID=6,
85 STARPU_MULTIFORMAT_INTERFACE_ID=7,
86 STARPU_COO_INTERFACE_ID=8,
87 STARPU_MAX_INTERFACE_ID=9
88 };
89
90 struct starpu_data_interface_ops
91 {
92 void (*register_data_handle)(starpu_data_handle_t handle,
93 unsigned home_node, void *data_interface);
94 starpu_ssize_t (*allocate_data_on_node)(void *data_interface, unsigned node);
95 void (*free_data_on_node)(void *data_interface, unsigned node);
96 const struct starpu_data_copy_methods *copy_methods;
97 void * (*handle_to_pointer)(starpu_data_handle_t handle, unsigned node);
98 size_t (*get_size)(starpu_data_handle_t handle);
99 uint32_t (*footprint)(starpu_data_handle_t handle);
100 int (*compare)(void *data_interface_a, void *data_interface_b);
101 void (*display)(starpu_data_handle_t handle, FILE *f);
102 enum starpu_data_interface_id interfaceid;
103 size_t interface_size;
104
105 int is_multiformat;
106 struct starpu_multiformat_data_interface_ops* (*get_mf_ops)(void *data_interface);
107
108 int (*pack_data)(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
109 int (*unpack_data)(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
110 };
111
112 int starpu_data_interface_get_next_id(void);
113
114 void starpu_data_register(starpu_data_handle_t *handleptr, unsigned home_node, void *data_interface, struct starpu_data_interface_ops *ops);
115 void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_handle_t handlesrc);
116
117 void *starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node);
118 void *starpu_data_get_local_ptr(starpu_data_handle_t handle);
119
120 void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node);
121
122 extern struct starpu_data_interface_ops starpu_interface_matrix_ops;
123
124 struct starpu_matrix_interface
125 {
126 uintptr_t ptr;
127 uintptr_t dev_handle;
128 size_t offset;
129 uint32_t nx;
130 uint32_t ny;
131 uint32_t ld;
132 size_t elemsize;
133 };
134
135 void starpu_matrix_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize);
136 uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle);
137 uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle);
138 uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle);
139 uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle_t handle);
140 size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle);
141
142 #define STARPU_MATRIX_GET_PTR(interface) (((struct starpu_matrix_interface *)(interface))->ptr)
143 #define STARPU_MATRIX_GET_DEV_HANDLE(interface) (((struct starpu_matrix_interface *)(interface))->dev_handle)
144 #define STARPU_MATRIX_GET_OFFSET(interface) (((struct starpu_matrix_interface *)(interface))->offset)
145 #define STARPU_MATRIX_GET_NX(interface) (((struct starpu_matrix_interface *)(interface))->nx)
146 #define STARPU_MATRIX_GET_NY(interface) (((struct starpu_matrix_interface *)(interface))->ny)
147 #define STARPU_MATRIX_GET_LD(interface) (((struct starpu_matrix_interface *)(interface))->ld)
148 #define STARPU_MATRIX_GET_ELEMSIZE(interface) (((struct starpu_matrix_interface *)(interface))->elemsize)
149
150 struct starpu_coo_interface
151 {
152 uint32_t *columns;
153 uint32_t *rows;
154 uintptr_t values;
155 uint32_t nx;
156 uint32_t ny;
157 uint32_t n_values;
158 size_t elemsize;
159 };
160
161 void starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize);
162
163 #define STARPU_COO_GET_COLUMNS(interface) \
164 (((struct starpu_coo_interface *)(interface))->columns)
165 #define STARPU_COO_GET_COLUMNS_DEV_HANDLE(interface) \
166 (((struct starpu_coo_interface *)(interface))->columns)
167 #define STARPU_COO_GET_ROWS(interface) \
168 (((struct starpu_coo_interface *)(interface))->rows)
169 #define STARPU_COO_GET_ROWS_DEV_HANDLE(interface) \
170 (((struct starpu_coo_interface *)(interface))->rows)
171 #define STARPU_COO_GET_VALUES(interface) \
172 (((struct starpu_coo_interface *)(interface))->values)
173 #define STARPU_COO_GET_VALUES_DEV_HANDLE(interface) \
174 (((struct starpu_coo_interface *)(interface))->values)
175 #define STARPU_COO_GET_OFFSET 0
176 #define STARPU_COO_GET_NX(interface) \
177 (((struct starpu_coo_interface *)(interface))->nx)
178 #define STARPU_COO_GET_NY(interface) \
179 (((struct starpu_coo_interface *)(interface))->ny)
180 #define STARPU_COO_GET_NVALUES(interface) \
181 (((struct starpu_coo_interface *)(interface))->n_values)
182 #define STARPU_COO_GET_ELEMSIZE(interface) \
183 (((struct starpu_coo_interface *)(interface))->elemsize)
184
185 /* TODO: rename to 3dmatrix? */
186 struct starpu_block_interface
187 {
188 uintptr_t ptr;
189 uintptr_t dev_handle;
190 size_t offset;
191 uint32_t nx;
192 uint32_t ny;
193 uint32_t nz;
194 uint32_t ldy;
195 uint32_t ldz;
196 size_t elemsize;
197 };
198
199 void starpu_block_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize);
200 uint32_t starpu_block_get_nx(starpu_data_handle_t handle);
201 uint32_t starpu_block_get_ny(starpu_data_handle_t handle);
202 uint32_t starpu_block_get_nz(starpu_data_handle_t handle);
203 uint32_t starpu_block_get_local_ldy(starpu_data_handle_t handle);
204 uint32_t starpu_block_get_local_ldz(starpu_data_handle_t handle);
205 uintptr_t starpu_block_get_local_ptr(starpu_data_handle_t handle);
206 size_t starpu_block_get_elemsize(starpu_data_handle_t handle);
207
208 #define STARPU_BLOCK_GET_PTR(interface) (((struct starpu_block_interface *)(interface))->ptr)
209 #define STARPU_BLOCK_GET_DEV_HANDLE(interface) (((struct starpu_block_interface *)(interface))->dev_handle)
210 #define STARPU_BLOCK_GET_OFFSET(interface) (((struct starpu_block_interface *)(interface))->offset)
211 #define STARPU_BLOCK_GET_NX(interface) (((struct starpu_block_interface *)(interface))->nx)
212 #define STARPU_BLOCK_GET_NY(interface) (((struct starpu_block_interface *)(interface))->ny)
213 #define STARPU_BLOCK_GET_NZ(interface) (((struct starpu_block_interface *)(interface))->nz)
214 #define STARPU_BLOCK_GET_LDY(interface) (((struct starpu_block_interface *)(interface))->ldy)
215 #define STARPU_BLOCK_GET_LDZ(interface) (((struct starpu_block_interface *)(interface))->ldz)
216 #define STARPU_BLOCK_GET_ELEMSIZE(interface) (((struct starpu_block_interface *)(interface))->elemsize)
217
218 struct starpu_vector_interface
219 {
220 uintptr_t ptr;
221 uintptr_t dev_handle;
222 size_t offset;
223 uint32_t nx;
224 size_t elemsize;
225 };
226
227 void starpu_vector_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t nx, size_t elemsize);
228 uint32_t starpu_vector_get_nx(starpu_data_handle_t handle);
229 size_t starpu_vector_get_elemsize(starpu_data_handle_t handle);
230 uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle);
231
232 #define STARPU_VECTOR_GET_PTR(interface) (((struct starpu_vector_interface *)(interface))->ptr)
233 #define STARPU_VECTOR_GET_DEV_HANDLE(interface) (((struct starpu_vector_interface *)(interface))->dev_handle)
234 #define STARPU_VECTOR_GET_OFFSET(interface) (((struct starpu_vector_interface *)(interface))->offset)
235 #define STARPU_VECTOR_GET_NX(interface) (((struct starpu_vector_interface *)(interface))->nx)
236 #define STARPU_VECTOR_GET_ELEMSIZE(interface) (((struct starpu_vector_interface *)(interface))->elemsize)
237
238 struct starpu_variable_interface
239 {
240 uintptr_t ptr;
241 size_t elemsize;
242 /* No dev_handle, since it can not be filtered, offset will always be zero */
243 };
244
245 void starpu_variable_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, size_t size);
246 size_t starpu_variable_get_elemsize(starpu_data_handle_t handle);
247 uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle);
248
249 #define STARPU_VARIABLE_GET_PTR(interface) (((struct starpu_variable_interface *)(interface))->ptr)
250 #define STARPU_VARIABLE_GET_ELEMSIZE(interface) (((struct starpu_variable_interface *)(interface))->elemsize)
251 #define STARPU_VARIABLE_GET_DEV_HANDLE(interface) \
252 (((struct starpu_variable_interface *)(interface))->ptr)
253 #define STARPU_VARIABLE_GET_OFFSET 0
254
255 void starpu_void_data_register(starpu_data_handle_t *handle);
256
257 struct starpu_csr_interface
258 {
259 uint32_t nnz;
260 uint32_t nrow;
261 uintptr_t nzval;
262 uint32_t *colind;
263 uint32_t *rowptr;
264
265 uint32_t firstentry;
266
267 size_t elemsize;
268 };
269
270 void starpu_csr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize);
271 uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle);
272 uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle);
273 uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle);
274 uintptr_t starpu_csr_get_local_nzval(starpu_data_handle_t handle);
275 uint32_t *starpu_csr_get_local_colind(starpu_data_handle_t handle);
276 uint32_t *starpu_csr_get_local_rowptr(starpu_data_handle_t handle);
277 size_t starpu_csr_get_elemsize(starpu_data_handle_t handle);
278
279 #define STARPU_CSR_GET_NNZ(interface) (((struct starpu_csr_interface *)(interface))->nnz)
280 #define STARPU_CSR_GET_NROW(interface) (((struct starpu_csr_interface *)(interface))->nrow)
281 #define STARPU_CSR_GET_NZVAL(interface) (((struct starpu_csr_interface *)(interface))->nzval)
282 #define STARPU_CSR_GET_NZVAL_DEV_HANDLE(interface) \
283 (((struct starpu_csr_interface *)(interface))->nnz)
284 #define STARPU_CSR_GET_COLIND(interface) (((struct starpu_csr_interface *)(interface))->colind)
285 #define STARPU_CSR_GET_COLIND_DEV_HANDLE(interface) \
286 (((struct starpu_csr_interface *)(interface))->colind)
287 #define STARPU_CSR_GET_ROWPTR(interface) (((struct starpu_csr_interface *)(interface))->rowptr)
288 #define STARPU_CSR_GET_ROWPTR_DEV_HANDLE(interface) \
289 (((struct starpu_csr_interface *)(interface))->rowptr)
290 #define STARPU_CSR_GET_OFFSET 0
291 #define STARPU_CSR_GET_FIRSTENTRY(interface) (((struct starpu_csr_interface *)(interface))->firstentry)
292 #define STARPU_CSR_GET_ELEMSIZE(interface) (((struct starpu_csr_interface *)(interface))->elemsize)
293
294 struct starpu_bcsr_interface
295 {
296 uint32_t nnz;
297 uint32_t nrow;
298
299 uintptr_t nzval;
300 uint32_t *colind;
301 uint32_t *rowptr;
302
303 uint32_t firstentry;
304
305 uint32_t r;
306 uint32_t c;
307
308 size_t elemsize;
309 };
310
311 void starpu_bcsr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, uint32_t r, uint32_t c, size_t elemsize);
312
313 #define STARPU_BCSR_GET_NNZ(interface) (((struct starpu_bcsr_interface *)(interface))->nnz)
314 #define STARPU_BCSR_GET_NZVAL(interface) (((struct starpu_bcsr_interface *)(interface))->nzval)
315 #define STARPU_BCSR_GET_NZVAL_DEV_HANDLE(interface) \
316 (((struct starpu_bcsr_interface *)(interface))->nnz)
317 #define STARPU_BCSR_GET_COLIND(interface) (((struct starpu_bcsr_interface *)(interface))->colind)
318 #define STARPU_BCSR_GET_COLIND_DEV_HANDLE(interface) \
319 (((struct starpu_bcsr_interface *)(interface))->colind)
320 #define STARPU_BCSR_GET_ROWPTR(interface) (((struct starpu_bcsr_interface *)(interface))->rowptr)
321 #define STARPU_BCSR_GET_ROWPTR_DEV_HANDLE(interface) \
322 (((struct starpu_bcsr_interface *)(interface))->rowptr)
323 #define STARPU_BCSR_GET_OFFSET 0
324 uint32_t starpu_bcsr_get_nnz(starpu_data_handle_t handle);
325 uint32_t starpu_bcsr_get_nrow(starpu_data_handle_t handle);
326 uint32_t starpu_bcsr_get_firstentry(starpu_data_handle_t handle);
327 uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle_t handle);
328 uint32_t *starpu_bcsr_get_local_colind(starpu_data_handle_t handle);
329 uint32_t *starpu_bcsr_get_local_rowptr(starpu_data_handle_t handle);
330 uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle);
331 uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle);
332 size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle);
333
334 struct starpu_multiformat_data_interface_ops
335 {
336 size_t cpu_elemsize;
337 size_t opencl_elemsize;
338 struct starpu_codelet *cpu_to_opencl_cl;
339 struct starpu_codelet *opencl_to_cpu_cl;
340 size_t cuda_elemsize;
341 struct starpu_codelet *cpu_to_cuda_cl;
342 struct starpu_codelet *cuda_to_cpu_cl;
343 };
344
345 struct starpu_multiformat_interface
346 {
347 void *cpu_ptr;
348 void *cuda_ptr;
349 void *opencl_ptr;
350 uint32_t nx;
351 struct starpu_multiformat_data_interface_ops *ops;
352 };
353
354 void starpu_multiformat_data_register(starpu_data_handle_t *handle, unsigned home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops);
355
356 #define STARPU_MULTIFORMAT_GET_CPU_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cpu_ptr)
357 #define STARPU_MULTIFORMAT_GET_CUDA_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cuda_ptr)
358 #define STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->opencl_ptr)
359 #define STARPU_MULTIFORMAT_GET_NX(interface) (((struct starpu_multiformat_interface *)(interface))->nx)
360
361 enum starpu_data_interface_id starpu_data_get_interface_id(starpu_data_handle_t handle);
362
363 int starpu_data_pack(starpu_data_handle_t handle, void **ptr, starpu_ssize_t *count);
364 int starpu_data_unpack(starpu_data_handle_t handle, void *ptr, size_t count);
365 size_t starpu_data_get_size(starpu_data_handle_t handle);
366
367 starpu_data_handle_t starpu_data_lookup(const void *ptr);
368
369 #ifdef __cplusplus
370 }
371 #endif
372
373 #endif /* __STARPU_DATA_INTERFACES_H__ */
starpu_bcsr_get_elemsize
size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle)
starpu_matrix_get_nx
uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle)
starpu_vector_get_elemsize
size_t starpu_vector_get_elemsize(starpu_data_handle_t handle)
starpu_data_interface_ops::copy_methods
const struct starpu_data_copy_methods * copy_methods
Definition: starpu_data_interfaces.h:96
starpu_data_interface_ops::display
void(* display)(starpu_data_handle_t handle, FILE *f)
Definition: starpu_data_interfaces.h:101
starpu_codelet
Definition: starpu_task.h:73
starpu_coo_interface::nx
uint32_t nx
Definition: starpu_data_interfaces.h:155
STARPU_BLOCK_INTERFACE_ID
Definition: starpu_data_interfaces.h:79
starpu_interface_copy
int starpu_interface_copy(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, void *async_data)
starpu_block_interface::offset
size_t offset
Definition: starpu_data_interfaces.h:190
starpu_coo_interface::ny
uint32_t ny
Definition: starpu_data_interfaces.h:156
starpu_multiformat_data_interface_ops::opencl_to_cpu_cl
struct starpu_codelet * opencl_to_cpu_cl
Definition: starpu_data_interfaces.h:339
starpu_multiformat_data_interface_ops::cpu_to_opencl_cl
struct starpu_codelet * cpu_to_opencl_cl
Definition: starpu_data_interfaces.h:338
starpu_coo_data_register
void starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize)
STARPU_MATRIX_INTERFACE_ID
Definition: starpu_data_interfaces.h:78
starpu_csr_get_local_rowptr
uint32_t * starpu_csr_get_local_rowptr(starpu_data_handle_t handle)
starpu_variable_get_local_ptr
uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle)
starpu_vector_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:224
starpu_data_interface_ops::pack_data
int(* pack_data)(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
Definition: starpu_data_interfaces.h:108
starpu_multiformat_data_interface_ops::cuda_to_cpu_cl
struct starpu_codelet * cuda_to_cpu_cl
Definition: starpu_data_interfaces.h:342
starpu_bcsr_get_nnz
uint32_t starpu_bcsr_get_nnz(starpu_data_handle_t handle)
starpu_block_data_register
void starpu_block_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize)
starpu_csr_interface::colind
uint32_t * colind
Definition: starpu_data_interfaces.h:262
starpu_vector_interface
Definition: starpu_data_interfaces.h:218
STARPU_VARIABLE_INTERFACE_ID
Definition: starpu_data_interfaces.h:83
starpu_bcsr_interface::nrow
uint32_t nrow
Definition: starpu_data_interfaces.h:297
starpu_vector_interface::dev_handle
uintptr_t dev_handle
Definition: starpu_data_interfaces.h:221
starpu_vector_interface::ptr
uintptr_t ptr
Definition: starpu_data_interfaces.h:220
starpu_data_get_local_ptr
void * starpu_data_get_local_ptr(starpu_data_handle_t handle)
starpu_csr_get_nnz
uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle)
starpu_csr_interface
Definition: starpu_data_interfaces.h:257
starpu_multiformat_data_interface_ops
Definition: starpu_data_interfaces.h:334
starpu_coo_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:158
starpu_data_copy_methods::ram_to_cuda
int(* ram_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:41
starpu_coo_interface
Definition: starpu_data_interfaces.h:150
STARPU_MULTIFORMAT_INTERFACE_ID
Definition: starpu_data_interfaces.h:85
starpu_multiformat_data_interface_ops::opencl_elemsize
size_t opencl_elemsize
Definition: starpu_data_interfaces.h:337
starpu_data_copy_methods::cuda_to_opencl
int(* cuda_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:46
starpu_vector_get_local_ptr
uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle)
starpu_csr_data_register
void starpu_csr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize)
starpu_data_interface_ops::interface_size
size_t interface_size
Definition: starpu_data_interfaces.h:103
starpu_block_interface
Definition: starpu_data_interfaces.h:186
starpu_data_copy_methods::cuda_to_cuda_async
int(* cuda_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream)
Definition: starpu_data_interfaces.h:55
starpu_data_copy_methods::opencl_to_cuda
int(* opencl_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:49
starpu_data_pack
int starpu_data_pack(starpu_data_handle_t handle, void **ptr, starpu_ssize_t *count)
starpu_block_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:196
starpu_data_register_same
void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_handle_t handlesrc)
starpu_csr_interface::rowptr
uint32_t * rowptr
Definition: starpu_data_interfaces.h:263
starpu_variable_get_elemsize
size_t starpu_variable_get_elemsize(starpu_data_handle_t handle)
starpu_block_get_local_ldy
uint32_t starpu_block_get_local_ldy(starpu_data_handle_t handle)
starpu_data_interface_ops::allocate_data_on_node
starpu_ssize_t(* allocate_data_on_node)(void *data_interface, unsigned node)
Definition: starpu_data_interfaces.h:94
starpu_data_handle_to_pointer
void * starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
starpu_multiformat_data_register
void starpu_multiformat_data_register(starpu_data_handle_t *handle, unsigned home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops)
STARPU_BCSR_INTERFACE_ID
Definition: starpu_data_interfaces.h:82
starpu_vector_interface::nx
uint32_t nx
Definition: starpu_data_interfaces.h:223
starpu_block_interface::ldy
uint32_t ldy
Definition: starpu_data_interfaces.h:194
starpu_data_copy_methods::cuda_to_cuda
int(* cuda_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:45
starpu_csr_get_firstentry
uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle)
STARPU_VOID_INTERFACE_ID
Definition: starpu_data_interfaces.h:84
starpu_data_register
void starpu_data_register(starpu_data_handle_t *handleptr, unsigned home_node, void *data_interface, struct starpu_data_interface_ops *ops)
starpu_csr_interface::nrow
uint32_t nrow
Definition: starpu_data_interfaces.h:260
starpu_csr_get_local_colind
uint32_t * starpu_csr_get_local_colind(starpu_data_handle_t handle)
starpu_bcsr_interface::c
uint32_t c
Definition: starpu_data_interfaces.h:306
starpu_coo_interface::rows
uint32_t * rows
Definition: starpu_data_interfaces.h:153
starpu_data_get_interface_id
enum starpu_data_interface_id starpu_data_get_interface_id(starpu_data_handle_t handle)
starpu_data_copy_methods::ram_to_opencl_async
int(* ram_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event)
Definition: starpu_data_interfaces.h:63
starpu_matrix_get_ny
uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle)
starpu_data_interface_ops::get_size
size_t(* get_size)(starpu_data_handle_t handle)
Definition: starpu_data_interfaces.h:98
starpu_bcsr_interface::rowptr
uint32_t * rowptr
Definition: starpu_data_interfaces.h:301
starpu_csr_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:267
starpu_data_interface_get_next_id
int starpu_data_interface_get_next_id(void)
starpu_data_copy_methods::ram_to_cuda_async
int(* ram_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream)
Definition: starpu_data_interfaces.h:53
starpu_data_interface_ops::interfaceid
enum starpu_data_interface_id interfaceid
Definition: starpu_data_interfaces.h:102
starpu_bcsr_get_c
uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle)
starpu_coo_interface::columns
uint32_t * columns
Definition: starpu_data_interfaces.h:152
starpu_data_copy_methods::opencl_to_ram_async
int(* opencl_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event)
Definition: starpu_data_interfaces.h:64
starpu_data_copy_methods::cuda_to_ram
int(* cuda_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:44
starpu_multiformat_data_interface_ops::cuda_elemsize
size_t cuda_elemsize
Definition: starpu_data_interfaces.h:340
starpu_coo_interface::values
uintptr_t values
Definition: starpu_data_interfaces.h:154
starpu_data_interface_ops::compare
int(* compare)(void *data_interface_a, void *data_interface_b)
Definition: starpu_data_interfaces.h:100
starpu_bcsr_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:308
starpu_data_interface_ops::free_data_on_node
void(* free_data_on_node)(void *data_interface, unsigned node)
Definition: starpu_data_interfaces.h:95
starpu_malloc_on_node
uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size)
starpu_block_interface::nz
uint32_t nz
Definition: starpu_data_interfaces.h:193
starpu_block_get_elemsize
size_t starpu_block_get_elemsize(starpu_data_handle_t handle)
starpu_bcsr_get_nrow
uint32_t starpu_bcsr_get_nrow(starpu_data_handle_t handle)
starpu_bcsr_interface
Definition: starpu_data_interfaces.h:294
starpu_csr_interface::nnz
uint32_t nnz
Definition: starpu_data_interfaces.h:259
starpu_variable_interface
Definition: starpu_data_interfaces.h:238
STARPU_VECTOR_INTERFACE_ID
Definition: starpu_data_interfaces.h:80
starpu_block_get_local_ptr
uintptr_t starpu_block_get_local_ptr(starpu_data_handle_t handle)
starpu_matrix_interface::ld
uint32_t ld
Definition: starpu_data_interfaces.h:131
starpu_data_interface_ops::is_multiformat
int is_multiformat
Definition: starpu_data_interfaces.h:105
starpu_bcsr_get_local_nzval
uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle_t handle)
starpu_bcsr_data_register
void starpu_bcsr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, uint32_t r, uint32_t c, size_t elemsize)
starpu_matrix_get_local_ld
uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle)
starpu_matrix_get_local_ptr
uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle_t handle)
starpu_vector_get_nx
uint32_t starpu_vector_get_nx(starpu_data_handle_t handle)
starpu_data_copy_methods::ram_to_opencl
int(* ram_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:42
starpu_bcsr_interface::r
uint32_t r
Definition: starpu_data_interfaces.h:305
starpu_block_get_nz
uint32_t starpu_block_get_nz(starpu_data_handle_t handle)
starpu_csr_interface::firstentry
uint32_t firstentry
Definition: starpu_data_interfaces.h:265
starpu_vector_data_register
void starpu_vector_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t nx, size_t elemsize)
starpu_multiformat_data_interface_ops::cpu_elemsize
size_t cpu_elemsize
Definition: starpu_data_interfaces.h:336
starpu_data_copy_methods::opencl_to_opencl
int(* opencl_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:50
starpu_data_copy_methods::any_to_any
int(* any_to_any)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)
Definition: starpu_data_interfaces.h:68
starpu_data_lookup
starpu_data_handle_t starpu_data_lookup(const void *ptr)
starpu_bcsr_get_local_rowptr
uint32_t * starpu_bcsr_get_local_rowptr(starpu_data_handle_t handle)
starpu_void_data_register
void starpu_void_data_register(starpu_data_handle_t *handle)
starpu_multiformat_interface
Definition: starpu_data_interfaces.h:345
STARPU_MAX_INTERFACE_ID
Definition: starpu_data_interfaces.h:87
starpu_bcsr_interface::nzval
uintptr_t nzval
Definition: starpu_data_interfaces.h:299
starpu_data_interface_id
starpu_data_interface_id
Definition: starpu_data_interfaces.h:75
starpu_data_copy_methods::ram_to_ram
int(* ram_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:40
starpu_block_interface::ldz
uint32_t ldz
Definition: starpu_data_interfaces.h:195
starpu_block_interface::ptr
uintptr_t ptr
Definition: starpu_data_interfaces.h:188
starpu_matrix_interface::ptr
uintptr_t ptr
Definition: starpu_data_interfaces.h:126
starpu_matrix_interface::nx
uint32_t nx
Definition: starpu_data_interfaces.h:129
starpu_data_interface_ops::register_data_handle
void(* register_data_handle)(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
Definition: starpu_data_interfaces.h:92
starpu_matrix_interface::offset
size_t offset
Definition: starpu_data_interfaces.h:128
starpu_variable_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:241
starpu_vector_interface::offset
size_t offset
Definition: starpu_data_interfaces.h:222
starpu_data_interface_ops
Definition: starpu_data_interfaces.h:90
starpu_bcsr_get_firstentry
uint32_t starpu_bcsr_get_firstentry(starpu_data_handle_t handle)
starpu_data_get_interface_on_node
void * starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node)
STARPU_COO_INTERFACE_ID
Definition: starpu_data_interfaces.h:86
starpu_free_on_node
void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size)
starpu_variable_interface::ptr
uintptr_t ptr
Definition: starpu_data_interfaces.h:240
starpu_bcsr_get_r
uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle)
starpu_data_interface_ops::footprint
uint32_t(* footprint)(starpu_data_handle_t handle)
Definition: starpu_data_interfaces.h:99
starpu_matrix_get_elemsize
size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle)
starpu_variable_data_register
void starpu_variable_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, size_t size)
starpu_block_interface::ny
uint32_t ny
Definition: starpu_data_interfaces.h:192
starpu_bcsr_interface::firstentry
uint32_t firstentry
Definition: starpu_data_interfaces.h:303
starpu_matrix_interface::ny
uint32_t ny
Definition: starpu_data_interfaces.h:130
starpu_matrix_interface::dev_handle
uintptr_t dev_handle
Definition: starpu_data_interfaces.h:127
starpu_bcsr_interface::nnz
uint32_t nnz
Definition: starpu_data_interfaces.h:296
starpu_block_get_local_ldz
uint32_t starpu_block_get_local_ldz(starpu_data_handle_t handle)
starpu_data_handle_t
struct _starpu_data_state * starpu_data_handle_t
Definition: starpu_data.h:29
starpu_coo_interface::n_values
uint32_t n_values
Definition: starpu_data_interfaces.h:157
starpu_data_copy_methods::cuda_to_ram_async
int(* cuda_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cudaStream_t stream)
Definition: starpu_data_interfaces.h:54
starpu_data_copy_methods
Definition: starpu_data_interfaces.h:38
starpu_data_unpack
int starpu_data_unpack(starpu_data_handle_t handle, void *ptr, size_t count)
starpu_matrix_data_register
void starpu_matrix_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize)
STARPU_CSR_INTERFACE_ID
Definition: starpu_data_interfaces.h:81
starpu_csr_get_nrow
uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle)
starpu_block_interface::nx
uint32_t nx
Definition: starpu_data_interfaces.h:191
starpu_bcsr_get_local_colind
uint32_t * starpu_bcsr_get_local_colind(starpu_data_handle_t handle)
starpu.h
starpu_block_get_ny
uint32_t starpu_block_get_ny(starpu_data_handle_t handle)
starpu_matrix_interface
Definition: starpu_data_interfaces.h:124
starpu_data_get_size
size_t starpu_data_get_size(starpu_data_handle_t handle)
starpu_data_copy_methods::opencl_to_ram
int(* opencl_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition: starpu_data_interfaces.h:48
starpu_bcsr_interface::colind
uint32_t * colind
Definition: starpu_data_interfaces.h:300
STARPU_UNKNOWN_INTERFACE_ID
Definition: starpu_data_interfaces.h:77
starpu_csr_interface::nzval
uintptr_t nzval
Definition: starpu_data_interfaces.h:261
starpu_block_interface::dev_handle
uintptr_t dev_handle
Definition: starpu_data_interfaces.h:189
starpu_csr_get_local_nzval
uintptr_t starpu_csr_get_local_nzval(starpu_data_handle_t handle)
starpu_data_copy_methods::opencl_to_opencl_async
int(* opencl_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event)
Definition: starpu_data_interfaces.h:65
starpu_multiformat_data_interface_ops::cpu_to_cuda_cl
struct starpu_codelet * cpu_to_cuda_cl
Definition: starpu_data_interfaces.h:341
starpu_block_get_nx
uint32_t starpu_block_get_nx(starpu_data_handle_t handle)
starpu_matrix_interface::elemsize
size_t elemsize
Definition: starpu_data_interfaces.h:132
starpu_csr_get_elemsize
size_t starpu_csr_get_elemsize(starpu_data_handle_t handle)
starpu_data_interface_ops::unpack_data
int(* unpack_data)(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count)
Definition: starpu_data_interfaces.h:109