tasks.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. /* Note: Users of this file must first include <starpu.h>, but we don't do
  17. that here because it has to be done very early, to avoid the dreaded "use
  18. of poisoned malloc" in xmmintrin.h. */
  19. #include <starpu-gcc/utils.h>
  20. extern const char task_attribute_name[];
  21. extern const char task_implementation_attribute_name[];
  22. extern const char output_attribute_name[];
  23. extern const char task_implementation_wrapper_attribute_name[];
  24. extern const char task_implementation_list_attribute_name[];
  25. extern bool task_p (const_tree decl);
  26. extern bool task_implementation_p (const_tree decl);
  27. extern int task_implementation_where (const_tree task_impl);
  28. extern int task_implementation_target_to_int (const_tree target);
  29. extern tree task_implementation_task (const_tree task_impl);
  30. extern tree task_codelet_declaration (const_tree task_decl);
  31. extern tree task_implementation_list (const_tree task_decl);
  32. extern tree task_pointer_parameter_types (const_tree task_decl);
  33. extern int task_where (const_tree task_decl);
  34. extern tree task_implementation_wrapper (const_tree task_impl);
  35. extern enum starpu_data_access_mode access_mode (const_tree type);
  36. extern bool output_type_p (const_tree type);
  37. extern tree codelet_type (void);
  38. extern void taskify_function (tree fn);
  39. extern tree build_codelet_identifier (tree task_decl);
  40. extern tree build_codelet_declaration (tree task_decl);
  41. extern tree build_codelet_initializer (tree task_decl);
  42. extern tree declare_codelet (tree task_decl);
  43. extern void define_task (tree task_decl);
  44. extern void add_task_implementation (tree task_decl, tree fn,
  45. const_tree where);