starpu_bound.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), 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_BOUND_H__
  17. #define __STARPU_BOUND_H__
  18. #include <stdio.h>
  19. #ifdef __cplusplus
  20. extern "C"
  21. {
  22. #endif
  23. /**
  24. @defgroup API_Theoretical_Lower_Bound_on_Execution_Time Theoretical Lower Bound on Execution Time
  25. @brief Compute theoretical upper computation efficiency bound corresponding to some actual execution.
  26. @{
  27. */
  28. /**
  29. Start recording tasks (resets stats). \p deps tells whether
  30. dependencies should be recorded too (this is quite expensive)
  31. */
  32. void starpu_bound_start(int deps, int prio);
  33. /**
  34. Stop recording tasks
  35. */
  36. void starpu_bound_stop(void);
  37. /**
  38. Emit the DAG that was recorded on \p output.
  39. */
  40. void starpu_bound_print_dot(FILE *output);
  41. /**
  42. Get theoretical upper bound (in ms) (needs glpk support detected by
  43. configure script). It returns 0 if some performance models are not
  44. calibrated.
  45. */
  46. void starpu_bound_compute(double *res, double *integer_res, int integer);
  47. /**
  48. Emit the Linear Programming system on \p output for the recorded
  49. tasks, in the lp format
  50. */
  51. void starpu_bound_print_lp(FILE *output);
  52. /**
  53. Emit the Linear Programming system on \p output for the recorded
  54. tasks, in the mps format
  55. */
  56. void starpu_bound_print_mps(FILE *output);
  57. /**
  58. Emit on \p output the statistics of actual execution vs theoretical
  59. upper bound. \p integer permits to choose between integer solving
  60. (which takes a long time but is correct), and relaxed solving
  61. (which provides an approximate solution).
  62. */
  63. void starpu_bound_print(FILE *output, int integer);
  64. /** @} */
  65. #ifdef __cplusplus
  66. }
  67. #endif
  68. #endif /* __STARPU_BOUND_H__ */