starpu_top_core.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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, 2013 CNRS
  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. extern int _starpu_top;
  27. void _starpu_top_shutdown(void);
  28. int _starpu_top_status_get(void);
  29. #define _starpu_top_status_get() _starpu_top
  30. /*
  31. * This functions notify UI than the task has started or ended
  32. */
  33. void _starpu_top_task_started(struct starpu_task *task,
  34. int devid,
  35. const struct timespec* ts);
  36. void _starpu_top_task_ended(struct starpu_task *task,
  37. int devid,
  38. const struct timespec* ts );
  39. /*
  40. * This functions notify UI than the task have been planed to
  41. * run from timestamp_begin to timestamp_end, on computation-core
  42. */
  43. void __starpu_top_task_prevision_timespec(struct starpu_task *task,
  44. int devid,
  45. const struct timespec* start,
  46. const struct timespec* end);
  47. void starpu_top_task_prevision(struct starpu_task *task,
  48. int devid, unsigned long long start,
  49. unsigned long long end);
  50. /****************************************************
  51. ***************** Callback function *****************
  52. *****************************************************/
  53. void _starpu_top_process_input_message(char *message);