source_common.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 __SOURCE_COMMON_H__
  17. #define __SOURCE_COMMON_H__
  18. #ifdef STARPU_USE_MP
  19. #include <drivers/mp_common/mp_common.h>
  20. int _starpu_src_common_sink_nbcores (const struct _starpu_mp_node *node, int *buf);
  21. int _starpu_src_common_lookup(const struct _starpu_mp_node *node,
  22. void (**func_ptr)(void), const char *func_name);
  23. int _starpu_src_common_execute_kernel(const struct _starpu_mp_node *node,
  24. void (*kernel)(void), unsigned coreid,
  25. starpu_data_handle_t *handles, void **interfaces, unsigned nb_interfaces,
  26. void *cl_arg, size_t cl_arg_size);
  27. int _starpu_src_common_execute_kernel_from_task(const struct _starpu_mp_node *node,
  28. void (*kernel)(void), unsigned coreid,
  29. struct starpu_task *task);
  30. int _starpu_src_common_allocate(const struct _starpu_mp_node *mp_node,
  31. void **addr, size_t size);
  32. void _starpu_src_common_free(const struct _starpu_mp_node *mp_node,
  33. void *addr);
  34. int _starpu_src_common_copy_host_to_sink(const struct _starpu_mp_node *mp_node,
  35. void *src, void *dst, size_t size);
  36. int _starpu_src_common_copy_sink_to_host(const struct _starpu_mp_node *mp_node,
  37. void *src, void *dst, size_t size);
  38. int _starpu_src_common_copy_sink_to_sink(const struct _starpu_mp_node *src_node,
  39. const struct _starpu_mp_node *dst_node, void *src, void *dst, size_t size);
  40. int _starpu_src_common_locate_file(char *located_file_name,
  41. const char *env_file_name, const char *env_mic_path,
  42. const char *config_file_name, const char *actual_file_name,
  43. const char **suffixes);
  44. #endif /* STARPU_USE_MP */
  45. #endif /* __SOURCE_COMMON_H__ */