starpu.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. *
  5. * StarPU 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. * StarPU 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. #ifndef _MSC_VER
  20. #include <stdint.h>
  21. #else
  22. #include <windows.h>
  23. typedef unsigned char uint8_t;
  24. typedef unsigned short uint16_t;
  25. typedef unsigned int uint32_t;
  26. typedef unsigned long long uint64_t;
  27. typedef UINT_PTR uintptr_t;
  28. typedef char int8_t;
  29. typedef short int16_t;
  30. typedef int int32_t;
  31. typedef long long int64_t;
  32. typedef INT_PTR intptr_t;
  33. #endif
  34. #include <starpu_config.h>
  35. #ifdef STARPU_HAVE_WINDOWS
  36. #include <windows.h>
  37. #endif
  38. #if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
  39. #include <starpu_opencl.h>
  40. #endif
  41. #include <starpu_thread.h>
  42. #include <starpu_thread_util.h>
  43. #include <starpu_util.h>
  44. #include <starpu_data.h>
  45. #include <starpu_helper.h>
  46. #include <starpu_disk.h>
  47. #include <starpu_data_interfaces.h>
  48. #include <starpu_data_filters.h>
  49. #include <starpu_stdlib.h>
  50. #include <starpu_task_bundle.h>
  51. #include <starpu_task_dep.h>
  52. #include <starpu_task.h>
  53. #include <starpu_worker.h>
  54. #include <starpu_perfmodel.h>
  55. #include <starpu_worker.h>
  56. #ifndef BUILDING_STARPU
  57. #include <starpu_task_list.h>
  58. #endif
  59. #include <starpu_task_util.h>
  60. #include <starpu_scheduler.h>
  61. #include <starpu_sched_ctx.h>
  62. #include <starpu_expert.h>
  63. #include <starpu_rand.h>
  64. #include <starpu_cuda.h>
  65. #include <starpu_cublas.h>
  66. #include <starpu_cusparse.h>
  67. #include <starpu_bound.h>
  68. #include <starpu_hash.h>
  69. #include <starpu_profiling.h>
  70. #include <starpu_fxt.h>
  71. #include <starpu_driver.h>
  72. #include <starpu_tree.h>
  73. #include <starpu_openmp.h>
  74. #include <starpu_simgrid_wrap.h>
  75. #include <starpu_bitmap.h>
  76. #include <starpu_clusters.h>
  77. #include <starpu_perf_monitoring.h>
  78. #include <starpu_perf_steering.h>
  79. #include <starpu_fpga.h>
  80. #ifdef __cplusplus
  81. extern "C"
  82. {
  83. #endif
  84. /**
  85. @defgroup API_Initialization_and_Termination Initialization and Termination
  86. @{
  87. */
  88. /**
  89. Structure passed to the starpu_init() function to configure StarPU.
  90. It has to be initialized with starpu_conf_init(). When the default
  91. value is used, StarPU automatically selects the number of
  92. processing units and takes the default scheduling policy. The
  93. environment variables overwrite the equivalent parameters.
  94. */
  95. struct starpu_conf
  96. {
  97. /**
  98. @private
  99. Will be initialized by starpu_conf_init(). Should not be
  100. set by hand.
  101. */
  102. int magic;
  103. /**
  104. @private
  105. Tell starpu_init() if MPI will be initialized later.
  106. */
  107. int will_use_mpi;
  108. /**
  109. Name of the scheduling policy. This can also be specified
  110. with the environment variable \ref STARPU_SCHED. (default =
  111. <c>NULL</c>).
  112. */
  113. const char *sched_policy_name;
  114. /**
  115. Definition of the scheduling policy. This field is ignored
  116. if starpu_conf::sched_policy_name is set.
  117. (default = <c>NULL</c>)
  118. */
  119. struct starpu_sched_policy *sched_policy;
  120. void (*sched_policy_init)(unsigned);
  121. /**
  122. For all parameters specified in this structure that can
  123. also be set with environment variables, by default,
  124. StarPU chooses the value of the environment variable
  125. against the value set in starpu_conf. Setting the parameter
  126. starpu_conf::precedence_over_environment_variables to 1 allows to give precedence
  127. to the value set in the structure over the environment
  128. variable.
  129. */
  130. int precedence_over_environment_variables;
  131. /**
  132. Number of CPU cores that StarPU can use. This can also be
  133. specified with the environment variable \ref STARPU_NCPU.
  134. (default = -1)
  135. */
  136. int ncpus;
  137. /**
  138. Number of CPU cores to that StarPU should leave aside. They can then
  139. be used by application threads, by calling starpu_get_next_bindid() to
  140. get their ID, and starpu_bind_thread_on() to bind the current thread to them.
  141. */
  142. int reserve_ncpus;
  143. /**
  144. Number of CUDA devices that StarPU can use. This can also
  145. be specified with the environment variable \ref
  146. STARPU_NCUDA.
  147. (default = -1)
  148. */
  149. int ncuda;
  150. /**
  151. Number of OpenCL devices that StarPU can use. This can also
  152. be specified with the environment variable \ref
  153. STARPU_NOPENCL.
  154. (default = -1)
  155. */
  156. int nopencl;
  157. /**
  158. Number of FPGA devices that StarPU can use. This can also
  159. be specified with the environment variable \ref
  160. STARPU_NFPGA.
  161. (default = -1)
  162. */
  163. int nfpga;
  164. /**
  165. Number of MIC devices that StarPU can use. This can also be
  166. specified with the environment variable \ref STARPU_NMIC.
  167. (default = -1)
  168. */
  169. int nmic;
  170. /**
  171. Number of MPI Master Slave devices that StarPU can use.
  172. This can also be specified with the environment variable
  173. \ref STARPU_NMPI_MS.
  174. (default = -1)
  175. */
  176. int nmpi_ms;
  177. /**
  178. If this flag is set, the starpu_conf::workers_bindid array
  179. indicates where the different workers are bound, otherwise
  180. StarPU automatically selects where to bind the different
  181. workers. This can also be specified with the environment
  182. variable \ref STARPU_WORKERS_CPUID.
  183. (default = 0)
  184. */
  185. unsigned use_explicit_workers_bindid;
  186. /**
  187. If the starpu_conf::use_explicit_workers_bindid flag is
  188. set, this array indicates where to bind the different
  189. workers. The i-th entry of the starpu_conf::workers_bindid
  190. indicates the logical identifier of the processor which
  191. should execute the i-th worker. Note that the logical
  192. ordering of the CPUs is either determined by the OS, or
  193. provided by the hwloc library in case it is available.
  194. */
  195. unsigned workers_bindid[STARPU_NMAXWORKERS];
  196. /**
  197. If this flag is set, the CUDA workers will be attached to
  198. the CUDA devices specified in the
  199. starpu_conf::workers_cuda_gpuid array. Otherwise, StarPU
  200. affects the CUDA devices in a round-robin fashion. This can
  201. also be specified with the environment variable \ref
  202. STARPU_WORKERS_CUDAID.
  203. (default = 0)
  204. */
  205. unsigned use_explicit_workers_cuda_gpuid;
  206. /**
  207. If the starpu_conf::use_explicit_workers_cuda_gpuid flag is
  208. set, this array contains the logical identifiers of the
  209. CUDA devices (as used by \c cudaGetDevice()).
  210. */
  211. unsigned workers_cuda_gpuid[STARPU_NMAXWORKERS];
  212. /**
  213. If this flag is set, the OpenCL workers will be attached to
  214. the OpenCL devices specified in the
  215. starpu_conf::workers_opencl_gpuid array. Otherwise, StarPU
  216. affects the OpenCL devices in a round-robin fashion. This
  217. can also be specified with the environment variable \ref
  218. STARPU_WORKERS_OPENCLID.
  219. (default = 0)
  220. */
  221. unsigned use_explicit_workers_opencl_gpuid;
  222. /**
  223. If the starpu_conf::use_explicit_workers_opencl_gpuid flag
  224. is set, this array contains the logical identifiers of the
  225. OpenCL devices to be used.
  226. */
  227. unsigned workers_opencl_gpuid[STARPU_NMAXWORKERS];
  228. /**
  229. If this flag is set, the FPGA workers will be attached to
  230. the FPGA devices specified in the
  231. starpu_conf::workers_fpga_deviceid array. Otherwise, StarPU
  232. affects the FPGA devices in a round-robin fashion. This
  233. can also be specified with the environment variable \ref
  234. STARPU_WORKERS_FPGAID.
  235. (default = 0)
  236. */
  237. unsigned use_explicit_workers_fpga_deviceid;
  238. /**
  239. If the starpu_conf::use_explicit_workers_fpga_deviceid flag
  240. is set, this array contains the logical identifiers of the
  241. FPGA devices to be used.
  242. */
  243. unsigned workers_fpga_deviceid[STARPU_NMAXWORKERS];
  244. #ifdef STARPU_USE_FPGA
  245. /**
  246. This allows to specify the Maxeler file(s) to be loaded on FPGAs.
  247. This is an array of starpu_max_load, the last of which shall have
  248. file set to NULL. In order to use all available devices,
  249. starpu_max_load::engine_id_pattern can be set to "*", but only the
  250. last non-NULL entry can be set so.
  251. If this is not set, it is assumed that the basic static SLiC
  252. interface is used.
  253. */
  254. struct starpu_max_load *fpga_load;
  255. #else
  256. void *fpga_load;
  257. #endif
  258. /**
  259. If this flag is set, the MIC workers will be attached to
  260. the MIC devices specified in the array
  261. starpu_conf::workers_mic_deviceid. Otherwise, StarPU
  262. affects the MIC devices in a round-robin fashion. This can
  263. also be specified with the environment variable \ref
  264. STARPU_WORKERS_MICID.
  265. (default = 0)
  266. */
  267. unsigned use_explicit_workers_mic_deviceid;
  268. /**
  269. If the flag starpu_conf::use_explicit_workers_mic_deviceid
  270. is set, the array contains the logical identifiers of the
  271. MIC devices to be used.
  272. */
  273. unsigned workers_mic_deviceid[STARPU_NMAXWORKERS];
  274. /**
  275. If this flag is set, the MPI Master Slave workers will be
  276. attached to the MPI Master Slave devices specified in the
  277. array starpu_conf::workers_mpi_ms_deviceid. Otherwise,
  278. StarPU affects the MPI Master Slave devices in a
  279. round-robin fashion.
  280. (default = 0)
  281. */
  282. unsigned use_explicit_workers_mpi_ms_deviceid;
  283. /**
  284. If the flag
  285. starpu_conf::use_explicit_workers_mpi_ms_deviceid is set,
  286. the array contains the logical identifiers of the MPI
  287. Master Slave devices to be used.
  288. */
  289. unsigned workers_mpi_ms_deviceid[STARPU_NMAXWORKERS];
  290. /**
  291. If this flag is set, StarPU will recalibrate the bus. If
  292. this value is equal to -1, the default value is used. This
  293. can also be specified with the environment variable \ref
  294. STARPU_BUS_CALIBRATE.
  295. (default = 0)
  296. */
  297. int bus_calibrate;
  298. /**
  299. If this flag is set, StarPU will calibrate the performance
  300. models when executing tasks. If this value is equal to -1,
  301. the default value is used. If the value is equal to 1, it
  302. will force continuing calibration. If the value is equal to
  303. 2, the existing performance models will be overwritten.
  304. This can also be specified with the environment variable
  305. \ref STARPU_CALIBRATE.
  306. (default = 0)
  307. */
  308. int calibrate;
  309. /**
  310. By default, StarPU executes parallel tasks concurrently.
  311. Some parallel libraries (e.g. most OpenMP implementations)
  312. however do not support concurrent calls to parallel code.
  313. In such case, setting this flag makes StarPU only start one
  314. parallel task at a time (but other CPU and GPU tasks are
  315. not affected and can be run concurrently). The parallel
  316. task scheduler will however still try varying combined
  317. worker sizes to look for the most efficient ones.
  318. This can also be specified with the environment variable
  319. \ref STARPU_SINGLE_COMBINED_WORKER.
  320. (default = 0)
  321. */
  322. int single_combined_worker;
  323. /**
  324. Path to the kernel to execute on the MIC device, compiled
  325. for MIC architecture. When set to <c>NULL</c>, StarPU
  326. automatically looks next to the host program location.
  327. (default = <c>NULL</c>)
  328. */
  329. char *mic_sink_program_path;
  330. /**
  331. This flag should be set to 1 to disable asynchronous copies
  332. between CPUs and all accelerators.
  333. The AMD implementation of OpenCL is known to fail when
  334. copying data asynchronously. When using this
  335. implementation, it is therefore necessary to disable
  336. asynchronous data transfers.
  337. This can also be specified with the environment variable
  338. \ref STARPU_DISABLE_ASYNCHRONOUS_COPY.
  339. This can also be specified at compilation time by giving to
  340. the configure script the option \ref
  341. disable-asynchronous-copy "--disable-asynchronous-copy".
  342. (default = 0)
  343. */
  344. int disable_asynchronous_copy;
  345. /**
  346. This flag should be set to 1 to disable asynchronous copies
  347. between CPUs and CUDA accelerators.
  348. This can also be specified with the environment variable
  349. \ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.
  350. This can also be specified at compilation time by giving to
  351. the configure script the option \ref
  352. disable-asynchronous-cuda-copy
  353. "--disable-asynchronous-cuda-copy".
  354. (default = 0)
  355. */
  356. int disable_asynchronous_cuda_copy;
  357. /**
  358. This flag should be set to 1 to disable asynchronous copies
  359. between CPUs and OpenCL accelerators.
  360. The AMD implementation of OpenCL is known to fail when
  361. copying data asynchronously. When using this
  362. implementation, it is therefore necessary to disable
  363. asynchronous data transfers.
  364. This can also be specified with the environment variable
  365. \ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.
  366. This can also be specified at compilation time by giving to
  367. the configure script the option \ref
  368. disable-asynchronous-opencl-copy
  369. "--disable-asynchronous-opencl-copy".
  370. (default = 0)
  371. */
  372. int disable_asynchronous_opencl_copy;
  373. /**
  374. This flag should be set to 1 to disable asynchronous copies
  375. between CPUs and MIC accelerators.
  376. This can also be specified with the environment variable
  377. \ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.
  378. This can also be specified at compilation time by giving to
  379. the configure script the option \ref
  380. disable-asynchronous-mic-copy
  381. "--disable-asynchronous-mic-copy".
  382. (default = 0).
  383. */
  384. int disable_asynchronous_mic_copy;
  385. /**
  386. This flag should be set to 1 to disable asynchronous copies
  387. between CPUs and MPI Master Slave devices.
  388. This can also be specified with the environment variable
  389. \ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.
  390. This can also be specified at compilation time by giving to
  391. the configure script the option \ref
  392. disable-asynchronous-mpi-master-slave-copy
  393. "--disable-asynchronous-mpi-master-slave-copy".
  394. (default = 0).
  395. */
  396. int disable_asynchronous_mpi_ms_copy;
  397. /**
  398. This flag should be set to 1 to disable asynchronous copies
  399. between CPUs and FPGA devices.
  400. This can also be specified with the environment variable
  401. \ref STARPU_DISABLE_ASYNCHRONOUS_FPGA_COPY.
  402. This can also be specified at compilation time by giving to
  403. the configure script the option \ref
  404. disable-asynchronous-fpga-copy
  405. "--disable-asynchronous-fpga-copy".
  406. (default = 0).
  407. */
  408. int disable_asynchronous_fpga_copy;
  409. /**
  410. Enable CUDA/OpenGL interoperation on these CUDA devices.
  411. This can be set to an array of CUDA device identifiers for
  412. which \c cudaGLSetGLDevice() should be called instead of \c
  413. cudaSetDevice(). Its size is specified by the
  414. starpu_conf::n_cuda_opengl_interoperability field below
  415. (default = <c>NULL</c>)
  416. */
  417. unsigned *cuda_opengl_interoperability;
  418. /**
  419. Size of the array starpu_conf::cuda_opengl_interoperability
  420. */
  421. unsigned n_cuda_opengl_interoperability;
  422. /**
  423. Array of drivers that should not be launched by StarPU. The
  424. application will run in one of its own threads.
  425. (default = <c>NULL</c>)
  426. */
  427. struct starpu_driver *not_launched_drivers;
  428. /**
  429. The number of StarPU drivers that should not be launched by
  430. StarPU, i.e number of elements of the array
  431. starpu_conf::not_launched_drivers.
  432. (default = 0)
  433. */
  434. unsigned n_not_launched_drivers;
  435. /**
  436. Specify the buffer size used for FxT tracing. Starting from
  437. FxT version 0.2.12, the buffer will automatically be
  438. flushed when it fills in, but it may still be interesting
  439. to specify a bigger value to avoid any flushing (which
  440. would disturb the trace).
  441. */
  442. uint64_t trace_buffer_size;
  443. int global_sched_ctx_min_priority;
  444. int global_sched_ctx_max_priority;
  445. #ifdef STARPU_WORKER_CALLBACKS
  446. void (*callback_worker_going_to_sleep)(unsigned workerid);
  447. void (*callback_worker_waking_up)(unsigned workerid);
  448. #endif
  449. /**
  450. Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP
  451. signals to make sure final actions (e.g dumping FxT trace
  452. files) are done even though the application has crashed. By
  453. default (value = \c 1), signals are catched. It should be
  454. disabled on systems which already catch these signals for
  455. their own needs (e.g JVM)
  456. This can also be specified with the environment variable
  457. \ref STARPU_CATCH_SIGNALS
  458. */
  459. int catch_signals;
  460. /**
  461. Specify whether StarPU should automatically start to collect
  462. performance counters after initialization
  463. */
  464. unsigned start_perf_counter_collection;
  465. /**
  466. Minimum spinning backoff of drivers. Default value: \c 1
  467. */
  468. unsigned driver_spinning_backoff_min;
  469. /**
  470. Maximum spinning backoff of drivers. Default value: \c 32
  471. */
  472. unsigned driver_spinning_backoff_max;
  473. };
  474. /**
  475. Initialize the \p conf structure with the default values. In case
  476. some configuration parameters are already specified through
  477. environment variables, starpu_conf_init() initializes the fields of
  478. \p conf according to the environment variables.
  479. For instance if \ref STARPU_CALIBRATE is set, its value is put in
  480. the field starpu_conf::calibrate of \p conf.
  481. Upon successful completion, this function returns 0. Otherwise,
  482. <c>-EINVAL</c> indicates that the argument was <c>NULL</c>.
  483. */
  484. int starpu_conf_init(struct starpu_conf *conf);
  485. /**
  486. Set fields of \p conf so that no worker is enabled, i.e. set
  487. starpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.
  488. This allows to portably enable only a given type of worker:
  489. starpu_conf_noworker(&conf);
  490. conf.ncpus = -1;
  491. */
  492. int starpu_conf_noworker(struct starpu_conf *conf);
  493. /**
  494. StarPU initialization method, must be called prior to any other
  495. StarPU call. It is possible to specify StarPU’s configuration (e.g.
  496. scheduling policy, number of cores, ...) by passing a
  497. non-<c>NULL</c> \p conf. Default configuration is used if \p conf
  498. is <c>NULL</c>. Upon successful completion, this function returns
  499. 0. Otherwise, <c>-ENODEV</c> indicates that no worker was available
  500. (and thus StarPU was not initialized).
  501. */
  502. int starpu_init(struct starpu_conf *conf) STARPU_WARN_UNUSED_RESULT;
  503. /**
  504. Similar to starpu_init(), but also take the \p argc and \p argv as
  505. defined by the application.
  506. Do not call starpu_init() and starpu_initialize() in the same
  507. program.
  508. */
  509. int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv);
  510. /**
  511. Return 1 if StarPU is already initialized.
  512. */
  513. int starpu_is_initialized(void);
  514. /**
  515. Wait for starpu_init() call to finish.
  516. */
  517. void starpu_wait_initialized(void);
  518. /**
  519. StarPU termination method, must be called at the end of the
  520. application: statistics and other post-mortem debugging information
  521. are not guaranteed to be available until this method has been
  522. called.
  523. */
  524. void starpu_shutdown(void);
  525. /**
  526. Suspend the processing of new tasks by workers. It can be used in a
  527. program where StarPU is used during only a part of the execution.
  528. Without this call, the workers continue to poll for new tasks in a
  529. tight loop, wasting CPU time. The symmetric call to starpu_resume()
  530. should be used to unfreeze the workers.
  531. */
  532. void starpu_pause(void);
  533. /**
  534. Symmetrical call to starpu_pause(), used to resume the workers
  535. polling for new tasks.
  536. */
  537. void starpu_resume(void);
  538. /**
  539. Value to be passed to starpu_get_next_bindid() and
  540. starpu_bind_thread_on() when binding a thread which will
  541. significantly eat CPU time, and should thus have its own dedicated
  542. CPU.
  543. */
  544. #define STARPU_THREAD_ACTIVE (1 << 0)
  545. /**
  546. Return a PU binding ID which can be used to bind threads with
  547. starpu_bind_thread_on(). \p flags can be set to
  548. STARPU_THREAD_ACTIVE or 0. When \p npreferred is set to non-zero,
  549. \p preferred is an array of size \p npreferred in which a
  550. preference of PU binding IDs can be set. By default StarPU will
  551. return the first PU available for binding.
  552. */
  553. unsigned starpu_get_next_bindid(unsigned flags, unsigned *preferred, unsigned npreferred);
  554. /**
  555. Bind the calling thread on the given \p cpuid (which should have
  556. been obtained with starpu_get_next_bindid()).
  557. Return -1 if a thread was already bound to this PU (but binding
  558. will still have been done, and a warning will have been printed),
  559. so the caller can tell the user how to avoid the issue.
  560. \p name should be set to a unique string so that different calls
  561. with the same name for the same cpuid does not produce a warning.
  562. */
  563. int starpu_bind_thread_on(int cpuid, unsigned flags, const char *name);
  564. /**
  565. Print a description of the topology on \p f.
  566. */
  567. void starpu_topology_print(FILE *f);
  568. /**
  569. Return 1 if asynchronous data transfers between CPU and
  570. accelerators are disabled.
  571. */
  572. int starpu_asynchronous_copy_disabled(void);
  573. /**
  574. Return 1 if asynchronous data transfers between CPU and CUDA
  575. accelerators are disabled.
  576. */
  577. int starpu_asynchronous_cuda_copy_disabled(void);
  578. /**
  579. Return 1 if asynchronous data transfers between CPU and OpenCL
  580. accelerators are disabled.
  581. */
  582. int starpu_asynchronous_opencl_copy_disabled(void);
  583. /**
  584. Return 1 if asynchronous data transfers between CPU and FPGA
  585. devices are disabled.
  586. */
  587. int starpu_asynchronous_fpga_copy_disabled(void);
  588. /**
  589. Return 1 if asynchronous data transfers between CPU and MIC devices
  590. are disabled.
  591. */
  592. int starpu_asynchronous_mic_copy_disabled(void);
  593. /**
  594. Return 1 if asynchronous data transfers between CPU and MPI Slave
  595. devices are disabled.
  596. */
  597. int starpu_asynchronous_mpi_ms_copy_disabled(void);
  598. void starpu_display_stats(void);
  599. void starpu_get_version(int *major, int *minor, int *release);
  600. /** @} */
  601. #ifdef __cplusplus
  602. }
  603. #endif
  604. #include "starpu_deprecated_api.h"
  605. #endif /* __STARPU_H__ */