StarPU Handbook

starpu_data_filters.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 * Copyright (C) 2010 Mehdi Juhoor
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 __STARPU_DATA_FILTERS_H__
19#define __STARPU_DATA_FILTERS_H__
20
21#include <starpu.h>
22#include <stdarg.h>
23
24#ifdef __cplusplus
25 extern "C"
26{
27#endif
28
34 struct starpu_data_interface_ops;
35
39 struct starpu_data_filter
40{
79 void (*filter_func)(void *father_interface, void *child_interface, struct starpu_data_filter *, unsigned id, unsigned nparts);
80 unsigned nchildren;
87 unsigned (*get_nchildren)(struct starpu_data_filter *, starpu_data_handle_t initial_handle);
92 struct starpu_data_interface_ops *(*get_child_ops)(struct starpu_data_filter *, unsigned id);
93 unsigned filter_arg;
98 void *filter_arg_ptr;
99};
100
120 void starpu_data_partition(starpu_data_handle_t initial_handle, struct starpu_data_filter *f);
121
134 void starpu_data_unpartition(starpu_data_handle_t root_data, unsigned gathering_node);
135
140 starpu_data_handle_t starpu_data_get_child(starpu_data_handle_t handle, unsigned i);
141
145 int starpu_data_get_nb_children(starpu_data_handle_t handle);
146
161 starpu_data_handle_t starpu_data_get_sub_data(starpu_data_handle_t root_data, unsigned depth, ... );
162
167 starpu_data_handle_t starpu_data_vget_sub_data(starpu_data_handle_t root_data, unsigned depth, va_list pa);
168
174 void starpu_data_map_filters(starpu_data_handle_t root_data, unsigned nfilters, ...);
175
181 void starpu_data_vmap_filters(starpu_data_handle_t root_data, unsigned nfilters, va_list pa);
182
209 void starpu_data_partition_plan(starpu_data_handle_t initial_handle, struct starpu_data_filter *f, starpu_data_handle_t *children);
210
222 void starpu_data_partition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
223
240 void starpu_data_partition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
241
248 void starpu_data_partition_readwrite_upgrade_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
249
256 void starpu_data_unpartition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node);
257
258 void starpu_data_unpartition_submit_r(starpu_data_handle_t initial_handle, int gathering_node);
259
268 void starpu_data_unpartition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node);
269
276 void starpu_data_partition_clean(starpu_data_handle_t root_data, unsigned nparts, starpu_data_handle_t *children);
277
282 void starpu_data_unpartition_submit_sequential_consistency_cb(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gather_node, int sequential_consistency, void (*callback_func)(void *), void *callback_arg);
283
289 void starpu_data_partition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int sequential_consistency);
290
296 void starpu_data_unpartition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node, int sequential_consistency);
297
314 void starpu_bcsr_filter_canonical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
315
319 unsigned starpu_bcsr_filter_canonical_block_get_nchildren(struct starpu_data_filter *f, starpu_data_handle_t handle)
320;
324 struct starpu_data_interface_ops *starpu_bcsr_filter_canonical_block_child_ops(struct starpu_data_filter *f, unsigned child);
325
331 void starpu_bcsr_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
332
345 void starpu_csr_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
346
364 void starpu_matrix_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
365
377 void starpu_matrix_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
378
384 void starpu_matrix_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
385
396 void starpu_matrix_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
397
413 void starpu_vector_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
414
426 void starpu_vector_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
427
436 void starpu_vector_filter_list_long(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
437
446 void starpu_vector_filter_list(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
447
453 void starpu_vector_filter_divide_in_2(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
454
472 void starpu_block_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
473
484 void starpu_block_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
485
491 void starpu_block_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
492
503 void starpu_block_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
504
510 void starpu_block_filter_depth_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
511
522 void starpu_block_filter_depth_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
523
530 void
531 starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts,
532 size_t elemsize, unsigned id,
533 unsigned ld, unsigned *chunk_size,
534 size_t *offset);
535
540#ifdef __cplusplus
541}
542#endif
543
544#endif
starpu_data_interface_ops
Definition: starpu_data_interfaces.h:366
starpu_data_handle_t
struct _starpu_data_state * starpu_data_handle_t
Definition: starpu_data.h:44
starpu_data_filter::filter_func
void(* filter_func)(void *father_interface, void *child_interface, struct starpu_data_filter *, unsigned id, unsigned nparts)
Definition: starpu_data_filters.h:79
starpu_data_filter::filter_arg_ptr
void * filter_arg_ptr
Definition: starpu_data_filters.h:98
starpu_data_filter::filter_arg
unsigned filter_arg
Definition: starpu_data_filters.h:93
starpu_data_filter::get_nchildren
unsigned(* get_nchildren)(struct starpu_data_filter *, starpu_data_handle_t initial_handle)
Definition: starpu_data_filters.h:87
starpu_data_filter::nchildren
unsigned nchildren
Definition: starpu_data_filters.h:80
starpu_bcsr_filter_canonical_block
void starpu_bcsr_filter_canonical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_partition
void starpu_data_partition(starpu_data_handle_t initial_handle, struct starpu_data_filter *f)
starpu_data_vmap_filters
void starpu_data_vmap_filters(starpu_data_handle_t root_data, unsigned nfilters, va_list pa)
starpu_block_filter_block
void starpu_block_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_vector_filter_block
void starpu_vector_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_matrix_filter_vertical_block
void starpu_matrix_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_get_child
starpu_data_handle_t starpu_data_get_child(starpu_data_handle_t handle, unsigned i)
starpu_data_unpartition_submit
void starpu_data_unpartition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node)
starpu_bcsr_filter_vertical_block
void starpu_bcsr_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_map_filters
void starpu_data_map_filters(starpu_data_handle_t root_data, unsigned nfilters,...)
starpu_csr_filter_vertical_block
void starpu_csr_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_get_nb_children
int starpu_data_get_nb_children(starpu_data_handle_t handle)
starpu_vector_filter_list_long
void starpu_vector_filter_list_long(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_matrix_filter_vertical_block_shadow
void starpu_matrix_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_block_filter_vertical_block
void starpu_block_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_vget_sub_data
starpu_data_handle_t starpu_data_vget_sub_data(starpu_data_handle_t root_data, unsigned depth, va_list pa)
starpu_block_filter_block_shadow
void starpu_block_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_partition_readonly_submit
void starpu_data_partition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children)
starpu_matrix_filter_block_shadow
void starpu_matrix_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_partition_readwrite_upgrade_submit
void starpu_data_partition_readwrite_upgrade_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children)
starpu_matrix_filter_block
void starpu_matrix_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_partition_submit
void starpu_data_partition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children)
starpu_data_partition_plan
void starpu_data_partition_plan(starpu_data_handle_t initial_handle, struct starpu_data_filter *f, starpu_data_handle_t *children)
starpu_bcsr_filter_canonical_block_get_nchildren
unsigned starpu_bcsr_filter_canonical_block_get_nchildren(struct starpu_data_filter *f, starpu_data_handle_t handle)
starpu_vector_filter_block_shadow
void starpu_vector_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_block_filter_depth_block
void starpu_block_filter_depth_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_vector_filter_divide_in_2
void starpu_vector_filter_divide_in_2(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_partition_submit_sequential_consistency
void starpu_data_partition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int sequential_consistency)
starpu_data_unpartition_submit_sequential_consistency
void starpu_data_unpartition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node, int sequential_consistency)
starpu_vector_filter_list
void starpu_vector_filter_list(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_unpartition_readonly_submit
void starpu_data_unpartition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node)
starpu_data_get_sub_data
starpu_data_handle_t starpu_data_get_sub_data(starpu_data_handle_t root_data, unsigned depth,...)
starpu_block_filter_depth_block_shadow
void starpu_block_filter_depth_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_partition_clean
void starpu_data_partition_clean(starpu_data_handle_t root_data, unsigned nparts, starpu_data_handle_t *children)
starpu_bcsr_filter_canonical_block_child_ops
struct starpu_data_interface_ops * starpu_bcsr_filter_canonical_block_child_ops(struct starpu_data_filter *f, unsigned child)
starpu_filter_nparts_compute_chunk_size_and_offset
void starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts, size_t elemsize, unsigned id, unsigned ld, unsigned *chunk_size, size_t *offset)
starpu_data_unpartition
void starpu_data_unpartition(starpu_data_handle_t root_data, unsigned gathering_node)
starpu_data_unpartition_submit_sequential_consistency_cb
void starpu_data_unpartition_submit_sequential_consistency_cb(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gather_node, int sequential_consistency, void(*callback_func)(void *), void *callback_arg)
starpu_block_filter_vertical_block_shadow
void starpu_block_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
starpu_data_filter
Definition: starpu_data_filters.h:40
starpu.h