starpu.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012-2017 Inria
  4. * Copyright (C) 2009-2014,2016-2017 Université de Bordeaux
  5. * Copyright (C) 2010-2015,2017 CNRS
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. #ifndef __STARPU_H__
  19. #define __STARPU_H__
  20. #include <stdlib.h>
  21. #ifndef _MSC_VER
  22. #include <stdint.h>
  23. #else
  24. #include <windows.h>
  25. typedef unsigned char uint8_t;
  26. typedef unsigned short uint16_t;
  27. typedef unsigned int uint32_t;
  28. typedef unsigned long long uint64_t;
  29. typedef UINT_PTR uintptr_t;
  30. typedef char int8_t;
  31. typedef short int16_t;
  32. typedef int int32_t;
  33. typedef long long int64_t;
  34. typedef INT_PTR intptr_t;
  35. #endif
  36. #include <starpu_config.h>
  37. #ifdef STARPU_HAVE_WINDOWS
  38. #include <windows.h>
  39. #endif
  40. #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
  41. #include <starpu_opencl.h>
  42. #endif
  43. #include <starpu_thread.h>
  44. #include <starpu_thread_util.h>
  45. #include <starpu_util.h>
  46. #include <starpu_data.h>
  47. #include <starpu_disk.h>
  48. #include <starpu_data_interfaces.h>
  49. #include <starpu_data_filters.h>
  50. #include <starpu_stdlib.h>
  51. #include <starpu_perfmodel.h>
  52. #include <starpu_worker.h>
  53. #include <starpu_task.h>
  54. #ifndef BUILDING_STARPU
  55. #include <starpu_task_list.h>
  56. #endif
  57. #include <starpu_task_util.h>
  58. #include <starpu_sched_ctx.h>
  59. #include <starpu_expert.h>
  60. #include <starpu_rand.h>
  61. #include <starpu_cuda.h>
  62. #include <starpu_cublas.h>
  63. #include <starpu_cusparse.h>
  64. #include <starpu_bound.h>
  65. #include <starpu_hash.h>
  66. #include <starpu_profiling.h>
  67. #include <starpu_top.h>
  68. #include <starpu_fxt.h>
  69. #include <starpu_driver.h>
  70. #include <starpu_tree.h>
  71. #include <starpu_openmp.h>
  72. #include <starpu_simgrid_wrap.h>
  73. #include <starpu_bitmap.h>
  74. #include <starpu_clusters_util.h>
  75. #ifdef __cplusplus
  76. extern "C"
  77. {
  78. #endif
  79. struct starpu_conf
  80. {
  81. int magic;
  82. const char *sched_policy_name;
  83. struct starpu_sched_policy *sched_policy;
  84. void (*sched_policy_init)(unsigned);
  85. int ncpus;
  86. int ncuda;
  87. int nopencl;
  88. int nmic;
  89. int nscc;
  90. int nmpi_ms;
  91. unsigned use_explicit_workers_bindid;
  92. unsigned workers_bindid[STARPU_NMAXWORKERS];
  93. unsigned use_explicit_workers_cuda_gpuid;
  94. unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS];
  95. unsigned use_explicit_workers_opencl_gpuid;
  96. unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS];
  97. unsigned use_explicit_workers_mic_deviceid;
  98. unsigned workers_mic_deviceid[STARPU_NMAXWORKERS];
  99. unsigned use_explicit_workers_scc_deviceid;
  100. unsigned workers_scc_deviceid[STARPU_NMAXWORKERS];
  101. unsigned use_explicit_workers_mpi_ms_deviceid;
  102. unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS];
  103. int bus_calibrate;
  104. int calibrate;
  105. int single_combined_worker;
  106. char *mic_sink_program_path;
  107. int disable_asynchronous_copy;
  108. int disable_asynchronous_cuda_copy;
  109. int disable_asynchronous_opencl_copy;
  110. int disable_asynchronous_mic_copy;
  111. int disable_asynchronous_mpi_ms_copy;
  112. unsigned *cuda_opengl_interoperability;
  113. unsigned n_cuda_opengl_interoperability;
  114. struct starpu_driver *not_launched_drivers;
  115. unsigned n_not_launched_drivers;
  116. unsigned trace_buffer_size;
  117. int global_sched_ctx_min_priority;
  118. int global_sched_ctx_max_priority;
  119. #ifdef STARPU_WORKER_CALLBACKS
  120. void (*callback_worker_going_to_sleep)(unsigned workerid);
  121. void (*callback_worker_waking_up)(unsigned workerid);
  122. #endif
  123. };
  124. int starpu_conf_init(struct starpu_conf *conf);
  125. int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
  126. int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
  127. int starpu_is_initialized(void);
  128. void starpu_pause(void);
  129. void starpu_resume(void);
  130. void starpu_shutdown(void);
  131. void starpu_topology_print(FILE *f);
  132. int starpu_asynchronous_copy_disabled(void);
  133. int starpu_asynchronous_cuda_copy_disabled(void);
  134. int starpu_asynchronous_opencl_copy_disabled(void);
  135. int starpu_asynchronous_mic_copy_disabled(void);
  136. int starpu_asynchronous_mpi_ms_copy_disabled(void);
  137. void starpu_display_stats();
  138. void starpu_get_version(int *major, int *minor, int *release);
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #include "starpu_deprecated_api.h"
  143. #endif /* __STARPU_H__ */