starpu.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. struct starpu_conf {
  26. /* which scheduling policy should be used ? (NULL for default) */
  27. const char *sched_policy;
  28. /* maximum number of CPUs (-1 for default) */
  29. int ncpus;
  30. /* maximum number of CUDA GPUs (-1 for default) */
  31. int ncuda;
  32. /* maximum number of Cell's SPUs (-1 for default) */
  33. int nspus;
  34. /* calibrate performance models, if any */
  35. unsigned calibrate;
  36. };
  37. /* Initialization method: it must be called prior to any other StarPU call
  38. * Default configuration is used if NULL is passed as argument.
  39. */
  40. void starpu_init(struct starpu_conf *conf);
  41. /* Shutdown method: note that statistics are only generated once StarPU is
  42. * shutdown */
  43. void starpu_shutdown(void);
  44. #endif // __STARPU_H__