app_driven_policy.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011-2013,2015 Inria
  4. * Copyright (C) 2012,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. #include <sc_hypervisor_policy.h>
  18. static void app_driven_handle_post_exec_hook(unsigned sched_ctx, __attribute__((unused)) int task_tag)
  19. {
  20. sc_hypervisor_policy_resize_to_unknown_receiver(sched_ctx, 1);
  21. }
  22. struct sc_hypervisor_policy app_driven_policy =
  23. {
  24. .size_ctxs = NULL,
  25. .handle_poped_task = NULL,
  26. .handle_pushed_task = NULL,
  27. .handle_idle_cycle = NULL,
  28. .handle_idle_end = NULL,
  29. .handle_post_exec_hook = app_driven_handle_post_exec_hook,
  30. .handle_submitted_job = NULL,
  31. .end_ctx = NULL,
  32. .init_worker = NULL,
  33. .custom = 0,
  34. .name = "app_driven"
  35. };