tasks.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* GCC-StarPU
  2. Copyright (C) 2012 Inria
  3. GCC-StarPU is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or
  6. (at your option) any later version.
  7. GCC-StarPU is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with GCC-StarPU. If not, see <http://www.gnu.org/licenses/>. */
  13. /* Various utilities. */
  14. #pragma once
  15. #include <starpu-gcc/config.h>
  16. #include <starpu-gcc/utils.h>
  17. extern const char task_attribute_name[];
  18. extern const char task_implementation_attribute_name[];
  19. extern const char output_attribute_name[];
  20. extern const char task_implementation_wrapper_attribute_name[];
  21. extern const char task_implementation_list_attribute_name[];
  22. extern bool task_p (const_tree decl);
  23. extern bool task_implementation_p (const_tree decl);
  24. extern int task_implementation_where (const_tree task_impl);
  25. extern int task_implementation_target_to_int (const_tree target);
  26. extern tree task_implementation_task (const_tree task_impl);
  27. extern tree task_codelet_declaration (const_tree task_decl);
  28. extern tree task_implementation_list (const_tree task_decl);
  29. extern tree task_pointer_parameter_types (const_tree task_decl);
  30. extern int task_where (const_tree task_decl);
  31. extern tree task_implementation_wrapper (const_tree task_impl);
  32. extern enum starpu_access_mode access_mode (const_tree type);
  33. extern bool output_type_p (const_tree type);
  34. extern tree codelet_type (void);
  35. extern void taskify_function (tree fn);
  36. extern tree build_codelet_identifier (tree task_decl);
  37. extern tree build_codelet_declaration (tree task_decl);
  38. extern tree build_codelet_initializer (tree task_decl);
  39. extern tree declare_codelet (tree task_decl);
  40. extern void define_task (tree task_decl);
  41. extern void add_task_implementation (tree task_decl, tree fn,
  42. const_tree where);