starpu-data-filters.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * StarPU
  3. * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  4. *
  5. * This program 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. * This program 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. #ifndef __STARPU_DATA_FILTERS_H__
  17. #define __STARPU_DATA_FILTERS_H__
  18. #include <starpu_config.h>
  19. struct starpu_data_state_t;
  20. typedef struct starpu_filter_t {
  21. unsigned (*filter_func)(struct starpu_filter_t *, struct starpu_data_state_t *); /* the actual partitionning function */
  22. uint32_t filter_arg;
  23. void *filter_arg_ptr;
  24. } starpu_filter;
  25. void starpu_partition_data(struct starpu_data_state_t *initial_data, starpu_filter *f);
  26. void starpu_unpartition_data(struct starpu_data_state_t *root_data, uint32_t gathering_node);
  27. /* unsigned list */
  28. struct starpu_data_state_t *get_sub_data(struct starpu_data_state_t *root_data, unsigned depth, ... );
  29. /* starpu_filter * list */
  30. void starpu_map_filters(struct starpu_data_state_t *root_data, unsigned nfilters, ...);
  31. /* a few examples of filters */
  32. /* for BCSR */
  33. unsigned starpu_canonical_block_filter_bcsr(starpu_filter *f, struct starpu_data_state_t *root_data);
  34. unsigned starpu_vertical_block_filter_func_csr(starpu_filter *f, struct starpu_data_state_t *root_data);
  35. /* (filters for BLAS interface) */
  36. unsigned starpu_block_filter_func(starpu_filter *f, struct starpu_data_state_t *root_data);
  37. unsigned starpu_vertical_block_filter_func(starpu_filter *f, struct starpu_data_state_t *root_data);
  38. /* for vector */
  39. unsigned starpu_block_filter_func_vector(starpu_filter *f, struct starpu_data_state_t *root_data);
  40. unsigned starpu_list_filter_func_vector(starpu_filter *f, struct starpu_data_state_t *root_data);
  41. unsigned starpu_divide_in_2_filter_func_vector(starpu_filter *f, struct starpu_data_state_t *root_data);
  42. #endif