starpu.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2013 Université de Bordeaux 1
  4. * Copyright (C) 2010-2013 Centre National de la Recherche Scientifique
  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_H__
  18. #define __STARPU_H__
  19. #include <stdlib.h>
  20. #ifndef _MSC_VER
  21. #include <stdint.h>
  22. #else
  23. #include <windows.h>
  24. typedef unsigned char uint8_t;
  25. typedef unsigned short uint16_t;
  26. typedef unsigned int uint32_t;
  27. typedef unsigned long long uint64_t;
  28. typedef UINT_PTR uintptr_t;
  29. #endif
  30. #include <starpu_config.h>
  31. #ifdef STARPU_HAVE_WINDOWS
  32. #include <windows.h>
  33. #endif
  34. #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
  35. #include <starpu_opencl.h>
  36. #endif
  37. #include <starpu_thread.h>
  38. #include <starpu_thread_util.h>
  39. #include <starpu_util.h>
  40. #include <starpu_data.h>
  41. #include <starpu_disk.h>
  42. #include <starpu_data_interfaces.h>
  43. #include <starpu_data_filters.h>
  44. #include <starpu_stdlib.h>
  45. #include <starpu_perfmodel.h>
  46. #include <starpu_worker.h>
  47. #include <starpu_task.h>
  48. #include <starpu_task_list.h>
  49. #include <starpu_task_util.h>
  50. #include <starpu_sched_ctx.h>
  51. #include <starpu_expert.h>
  52. #include <starpu_rand.h>
  53. #include <starpu_cuda.h>
  54. #include <starpu_cublas.h>
  55. #include <starpu_bound.h>
  56. #include <starpu_hash.h>
  57. #include <starpu_profiling.h>
  58. #include <starpu_top.h>
  59. #include <starpu_fxt.h>
  60. #include <starpu_driver.h>
  61. #ifdef __cplusplus
  62. extern "C"
  63. {
  64. #endif
  65. #ifdef STARPU_SIMGRID
  66. #define main starpu_main
  67. #endif
  68. struct starpu_conf
  69. {
  70. int magic;
  71. const char *sched_policy_name;
  72. struct starpu_sched_policy *sched_policy;
  73. int ncpus;
  74. int ncuda;
  75. int nopencl;
  76. int nmic;
  77. int nscc;
  78. unsigned use_explicit_workers_bindid;
  79. unsigned workers_bindid[STARPU_NMAXWORKERS];
  80. unsigned use_explicit_workers_cuda_gpuid;
  81. unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS];
  82. unsigned use_explicit_workers_opencl_gpuid;
  83. unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS];
  84. unsigned use_explicit_workers_mic_deviceid;
  85. unsigned workers_mic_deviceid[STARPU_NMAXWORKERS];
  86. unsigned use_explicit_workers_scc_deviceid;
  87. unsigned workers_scc_deviceid[STARPU_NMAXWORKERS];
  88. int bus_calibrate;
  89. int calibrate;
  90. int single_combined_worker;
  91. char *mic_sink_program_path;
  92. int disable_asynchronous_copy;
  93. int disable_asynchronous_cuda_copy;
  94. int disable_asynchronous_opencl_copy;
  95. int disable_asynchronous_mic_copy;
  96. unsigned *cuda_opengl_interoperability;
  97. unsigned n_cuda_opengl_interoperability;
  98. struct starpu_driver *not_launched_drivers;
  99. unsigned n_not_launched_drivers;
  100. unsigned trace_buffer_size;
  101. };
  102. int starpu_conf_init(struct starpu_conf *conf);
  103. int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
  104. int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
  105. void starpu_shutdown(void);
  106. void starpu_topology_print(FILE *f);
  107. int starpu_asynchronous_copy_disabled(void);
  108. int starpu_asynchronous_cuda_copy_disabled(void);
  109. int starpu_asynchronous_opencl_copy_disabled(void);
  110. int starpu_asynchronous_mic_copy_disabled(void);
  111. void starpu_display_stats();
  112. void starpu_get_version(int *major, int *minor, int *release);
  113. #ifdef __cplusplus
  114. }
  115. #endif
  116. #include "starpu_deprecated_api.h"
  117. #endif /* __STARPU_H__ */