starpu_bound.h 2.3 KB

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