starpu_bound.h 2.3 KB

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