starpu_top_core.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011 William Braik, Yann Courtois, Jean-Marie Couteyen, Anthony Roy
  4. * Copyright (C) 2011, 2012 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. #include <time.h>
  18. struct starpu_task;
  19. /*
  20. * Convert timespec to ms
  21. */
  22. unsigned long long _starpu_top_timing_timespec_to_ms(const struct timespec *ts);
  23. /*
  24. * This function returns 1 if starpu_top is initialized. 0 otherwise.
  25. */
  26. int _starpu_top_status_get();
  27. /*
  28. * This functions notify UI than the task has started or ended
  29. */
  30. void _starpu_top_task_started(struct starpu_task *task,
  31. int devid,
  32. const struct timespec* ts);
  33. void _starpu_top_task_ended(struct starpu_task *task,
  34. int devid,
  35. const struct timespec* ts );
  36. /*
  37. * This functions notify UI than the task have been planed to
  38. * run from timestamp_begin to timestamp_end, on computation-core
  39. */
  40. void __starpu_top_task_prevision_timespec(struct starpu_task *task,
  41. int devid,
  42. const struct timespec* start,
  43. const struct timespec* end);
  44. void _starpu_top_task_prevision(struct starpu_task *task,
  45. int devid, unsigned long long start,
  46. unsigned long long end);
  47. /****************************************************
  48. ***************** Callback function *****************
  49. *****************************************************/
  50. void _starpu_top_process_input_message(char *message);