starpu_sched_ctx_hypervisor.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010 - 2012 INRIA
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #ifndef __STARPU_SCHED_CTX_HYPERVISOR_H__
  17. #define __STARPU_SCHED_CTX_HYPERVISOR_H__
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif
  22. struct starpu_sched_ctx_performance_counters
  23. {
  24. void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time);
  25. void (*notify_poped_task)(unsigned sched_ctx_id, int worker);
  26. void (*notify_pushed_task)(unsigned sched_ctx_id, int worker);
  27. void (*notify_post_exec_task)(struct starpu_task *task, size_t data_size, uint32_t footprint, int hypervisor_tag);
  28. void (*notify_submitted_job)(struct starpu_task *task, uint32_t footprint, size_t data_size);
  29. void (*notify_ready_task)(unsigned sched_ctx_id, struct starpu_task *task);
  30. void (*notify_empty_ctx)(unsigned sched_ctx_id, struct starpu_task *task);
  31. void (*notify_delete_context)(unsigned sched_ctx);
  32. };
  33. #ifdef STARPU_USE_SC_HYPERVISOR
  34. void starpu_sched_ctx_set_perf_counters(unsigned sched_ctx_id, void *perf_counters);
  35. #endif //STARPU_USE_SC_HYPERVISOR
  36. void starpu_sched_ctx_notify_hypervisor_exists(void);
  37. unsigned starpu_sched_ctx_check_if_hypervisor_exists(void);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* __STARPU_SCHED_CTX_HYPERVISOR_H__ */