load_balancer_policy.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2016 Inria
  4. * Copyright (C) 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 __LOAD_BALANCER_POLICY_H__
  18. #define __LOAD_BALANCER_POLICY_H__
  19. #include <starpu_mpi_lb.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /* A load balancer consists in a collection of operations on a data
  24. * representing the load of the application (in terms of computation, memory,
  25. * whatever). StarPU allows several entry points for the user. The load
  26. * balancer allows the user to give its load balancing methods to be used on
  27. * these entry points of the runtime system. */
  28. struct load_balancer_policy
  29. {
  30. int (*init)(struct starpu_mpi_lb_conf *);
  31. int (*deinit)();
  32. void (*submitted_task_entry_point)();
  33. void (*finished_task_entry_point)();
  34. /* Name of the load balancing policy. The selection of the load balancer is
  35. * performed through the use of the STARPU_MPI_LB=name environment
  36. * variable.
  37. */
  38. const char *policy_name;
  39. };
  40. extern struct load_balancer_policy load_heat_propagation_policy;
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif // __LOAD_BALANCER_POLICY_H__