starpu_sched_ctx_hypervisor.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010,2012-2013,2015 Inria
  4. * Copyright (C) 2013,2017 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. #ifndef __STARPU_SCHED_CTX_HYPERVISOR_H__
  18. #define __STARPU_SCHED_CTX_HYPERVISOR_H__
  19. #ifdef __cplusplus
  20. extern "C"
  21. {
  22. #endif
  23. struct starpu_sched_ctx_performance_counters
  24. {
  25. void (*notify_idle_cycle)(unsigned sched_ctx_id, int worker, double idle_time);
  26. void (*notify_poped_task)(unsigned sched_ctx_id, int worker);
  27. void (*notify_pushed_task)(unsigned sched_ctx_id, int worker);
  28. void (*notify_post_exec_task)(struct starpu_task *task, size_t data_size, uint32_t footprint, int hypervisor_tag, double flops);
  29. void (*notify_submitted_job)(struct starpu_task *task, uint32_t footprint, size_t data_size);
  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. void starpu_sched_ctx_update_start_resizing_sample(unsigned sched_ctx_id, double start_sample);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* __STARPU_SCHED_CTX_HYPERVISOR_H__ */