starpu-data-filters.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. unsigned (*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_partition_data(starpu_data_handle initial_data, starpu_filter *f);
  29. void starpu_unpartition_data(starpu_data_handle root_data, uint32_t gathering_node);
  30. void starpu_data_create_children(starpu_data_handle handle, unsigned nchildren);
  31. starpu_data_handle starpu_data_get_child(starpu_data_handle handle, unsigned i);
  32. /* unsigned list */
  33. starpu_data_handle get_sub_data(starpu_data_handle root_data, unsigned depth, ... );
  34. /* starpu_filter * list */
  35. void starpu_map_filters(starpu_data_handle root_data, unsigned nfilters, ...);
  36. /* a few examples of filters */
  37. /* for BCSR */
  38. unsigned starpu_canonical_block_filter_bcsr(starpu_filter *f, starpu_data_handle root_data);
  39. unsigned starpu_vertical_block_filter_func_csr(starpu_filter *f, starpu_data_handle root_data);
  40. /* (filters for BLAS interface) */
  41. unsigned starpu_block_filter_func(starpu_filter *f, starpu_data_handle root_data);
  42. unsigned starpu_vertical_block_filter_func(starpu_filter *f, starpu_data_handle root_data);
  43. /* for vector */
  44. unsigned starpu_block_filter_func_vector(starpu_filter *f, starpu_data_handle root_data);
  45. unsigned starpu_list_filter_func_vector(starpu_filter *f, starpu_data_handle root_data);
  46. unsigned starpu_divide_in_2_filter_func_vector(starpu_filter *f, starpu_data_handle root_data);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif