starpu.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * StarPU
  3. * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  4. *
  5. * This program 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. * This program 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_H__
  17. #define __STARPU_H__
  18. #include <stdlib.h>
  19. #include <stdint.h>
  20. #include <starpu_config.h>
  21. #include <starpu-util.h>
  22. #include <starpu-data.h>
  23. #include <starpu-perfmodel.h>
  24. #include <starpu-task.h>
  25. /* TODO: should either make 0 be the default, or provide an initializer, to
  26. * make future extensions not problematic */
  27. struct starpu_conf {
  28. /* which scheduling policy should be used ? (NULL for default) */
  29. const char *sched_policy;
  30. /* maximum number of CPUs (-1 for default) */
  31. int ncpus;
  32. /* maximum number of CUDA GPUs (-1 for default) */
  33. int ncuda;
  34. /* maximum number of Cell's SPUs (-1 for default) */
  35. int nspus;
  36. /* calibrate performance models, if any */
  37. unsigned calibrate;
  38. };
  39. /* Initialization method: it must be called prior to any other StarPU call
  40. * Default configuration is used if NULL is passed as argument.
  41. */
  42. void starpu_init(struct starpu_conf *conf);
  43. /* Shutdown method: note that statistics are only generated once StarPU is
  44. * shutdown */
  45. void starpu_shutdown(void);
  46. #endif // __STARPU_H__