starpu_top_core.h 2.0 KB

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