driver_scc_common.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012 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 __DRIVER_SCC_COMMON_H__
  17. #define __DRIVER_SCC_COMMON_H__
  18. #include <common/config.h>
  19. #ifdef STARPU_USE_SCC
  20. #include <RCCE_lib.h>
  21. #include <drivers/mp_common/mp_common.h>
  22. #define STARPU_TO_SCC_SINK_ID(id) (id) < RCCE_ue() ? (id) : ((id) + 1)
  23. int _starpu_scc_common_mp_init();
  24. void *_starpu_scc_common_get_shared_memory_addr();
  25. void _starpu_scc_common_unmap_shared_memory();
  26. int _starpu_scc_common_is_in_shared_memory(void *ptr);
  27. int _starpu_scc_common_is_mp_initialized();
  28. int _starpu_scc_common_get_src_node_id();
  29. int _starpu_scc_common_is_src_node();
  30. void _starpu_scc_common_send(const struct _starpu_mp_node *node, void *msg, int len);
  31. void _starpu_scc_common_recv(const struct _starpu_mp_node *node, void *msg, int len);
  32. void _starpu_scc_common_report_rcce_error(const char *func, const char *file, const int line, const int err_no);
  33. int _starpu_scc_common_recv_is_ready(const struct _starpu_mp_node *mp_node);
  34. #endif /* STARPU_USE_SCC */
  35. #endif /* __DRIVER_SCC_COMMON_H__ */