starpu-data-filters.h 2.2 KB

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