starpu_task_util.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2013 Université de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  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. #ifndef __STARPU_TASK_UTIL_H__
  18. #define __STARPU_TASK_UTIL_H__
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include <assert.h>
  23. #include <starpu.h>
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t *deps, void (*callback)(void *), void *callback_arg);
  29. #define STARPU_VALUE (1<<16)
  30. #define STARPU_CALLBACK (2<<16)
  31. #define STARPU_CALLBACK_WITH_ARG (3<<16)
  32. #define STARPU_CALLBACK_ARG (4<<16)
  33. #define STARPU_PRIORITY (5<<16)
  34. #define STARPU_EXECUTE_ON_NODE (6<<16)
  35. #define STARPU_EXECUTE_ON_DATA (7<<16)
  36. #define STARPU_DATA_ARRAY (8<<16)
  37. #define STARPU_TAG (9<<16)
  38. #define STARPU_HYPERVISOR_TAG (10<<16)
  39. #define STARPU_FLOPS (11<<16)
  40. #define STARPU_SCHED_CTX (12<<16)
  41. #define STARPU_PROLOGUE_CALLBACK (13<<16)
  42. #define STARPU_PROLOGUE_CALLBACK_ARG (14<<16)
  43. struct starpu_task *starpu_task_build(struct starpu_codelet *cl, ...);
  44. int starpu_insert_task(struct starpu_codelet *cl, ...);
  45. void starpu_codelet_unpack_args(void *cl_arg, ...);
  46. void starpu_codelet_pack_args(void **arg_buffer, size_t *arg_buffer_size, ...);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* __STARPU_TASK_UTIL_H__ */