starpu_data_filters.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.h>
  19. #include <starpu_config.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. typedef struct starpu_filter_t {
  24. void (*filter_func)(struct starpu_filter_t *, starpu_data_handle); /* the actual partitionning function */
  25. uint32_t filter_arg;
  26. void *filter_arg_ptr;
  27. } starpu_filter;
  28. void starpu_data_partition(starpu_data_handle initial_data, starpu_filter *f);
  29. void starpu_data_unpartition(starpu_data_handle root_data, uint32_t gathering_node);
  30. struct starpu_data_interface_ops_t;
  31. void starpu_data_create_children(starpu_data_handle handle, unsigned nchildren,
  32. struct starpu_data_interface_ops_t *children_interface_ops);
  33. starpu_data_handle starpu_data_get_child(starpu_data_handle handle, unsigned i);
  34. /* unsigned list */
  35. starpu_data_handle starpu_data_get_sub_data(starpu_data_handle root_data, unsigned depth, ... );
  36. /* starpu_filter * list */
  37. void starpu_map_filters(starpu_data_handle root_data, unsigned nfilters, ...);
  38. /* a few examples of filters */
  39. /* for BCSR */
  40. void starpu_canonical_block_filter_bcsr(starpu_filter *f, starpu_data_handle root_data);
  41. void starpu_vertical_block_filter_func_csr(starpu_filter *f, starpu_data_handle root_data);
  42. /* (filters for BLAS interface) */
  43. void starpu_block_filter_func(starpu_filter *f, starpu_data_handle root_data);
  44. void starpu_vertical_block_filter_func(starpu_filter *f, starpu_data_handle root_data);
  45. /* for vector */
  46. void starpu_block_filter_func_vector(starpu_filter *f, starpu_data_handle root_data);
  47. void starpu_vector_list_filter_func(starpu_filter *f, starpu_data_handle root_data);
  48. void starpu_vector_divide_in_2_filter_func(starpu_filter *f, starpu_data_handle root_data);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif