starpu-data-filters.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. struct starpu_data_state_t;
  19. typedef struct starpu_filter_t {
  20. unsigned (*filter_func)(struct starpu_filter_t *, struct starpu_data_state_t *); /* the actual partitionning function */
  21. uint32_t filter_arg;
  22. void *filter_arg_ptr;
  23. } starpu_filter;
  24. void starpu_partition_data(struct starpu_data_state_t *initial_data, starpu_filter *f);
  25. void starpu_unpartition_data(struct starpu_data_state_t *root_data, uint32_t gathering_node);
  26. /* unsigned list */
  27. struct starpu_data_state_t *get_sub_data(struct starpu_data_state_t *root_data, unsigned depth, ... );
  28. /* starpu_filter * list */
  29. void starpu_map_filters(struct starpu_data_state_t *root_data, unsigned nfilters, ...);
  30. /* a few examples of filters */
  31. /* for BCSR */
  32. unsigned starpu_canonical_block_filter_bcsr(starpu_filter *f, struct starpu_data_state_t *root_data);
  33. unsigned starpu_vertical_block_filter_func_csr(starpu_filter *f, struct starpu_data_state_t *root_data);
  34. /* (filters for BLAS interface) */
  35. unsigned starpu_block_filter_func(starpu_filter *f, struct starpu_data_state_t *root_data);
  36. unsigned starpu_vertical_block_filter_func(starpu_filter *f, struct starpu_data_state_t *root_data);
  37. /* for vector */
  38. unsigned starpu_block_filter_func_vector(starpu_filter *f, struct starpu_data_state_t *root_data);
  39. unsigned starpu_list_filter_func_vector(starpu_filter *f, struct starpu_data_state_t *root_data);
  40. unsigned starpu_divide_in_2_filter_func_vector(starpu_filter *f, struct starpu_data_state_t *root_data);
  41. #endif