data_movements_interface.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2016 Inria
  4. * Copyright (C) 2017 CNRS
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #include <starpu.h>
  18. #ifndef __DATA_MOVEMENTS_INTERFACE_H
  19. #define __DATA_MOVEMENTS_INTERFACE_H
  20. /* interface for data_movements */
  21. struct data_movements_interface
  22. {
  23. /* Data tags table */
  24. int *tags;
  25. /* Ranks table (where to move the corresponding data) */
  26. int *ranks;
  27. /* Size of the tables */
  28. int size;
  29. };
  30. void data_movements_data_register(starpu_data_handle_t *handle, unsigned home_node, int *ranks, int *tags, int size);
  31. int **data_movements_get_ref_tags_table(starpu_data_handle_t handle);
  32. int **data_movements_get_ref_ranks_table(starpu_data_handle_t handle);
  33. int data_movements_reallocate_tables(starpu_data_handle_t handle, int size);
  34. int *data_movements_get_tags_table(starpu_data_handle_t handle);
  35. int *data_movements_get_ranks_table(starpu_data_handle_t handle);
  36. int data_movements_get_size_tables(starpu_data_handle_t handle);
  37. #define DATA_MOVEMENTS_GET_SIZE_TABLES(interface) (((struct data_movements_interface *)(interface))->size)
  38. #define DATA_MOVEMENTS_GET_TAGS_TABLE(interface) (((struct data_movements_interface *)(interface))->tags)
  39. #define DATA_MOVEMENTS_GET_RANKS_TABLE(interface) (((struct data_movements_interface *)(interface))->ranks)
  40. #endif /* __DATA_MOVEMENTS_INTERFACE_H */