starpu_tree.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. *
  5. * StarPU 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. * StarPU 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_TREE_H__
  17. #define __STARPU_TREE_H__
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif
  22. /**
  23. @defgroup API_Tree Tree
  24. @brief This section describes the tree facilities provided by StarPU.
  25. @{
  26. */
  27. struct starpu_tree
  28. {
  29. struct starpu_tree *nodes;
  30. struct starpu_tree *father;
  31. int arity;
  32. int id;
  33. int level;
  34. int is_pu;
  35. };
  36. void starpu_tree_reset_visited(struct starpu_tree *tree, char *visited);
  37. void starpu_tree_prepare_children(unsigned arity, struct starpu_tree *father);
  38. void starpu_tree_insert(struct starpu_tree *tree, int id, int level, int is_pu, int arity, struct starpu_tree *father);
  39. struct starpu_tree *starpu_tree_get(struct starpu_tree *tree, int id);
  40. struct starpu_tree *starpu_tree_get_neighbour(struct starpu_tree *tree, struct starpu_tree *node, char *visited, char *present);
  41. void starpu_tree_free(struct starpu_tree *tree);
  42. /** @} */
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif /* __STARPU_TREE_H__ */