data_interfaces.doxy 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_Data_Interfaces Data Interfaces
  9. \struct starpu_data_interface_ops
  10. Per-interface data transfer methods.
  11. \ingroup API_Data_Interfaces
  12. \var starpu_data_interface_ops::register_data_handle
  13. Register an existing interface into a data handle.
  14. \var starpu_data_interface_ops::allocate_data_on_node
  15. Allocate data for the interface on a given node.
  16. \var starpu_data_interface_ops::free_data_on_node
  17. Free data of the interface on a given node.
  18. \var starpu_data_interface_ops::copy_methods
  19. ram/cuda/opencl synchronous and asynchronous transfer methods.
  20. \var starpu_data_interface_ops::handle_to_pointer
  21. Return the current pointer (if any) for the handle on the given node.
  22. \var starpu_data_interface_ops::get_size
  23. Return an estimation of the size of data, for performance models.
  24. \var starpu_data_interface_ops::footprint
  25. Return a 32bit footprint which characterizes the data size.
  26. \var starpu_data_interface_ops::compare
  27. Compare the data size of two interfaces.
  28. \var starpu_data_interface_ops::display
  29. Dump the sizes of a handle to a file.
  30. \var starpu_data_interface_ops::interfaceid
  31. An identifier that is unique to each interface.
  32. \var starpu_data_interface_ops::interface_size
  33. The size of the interface data descriptor.
  34. \var starpu_data_interface_ops::is_multiformat
  35. todo
  36. \var starpu_data_interface_ops::get_mf_ops
  37. todo
  38. \var starpu_data_interface_ops::pack_data
  39. Pack the data handle into a contiguous buffer at the address ptr and
  40. set the size of the newly created buffer in count. If ptr is NULL, the
  41. function should not copy the data in the buffer but just set count to
  42. the size of the buffer which would have been allocated. The special
  43. value -1 indicates the size is yet unknown.
  44. \var starpu_data_interface_ops::unpack_data
  45. Unpack the data handle from the contiguous buffer at the address ptr
  46. of size count
  47. \struct starpu_data_copy_methods
  48. Defines the per-interface methods. If the any_to_any method is
  49. provided, it will be used by default if no more specific method is
  50. provided. It can still be useful to provide more specific method in
  51. case of e.g. available particular CUDA or OpenCL support.
  52. \ingroup API_Data_Interfaces
  53. \var starpu_data_copy_methods::ram_to_ram
  54. Define how to copy data from the \p src_interface interface on the \p
  55. src_node CPU node to the \p dst_interface interface on the \p dst_node
  56. CPU node. Return 0 on success.
  57. \var starpu_data_copy_methods::ram_to_cuda
  58. Define how to copy data from the \p src_interface interface on the
  59. \p src_node CPU node to the \p dst_interface interface on the \p dst_node CUDA
  60. node. Return 0 on success.
  61. \var starpu_data_copy_methods::ram_to_opencl
  62. Define how to copy data from the \p src_interface interface on the
  63. \p src_node CPU node to the \p dst_interface interface on the \p dst_node
  64. OpenCL node. Return 0 on success.
  65. \var starpu_data_copy_methods::ram_to_mic
  66. Define how to copy data from the \p src_interface interface on the
  67. \p src_node CPU node to the \p dst_interface interface on the \p dst_node MIC
  68. node. Return 0 on success.
  69. \var starpu_data_copy_methods::cuda_to_ram
  70. Define how to copy data from the \p src_interface interface on the
  71. \p src_node CUDA node to the \p dst_interface interface on the \p dst_node
  72. CPU node. Return 0 on success.
  73. \var starpu_data_copy_methods::cuda_to_cuda
  74. Define how to copy data from the \p src_interface interface on the
  75. \p src_node CUDA node to the \p dst_interface interface on the \p dst_node CUDA
  76. node. Return 0 on success.
  77. \var starpu_data_copy_methods::cuda_to_opencl
  78. Define how to copy data from the \p src_interface interface on the
  79. \p src_node CUDA node to the \p dst_interface interface on the \p dst_node
  80. OpenCL node. Return 0 on success.
  81. \var starpu_data_copy_methods::opencl_to_ram
  82. Define how to copy data from the \p src_interface interface on the
  83. \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node
  84. CPU node. Return 0 on success.
  85. \var starpu_data_copy_methods::opencl_to_cuda
  86. Define how to copy data from the \p src_interface interface on the
  87. \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node
  88. CUDA node. Return 0 on success.
  89. \var starpu_data_copy_methods::opencl_to_opencl
  90. Define how to copy data from the \p src_interface interface on the
  91. \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node
  92. OpenCL node. Return 0 on success.
  93. \var starpu_data_copy_methods::mic_to_ram
  94. Define how to copy data from the \p src_interface interface on the
  95. \p src_node MIC node to the \p dst_interface interface on the \p dst_node CPU
  96. node. Return 0 on success.
  97. \var starpu_data_copy_methods::scc_src_to_sink
  98. Define how to copy data from the \p src_interface interface on the
  99. \p src_node node to the \p dst_interface interface on the \p dst_node node.
  100. Must return 0 if the transfer was actually completed completely
  101. synchronously, or -EAGAIN if at least some transfers are still ongoing
  102. and should be awaited for by the core.
  103. \var starpu_data_copy_methods::scc_sink_to_src
  104. Define how to copy data from the \p src_interface interface on the
  105. \p src_node node to the \p dst_interface interface on the \p dst_node node.
  106. Must return 0 if the transfer was actually completed completely
  107. synchronously, or -EAGAIN if at least some transfers are still ongoing
  108. and should be awaited for by the core.
  109. \var starpu_data_copy_methods::scc_sink_to_sink
  110. Define how to copy data from the \p src_interface interface on the
  111. \p src_node node to the \p dst_interface interface on the \p dst_node node.
  112. Must return 0 if the transfer was actually completed completely
  113. synchronously, or -EAGAIN if at least some transfers are still ongoing
  114. and should be awaited for by the core.
  115. \var starpu_data_copy_methods::ram_to_cuda_async
  116. Define how to copy data from the \p src_interface interface on the
  117. \p src_node CPU node to the \p dst_interface interface on the \p dst_node CUDA
  118. node, using the given stream. Must return 0 if the transfer was
  119. actually completed completely synchronously, or -EAGAIN if at least
  120. some transfers are still ongoing and should be awaited for by the core.
  121. \var starpu_data_copy_methods::cuda_to_ram_async
  122. Define how to copy data from the \p src_interface interface on the
  123. \p src_node CUDA node to the \p dst_interface interface on the \p dst_node CPU
  124. node, using the given stream. Must return 0 if the transfer was
  125. actually completed completely synchronously, or -EAGAIN if at least
  126. some transfers are still ongoing and should be awaited for by the core.
  127. \var starpu_data_copy_methods::cuda_to_cuda_async
  128. Define how to copy data from the \p src_interface interface on the
  129. \p src_node CUDA node to the \p dst_interface interface on the \p dst_node CUDA
  130. node, using the given stream. Must return 0 if the transfer was
  131. actually completed completely synchronously, or -EAGAIN if at least
  132. some transfers are still ongoing and should be awaited for by the core.
  133. \var starpu_data_copy_methods::ram_to_opencl_async
  134. Define how to copy data from the \p src_interface interface on the
  135. \p src_node CPU node to the \p dst_interface interface on the \p dst_node
  136. OpenCL node, by recording in event, a pointer to a cl_event, the event
  137. of the last submitted transfer. Must return 0 if the transfer was
  138. actually completed completely synchronously, or -EAGAIN if at least
  139. some transfers are still ongoing and should be awaited for by the
  140. core.
  141. \var starpu_data_copy_methods::opencl_to_ram_async
  142. Define how to copy data from the \p src_interface interface on the
  143. \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node
  144. CPU node, by recording in event, a pointer to a cl_event, the event of
  145. the last submitted transfer. Must return 0 if the transfer was
  146. actually completed completely synchronously, or -EAGAIN if at least
  147. some transfers are still ongoing and should be awaited for by the
  148. core.
  149. \var starpu_data_copy_methods::opencl_to_opencl_async
  150. Define how to copy data from the \p src_interface interface on the
  151. \p src_node OpenCL node to the \p dst_interface interface on the \p dst_node
  152. OpenCL node, by recording in event, a pointer to a cl_event, the event
  153. of the last submitted transfer. Must return 0 if the transfer was
  154. actually completed completely synchronously, or -EAGAIN if at least
  155. some transfers are still ongoing and should be awaited for by the
  156. core.
  157. \var starpu_data_copy_methods::ram_to_mic_async
  158. Define how to copy data from the \p src_interface interface on the
  159. \p src_node CPU node to the \p dst_interface interface on the \p dst_node
  160. MIC node. Must return 0 if the transfer was actually completed
  161. completely synchronously, or -EAGAIN if at least some transfers are
  162. still ongoing and should be awaited for by the core.
  163. \var starpu_data_copy_methods::mic_to_ram_async
  164. Define how to copy data from the \p src_interface interface on the
  165. \p src_node MIC node to the \p dst_interface interface on the \p dst_node
  166. CPU node. Must return 0 if the transfer was actually completed
  167. completely synchronously, or -EAGAIN if at least some transfers are
  168. still ongoing and should be awaited for by the core.
  169. \var starpu_data_copy_methods::any_to_any
  170. Define how to copy data from the \p src_interface interface on the
  171. \p src_node node to the \p dst_interface interface on the \p dst_node node.
  172. This is meant to be implemented through the starpu_interface_copy()
  173. helper, to which async_data should be passed as such, and will be used
  174. to manage asynchronicity. This must return -EAGAIN if any of the
  175. starpu_interface_copy() calls has returned -EAGAIN (i.e. at least some
  176. transfer is still ongoing), and return 0 otherwise.
  177. \enum starpu_data_interface_id
  178. \ingroup API_Data_Interfaces
  179. Identifier for all predefined StarPU data interfaces
  180. \var starpu_data_interface_id::STARPU_UNKNOWN_INTERFACE_ID
  181. Unknown interface
  182. \var starpu_data_interface_id::STARPU_MATRIX_INTERFACE_ID
  183. Identifier for the matrix data interface
  184. \var starpu_data_interface_id::STARPU_BLOCK_INTERFACE_ID
  185. Identifier for block data interface
  186. \var starpu_data_interface_id::STARPU_VECTOR_INTERFACE_ID
  187. Identifier for the vector data interface
  188. \var starpu_data_interface_id::STARPU_CSR_INTERFACE_ID
  189. Identifier for the csr data interface
  190. \var starpu_data_interface_id::STARPU_BCSR_INTERFACE_ID
  191. Identifier for the bcsr data interface
  192. \var starpu_data_interface_id::STARPU_VARIABLE_INTERFACE_ID
  193. Identifier for the variable data interface
  194. \var starpu_data_interface_id::STARPU_VOID_INTERFACE_ID
  195. Identifier for the void data interface
  196. \var starpu_data_interface_id::STARPU_MULTIFORMAT_INTERFACE_ID
  197. Identifier for the multiformat data interface
  198. \var starpu_data_interface_id::STARPU_COO_INTERFACE_ID
  199. Identifier for the coo data interface
  200. \var starpu_data_interface_id::STARPU_MAX_INTERFACE_ID
  201. Maximum number of data interfaces
  202. @name Registering Data
  203. \ingroup API_Data_Interfaces
  204. There are several ways to register a memory region so that it can be
  205. managed by StarPU. The functions below allow the registration of
  206. vectors, 2D matrices, 3D matrices as well as BCSR and CSR sparse
  207. matrices.
  208. \fn void starpu_void_data_register(starpu_data_handle_t *handle)
  209. \ingroup API_Data_Interfaces
  210. Register a void interface. There is no data really associated
  211. to that interface, but it may be used as a synchronization mechanism.
  212. It also permits to express an abstract piece of data that is managed
  213. by the application internally: this makes it possible to forbid the
  214. concurrent execution of different tasks accessing the same <c>void</c> data
  215. in read-write concurrently.
  216. \fn void starpu_variable_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, size_t size)
  217. \ingroup API_Data_Interfaces
  218. Register the \p size byte element pointed to by \p ptr, which is
  219. typically a scalar, and initialize \p handle to represent this data item.
  220. Here an example of how to use the function.
  221. \code{.c}
  222. float var;
  223. starpu_data_handle_t var_handle;
  224. starpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));
  225. \endcode
  226. \fn void starpu_variable_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset)
  227. \ingroup API_Data_Interfaces
  228. Register into the \p handle that to store data on node \p node it should use the
  229. buffer located at \p ptr, or device handle \p dev_handle and offset \p offset
  230. (for OpenCL, notably)
  231. \fn void starpu_vector_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t nx, size_t elemsize)
  232. \ingroup API_Data_Interfaces
  233. Register the \p nx elemsize-byte elements pointed to by \p ptr and initialize \p handle to represent it.
  234. Here an example of how to use the function.
  235. \code{.c}
  236. float vector[NX];
  237. starpu_data_handle_t vector_handle;
  238. starpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));
  239. \endcode
  240. \fn void starpu_vector_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset)
  241. \ingroup API_Data_Interfaces
  242. Register into the \p handle that to store data on node \p node it should use the
  243. buffer located at \p ptr, or device handle \p dev_handle and offset \p offset
  244. (for OpenCL, notably)
  245. \fn void starpu_matrix_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize)
  246. \ingroup API_Data_Interfaces
  247. Register the \p nx x \p ny 2D matrix of \p elemsize-byte elements pointed
  248. by \p ptr and initialize \p handle to represent it. \p ld specifies the number
  249. of elements between rows. a value greater than \p nx adds padding, which
  250. can be useful for alignment purposes.
  251. Here an example of how to use the function.
  252. \code{.c}
  253. float *matrix;
  254. starpu_data_handle_t matrix_handle;
  255. matrix = (float*)malloc(width * height * sizeof(float));
  256. starpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));
  257. \endcode
  258. \fn void starpu_matrix_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ld)
  259. \ingroup API_Data_Interfaces
  260. Register into the \p handle that to store data on node \p node it should use the
  261. buffer located at \p ptr, or device handle \p dev_handle and offset \p offset
  262. (for OpenCL, notably), with \p ld elements between rows.
  263. \fn void starpu_block_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize)
  264. \ingroup API_Data_Interfaces
  265. Register the \p nx x \p ny x \p nz 3D matrix of \p elemsize byte elements
  266. pointed by \p ptr and initialize \p handle to represent it. Again, \p ldy and
  267. \p ldz specify the number of elements between rows and between z planes.
  268. Here an example of how to use the function.
  269. \code{.c}
  270. float *block;
  271. starpu_data_handle_t block_handle;
  272. block = (float*)malloc(nx*ny*nz*sizeof(float));
  273. starpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));
  274. \endcode
  275. \fn void starpu_block_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ldy, uint32_t ldz)
  276. \ingroup API_Data_Interfaces
  277. Register into the \p handle that to store data on node \p node it should use the
  278. buffer located at \p ptr, or device handle \p dev_handle and offset \p offset
  279. (for OpenCL, notably), with \p ldy elements between rows and \ldz elements between z planes.
  280. \fn void starpu_bcsr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, uint32_t r, uint32_t c, size_t elemsize)
  281. \ingroup API_Data_Interfaces
  282. This variant of starpu_data_register() uses the BCSR (Blocked
  283. Compressed Sparse Row Representation) sparse matrix interface.
  284. Register the sparse matrix made of \p nnz non-zero blocks of elements of
  285. size \p elemsize stored in \p nzval and initializes \p handle to represent it.
  286. Blocks have size \p r * \p c. \p nrow is the number of rows (in terms of
  287. blocks), \p colind[i] is the block-column index for block i in \p nzval,
  288. \p rowptr[i] is the block-index (in \p nzval) of the first block of row i.
  289. \p firstentry is the index of the first entry of the given arrays
  290. (usually 0 or 1).
  291. \fn void starpu_csr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize)
  292. \ingroup API_Data_Interfaces
  293. This variant of starpu_data_register() uses the CSR (Compressed
  294. Sparse Row Representation) sparse matrix interface. TODO
  295. \fn void starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize);
  296. \ingroup API_Data_Interfaces
  297. Register the \p nx x \p ny 2D matrix given in the COO format, using the
  298. \p columns, \p rows, \p values arrays, which must have \p n_values elements of
  299. size \p elemsize. Initialize \p handleptr.
  300. \fn void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node)
  301. \ingroup API_Data_Interfaces
  302. Return the interface associated with \p handle on \p memory_node.
  303. @name Accessing Data Interfaces
  304. \ingroup API_Data_Interfaces
  305. Each data interface is provided with a set of field access functions.
  306. The ones using a void * parameter aimed to be used in codelet
  307. implementations (see for example the code in \ref
  308. VectorScalingUsingStarPUAPI).
  309. \fn void *starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
  310. \ingroup API_Data_Interfaces
  311. Return the pointer associated with \p handle on node \p node or <c>NULL</c>
  312. if handle’s interface does not support this operation or data for this
  313. \p handle is not allocated on that \p node.
  314. \fn void *starpu_data_get_local_ptr(starpu_data_handle_t handle)
  315. \ingroup API_Data_Interfaces
  316. Return the local pointer associated with \p handle or <c>NULL</c> if
  317. \p handle’s interface does not have data allocated locally
  318. \fn enum starpu_data_interface_id starpu_data_get_interface_id(starpu_data_handle_t handle)
  319. \ingroup API_Data_Interfaces
  320. Return the unique identifier of the interface associated with
  321. the given \p handle.
  322. \fn size_t starpu_data_get_size(starpu_data_handle_t handle)
  323. \ingroup API_Data_Interfaces
  324. Return the size of the data associated with \p handle.
  325. \fn int starpu_data_pack(starpu_data_handle_t handle, void **ptr, starpu_ssize_t *count)
  326. \ingroup API_Data_Interfaces
  327. Execute the packing operation of the interface of the data
  328. registered at \p handle (see starpu_data_interface_ops). This
  329. packing operation must allocate a buffer large enough at \p ptr and copy
  330. into the newly allocated buffer the data associated to \p handle. \p count
  331. will be set to the size of the allocated buffer. If \p ptr is NULL, the
  332. function should not copy the data in the buffer but just set \p count to
  333. the size of the buffer which would have been allocated. The special
  334. value -1 indicates the size is yet unknown.
  335. \fn int starpu_data_unpack(starpu_data_handle_t handle, void *ptr, size_t count)
  336. \ingroup API_Data_Interfaces
  337. Unpack in handle the data located at \p ptr of size \p count as
  338. described by the interface of the data. The interface registered at
  339. \p handle must define a unpacking operation (see
  340. starpu_data_interface_ops). The memory at the address \p ptr is freed
  341. after calling the data unpacking operation.
  342. @name Accessing Variable Data Interfaces
  343. \ingroup API_Data_Interfaces
  344. \struct starpu_variable_interface
  345. Variable interface for a single data (not a vector, a matrix, a list, ...)
  346. \ingroup API_Data_Interfaces
  347. \var starpu_variable_interface::id
  348. Identifier of the interface
  349. \var starpu_variable_interface::ptr
  350. local pointer of the variable
  351. \var starpu_variable_interface::dev_handle
  352. device handle of the variable.
  353. \var starpu_variable_interface::offset
  354. offset in the variable
  355. \var starpu_variable_interface::elemsize
  356. size of the variable
  357. \fn size_t starpu_variable_get_elemsize(starpu_data_handle_t handle)
  358. \ingroup API_Data_Interfaces
  359. Return the size of the variable designated by \p handle.
  360. \fn uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle)
  361. \ingroup API_Data_Interfaces
  362. Return a pointer to the variable designated by \p handle.
  363. \def STARPU_VARIABLE_GET_PTR(interface)
  364. \ingroup API_Data_Interfaces
  365. Return a pointer to the variable designated by \p interface.
  366. \def STARPU_VARIABLE_GET_ELEMSIZE(interface)
  367. \ingroup API_Data_Interfaces
  368. Return the size of the variable designated by \p interface.
  369. \def STARPU_VARIABLE_GET_DEV_HANDLE(interface)
  370. \ingroup API_Data_Interfaces
  371. Return a device handle for the variable designated by
  372. \p interface, to be used on OpenCL. The offset documented below has to be
  373. used in addition to this.
  374. \def STARPU_VARIABLE_GET_OFFSET(interface)
  375. \ingroup API_Data_Interfaces
  376. Return the offset in the variable designated by \p interface, to
  377. be used with the device handle.
  378. @name Accessing Vector Data Interfaces
  379. \ingroup API_Data_Interfaces
  380. \struct starpu_vector_interface
  381. Vector interface
  382. \ingroup API_Data_Interfaces
  383. \var starpu_vector_interface::id
  384. Identifier of the interface
  385. \var starpu_vector_interface::ptr
  386. local pointer of the vector
  387. \var starpu_vector_interface::dev_handle
  388. device handle of the vector.
  389. \var starpu_vector_interface::offset
  390. offset in the vector
  391. \var starpu_vector_interface::nx
  392. number of elements on the x-axis of the vector
  393. \var starpu_vector_interface::elemsize
  394. size of the elements of the vector
  395. \fn uint32_t starpu_vector_get_nx(starpu_data_handle_t handle)
  396. \ingroup API_Data_Interfaces
  397. Return the number of elements registered into the array designated by \p handle.
  398. \fn size_t starpu_vector_get_elemsize(starpu_data_handle_t handle)
  399. \ingroup API_Data_Interfaces
  400. Return the size of each element of the array designated by \p handle.
  401. \fn uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle)
  402. \ingroup API_Data_Interfaces
  403. Return the local pointer associated with \p handle.
  404. \def STARPU_VECTOR_GET_PTR(interface)
  405. \ingroup API_Data_Interfaces
  406. Return a pointer to the array designated by \p interface, valid on
  407. CPUs and CUDA only. For OpenCL, the device handle and offset need to
  408. be used instead.
  409. \def STARPU_VECTOR_GET_DEV_HANDLE(interface)
  410. \ingroup API_Data_Interfaces
  411. Return a device handle for the array designated by \p interface,
  412. to be used on OpenCL. the offset documented below has to be used in
  413. addition to this.
  414. \def STARPU_VECTOR_GET_OFFSET(interface)
  415. \ingroup API_Data_Interfaces
  416. Return the offset in the array designated by \p interface, to be
  417. used with the device handle.
  418. \def STARPU_VECTOR_GET_NX(interface)
  419. \ingroup API_Data_Interfaces
  420. Return the number of elements registered into the array
  421. designated by \p interface.
  422. \def STARPU_VECTOR_GET_ELEMSIZE(interface)
  423. \ingroup API_Data_Interfaces
  424. Return the size of each element of the array designated by
  425. \p interface.
  426. @name Accessing Matrix Data Interfaces
  427. \ingroup API_Data_Interfaces
  428. \struct starpu_matrix_interface
  429. Matrix interface for dense matrices
  430. \ingroup API_Data_Interfaces
  431. \var starpu_matrix_interface::id
  432. Identifier of the interface
  433. \var starpu_matrix_interface::ptr
  434. local pointer of the matrix
  435. \var starpu_matrix_interface::dev_handle
  436. device handle of the matrix.
  437. \var starpu_matrix_interface::offset
  438. offset in the matrix
  439. \var starpu_matrix_interface::nx
  440. number of elements on the x-axis of the matrix
  441. \var starpu_matrix_interface::ny
  442. number of elements on the y-axis of the matrix
  443. \var starpu_matrix_interface::ld
  444. number of elements between each row of the matrix. Maybe be equal to
  445. starpu_matrix_interface::nx when there is no padding.
  446. \var starpu_matrix_interface::elemsize
  447. size of the elements of the matrix
  448. \fn uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle)
  449. \ingroup API_Data_Interfaces
  450. Return the number of elements on the x-axis of the matrix
  451. designated by \p handle.
  452. \fn uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle)
  453. \ingroup API_Data_Interfaces
  454. Return the number of elements on the y-axis of the matrix
  455. designated by \p handle.
  456. \fn uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle)
  457. \ingroup API_Data_Interfaces
  458. Return the number of elements between each row of the matrix
  459. designated by \p handle. Maybe be equal to nx when there is no padding.
  460. \fn uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle_t handle)
  461. \ingroup API_Data_Interfaces
  462. Return the local pointer associated with \p handle.
  463. \fn size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle)
  464. \ingroup API_Data_Interfaces
  465. Return the size of the elements registered into the matrix
  466. designated by \p handle.
  467. \def STARPU_MATRIX_GET_PTR(interface)
  468. \ingroup API_Data_Interfaces
  469. Return a pointer to the matrix designated by \p interface, valid
  470. on CPUs and CUDA devices only. For OpenCL devices, the device handle
  471. and offset need to be used instead.
  472. \def STARPU_MATRIX_GET_DEV_HANDLE(interface)
  473. \ingroup API_Data_Interfaces
  474. Return a device handle for the matrix designated by \p interface,
  475. to be used on OpenCL. The offset documented below has to be used in
  476. addition to this.
  477. \def STARPU_MATRIX_GET_OFFSET(interface)
  478. \ingroup API_Data_Interfaces
  479. Return the offset in the matrix designated by \p interface, to be
  480. used with the device handle.
  481. \def STARPU_MATRIX_GET_NX(interface)
  482. \ingroup API_Data_Interfaces
  483. Return the number of elements on the x-axis of the matrix
  484. designated by \p interface.
  485. \def STARPU_MATRIX_GET_NY(interface)
  486. \ingroup API_Data_Interfaces
  487. Return the number of elements on the y-axis of the matrix
  488. designated by \p interface.
  489. \def STARPU_MATRIX_GET_LD(interface)
  490. \ingroup API_Data_Interfaces
  491. Return the number of elements between each row of the matrix
  492. designated by \p interface. May be equal to nx when there is no padding.
  493. \def STARPU_MATRIX_GET_ELEMSIZE(interface)
  494. \ingroup API_Data_Interfaces
  495. Return the size of the elements registered into the matrix
  496. designated by \p interface.
  497. @name Accessing Block Data Interfaces
  498. \ingroup API_Data_Interfaces
  499. \struct starpu_block_interface
  500. Block interface for 3D dense blocks
  501. \ingroup API_Data_Interfaces
  502. \var starpu_block_interface::id
  503. identifier of the interface
  504. \var starpu_block_interface::ptr
  505. local pointer of the block
  506. \var starpu_block_interface::dev_handle
  507. device handle of the block.
  508. \var starpu_block_interface::offset
  509. offset in the block.
  510. \var starpu_block_interface::nx
  511. number of elements on the x-axis of the block.
  512. \var starpu_block_interface::ny
  513. number of elements on the y-axis of the block.
  514. \var starpu_block_interface::nz
  515. number of elements on the z-axis of the block.
  516. \var starpu_block_interface::ldy
  517. number of elements between two lines
  518. \var starpu_block_interface::ldz
  519. number of elements between two planes
  520. \var starpu_block_interface::elemsize
  521. size of the elements of the block.
  522. \fn uint32_t starpu_block_get_nx(starpu_data_handle_t handle)
  523. \ingroup API_Data_Interfaces
  524. Return the number of elements on the x-axis of the block
  525. designated by \p handle.
  526. \fn uint32_t starpu_block_get_ny(starpu_data_handle_t handle)
  527. \ingroup API_Data_Interfaces
  528. Return the number of elements on the y-axis of the block
  529. designated by \p handle.
  530. \fn uint32_t starpu_block_get_nz(starpu_data_handle_t handle)
  531. \ingroup API_Data_Interfaces
  532. Return the number of elements on the z-axis of the block
  533. designated by \p handle.
  534. \fn uint32_t starpu_block_get_local_ldy(starpu_data_handle_t handle)
  535. \ingroup API_Data_Interfaces
  536. Return the number of elements between each row of the block
  537. designated by \p handle, in the format of the current memory node.
  538. \fn uint32_t starpu_block_get_local_ldz(starpu_data_handle_t handle)
  539. \ingroup API_Data_Interfaces
  540. Return the number of elements between each z plane of the block
  541. designated by \p handle, in the format of the current memory node.
  542. \fn uintptr_t starpu_block_get_local_ptr(starpu_data_handle_t handle)
  543. \ingroup API_Data_Interfaces
  544. Return the local pointer associated with \p handle.
  545. \fn size_t starpu_block_get_elemsize(starpu_data_handle_t handle)
  546. \ingroup API_Data_Interfaces
  547. Return the size of the elements of the block designated by
  548. \p handle.
  549. \def STARPU_BLOCK_GET_PTR(interface)
  550. \ingroup API_Data_Interfaces
  551. Return a pointer to the block designated by \p interface.
  552. \def STARPU_BLOCK_GET_DEV_HANDLE(interface)
  553. \ingroup API_Data_Interfaces
  554. Return a device handle for the block designated by \p interface,
  555. to be used on OpenCL. The offset document below has to be used in
  556. addition to this.
  557. \def STARPU_BLOCK_GET_OFFSET(interface)
  558. \ingroup API_Data_Interfaces
  559. Return the offset in the block designated by \p interface, to be
  560. used with the device handle.
  561. \def STARPU_BLOCK_GET_NX(interface)
  562. \ingroup API_Data_Interfaces
  563. Return the number of elements on the x-axis of the block
  564. designated by \p interface.
  565. \def STARPU_BLOCK_GET_NY(interface)
  566. \ingroup API_Data_Interfaces
  567. Return the number of elements on the y-axis of the block
  568. designated by \p interface.
  569. \def STARPU_BLOCK_GET_NZ(interface)
  570. \ingroup API_Data_Interfaces
  571. Return the number of elements on the z-axis of the block
  572. designated by \p interface.
  573. \def STARPU_BLOCK_GET_LDY(interface)
  574. \ingroup API_Data_Interfaces
  575. Return the number of elements between each row of the block
  576. designated by \p interface. May be equal to nx when there is no padding.
  577. \def STARPU_BLOCK_GET_LDZ(interface)
  578. \ingroup API_Data_Interfaces
  579. Return the number of elements between each z plane of the block
  580. designated by \p interface. May be equal to nx*ny when there is no
  581. padding.
  582. \def STARPU_BLOCK_GET_ELEMSIZE(interface)
  583. \ingroup API_Data_Interfaces
  584. Return the size of the elements of the block designated by
  585. \p interface.
  586. @name Accessing BCSR Data Interfaces
  587. \ingroup API_Data_Interfaces
  588. \struct starpu_bcsr_interface
  589. BCSR interface for sparse matrices (blocked compressed sparse
  590. row representation)
  591. \ingroup API_Data_Interfaces
  592. \var starpu_bcsr_interface::id
  593. Identifier of the interface
  594. \var starpu_bcsr_interface::nnz
  595. number of non-zero BLOCKS
  596. \var starpu_bcsr_interface::nrow
  597. number of rows (in terms of BLOCKS)
  598. \var starpu_bcsr_interface::nzval
  599. non-zero values
  600. \var starpu_bcsr_interface::colind
  601. position of non-zero entried on the row
  602. \var starpu_bcsr_interface::rowptr
  603. index (in nzval) of the first entry of the row
  604. \var starpu_bcsr_interface::firstentry
  605. k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix.
  606. \var starpu_bcsr_interface::r
  607. size of the blocks
  608. \var starpu_bcsr_interface::c
  609. size of the blocks
  610. \var starpu_bcsr_interface::elemsize;
  611. size of the elements of the matrix
  612. \fn uint32_t starpu_bcsr_get_nnz(starpu_data_handle_t handle)
  613. \ingroup API_Data_Interfaces
  614. Return the number of non-zero elements in the matrix designated
  615. by \p handle.
  616. \fn uint32_t starpu_bcsr_get_nrow(starpu_data_handle_t handle)
  617. \ingroup API_Data_Interfaces
  618. Return the number of rows (in terms of blocks of size r*c) in
  619. the matrix designated by \p handle.
  620. \fn uint32_t starpu_bcsr_get_firstentry(starpu_data_handle_t handle)
  621. \ingroup API_Data_Interfaces
  622. Return the index at which all arrays (the column indexes, the
  623. row pointers...) of the matrix desginated by \p handle.
  624. \fn uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle_t handle)
  625. \ingroup API_Data_Interfaces
  626. Return a pointer to the non-zero values of the matrix
  627. designated by \p handle.
  628. \fn uint32_t *starpu_bcsr_get_local_colind(starpu_data_handle_t handle)
  629. \ingroup API_Data_Interfaces
  630. Return a pointer to the column index, which holds the positions
  631. of the non-zero entries in the matrix designated by \p handle.
  632. \fn uint32_t *starpu_bcsr_get_local_rowptr(starpu_data_handle_t handle)
  633. \ingroup API_Data_Interfaces
  634. Return the row pointer array of the matrix designated by
  635. \p handle.
  636. \fn uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle)
  637. \ingroup API_Data_Interfaces
  638. Return the number of rows in a block.
  639. \fn uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle)
  640. \ingroup API_Data_Interfaces
  641. Return the numberof columns in a block.
  642. \fn size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle)
  643. \ingroup API_Data_Interfaces
  644. Return the size of the elements in the matrix designated by
  645. \p handle.
  646. \def STARPU_BCSR_GET_NNZ(interface)
  647. \ingroup API_Data_Interfaces
  648. Return the number of non-zero values in the matrix designated
  649. by \p interface.
  650. \def STARPU_BCSR_GET_NZVAL(interface)
  651. \ingroup API_Data_Interfaces
  652. Return a pointer to the non-zero values of the matrix
  653. designated by \p interface.
  654. \def STARPU_BCSR_GET_NZVAL_DEV_HANDLE(interface)
  655. \ingroup API_Data_Interfaces
  656. Return a device handle for the array of non-zero values in the
  657. matrix designated by \p interface. The offset documented below has to be
  658. used in addition to this.
  659. \def STARPU_BCSR_GET_COLIND(interface)
  660. \ingroup API_Data_Interfaces
  661. Return a pointer to the column index of the matrix designated
  662. by \p interface.
  663. \def STARPU_BCSR_GET_COLIND_DEV_HANDLE(interface)
  664. \ingroup API_Data_Interfaces
  665. Return a device handle for the column index of the matrix
  666. designated by \p interface. The offset documented below has to be used in
  667. addition to this.
  668. \def STARPU_BCSR_GET_ROWPTR(interface)
  669. \ingroup API_Data_Interfaces
  670. Return a pointer to the row pointer array of the matrix
  671. designated by \p interface.
  672. \def STARPU_BCSR_GET_ROWPTR_DEV_HANDLE(interface)
  673. \ingroup API_Data_Interfaces
  674. Return a device handle for the row pointer array of the matrix
  675. designated by \p interface. The offset documented below has to be used in
  676. addition to this.
  677. \def STARPU_BCSR_GET_OFFSET
  678. \ingroup API_Data_Interfaces
  679. Return the offset in the arrays (coling, rowptr, nzval) of the
  680. matrix designated by \p interface, to be used with the device handles.
  681. @name Accessing CSR Data Interfaces
  682. \ingroup API_Data_Interfaces
  683. \struct starpu_csr_interface
  684. CSR interface for sparse matrices (compressed sparse row representation)
  685. \ingroup API_Data_Interfaces
  686. \var starpu_csr_interface::id
  687. Identifier of the interface
  688. \var starpu_csr_interface::nnz
  689. number of non-zero entries
  690. \var starpu_csr_interface::nrow
  691. number of rows
  692. \var starpu_csr_interface::nzval
  693. non-zero values
  694. \var starpu_csr_interface::colind
  695. position of non-zero entries on the row
  696. \var starpu_csr_interface::rowptr
  697. index (in nzval) of the first entry of the row
  698. \var starpu_csr_interface::firstentry
  699. k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix.
  700. \var starpu_csr_interface::elemsize
  701. size of the elements of the matrix
  702. \fn uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle)
  703. \ingroup API_Data_Interfaces
  704. Return the number of non-zero values in the matrix designated
  705. by \p handle.
  706. \fn uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle)
  707. \ingroup API_Data_Interfaces
  708. Return the size of the row pointer array of the matrix
  709. designated by \p handle.
  710. \fn uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle)
  711. \ingroup API_Data_Interfaces
  712. Return the index at which all arrays (the column indexes, the
  713. row pointers...) of the matrix designated by \p handle.
  714. \fn uintptr_t starpu_csr_get_local_nzval(starpu_data_handle_t handle)
  715. \ingroup API_Data_Interfaces
  716. Return a local pointer to the non-zero values of the matrix
  717. designated by \p handle.
  718. \fn uint32_t *starpu_csr_get_local_colind(starpu_data_handle_t handle)
  719. \ingroup API_Data_Interfaces
  720. Return a local pointer to the column index of the matrix
  721. designated by \p handle.
  722. \fn uint32_t *starpu_csr_get_local_rowptr(starpu_data_handle_t handle)
  723. \ingroup API_Data_Interfaces
  724. Return a local pointer to the row pointer array of the matrix
  725. designated by \p handle.
  726. \fn size_t starpu_csr_get_elemsize(starpu_data_handle_t handle)
  727. \ingroup API_Data_Interfaces
  728. Return the size of the elements registered into the matrix
  729. designated by \p handle.
  730. \def STARPU_CSR_GET_NNZ(interface)
  731. \ingroup API_Data_Interfaces
  732. Return the number of non-zero values in the matrix designated
  733. by \p interface.
  734. \def STARPU_CSR_GET_NROW(interface)
  735. \ingroup API_Data_Interfaces
  736. Return the size of the row pointer array of the matrix
  737. designated by \p interface.
  738. \def STARPU_CSR_GET_NZVAL(interface)
  739. \ingroup API_Data_Interfaces
  740. Return a pointer to the non-zero values of the matrix
  741. designated by \p interface.
  742. \def STARPU_CSR_GET_NZVAL_DEV_HANDLE(interface)
  743. \ingroup API_Data_Interfaces
  744. Return a device handle for the array of non-zero values in the
  745. matrix designated by \p interface. The offset documented below has to be
  746. used in addition to this.
  747. \def STARPU_CSR_GET_COLIND(interface)
  748. \ingroup API_Data_Interfaces
  749. Return a pointer to the column index of the matrix designated
  750. by \p interface.
  751. \def STARPU_CSR_GET_COLIND_DEV_HANDLE(interface)
  752. \ingroup API_Data_Interfaces
  753. Return a device handle for the column index of the matrix
  754. designated by \p interface. The offset documented below has to be used in
  755. addition to this.
  756. \def STARPU_CSR_GET_ROWPTR(interface)
  757. \ingroup API_Data_Interfaces
  758. Return a pointer to the row pointer array of the matrix
  759. designated by \p interface.
  760. \def STARPU_CSR_GET_ROWPTR_DEV_HANDLE(interface)
  761. \ingroup API_Data_Interfaces
  762. Return a device handle for the row pointer array of the matrix
  763. designated by \p interface. The offset documented below has to be used in
  764. addition to this.
  765. \def STARPU_CSR_GET_OFFSET
  766. \ingroup API_Data_Interfaces
  767. Return the offset in the arrays (colind, rowptr, nzval) of the
  768. matrix designated by \p interface, to be used with the device handles.
  769. \def STARPU_CSR_GET_FIRSTENTRY(interface)
  770. \ingroup API_Data_Interfaces
  771. Return the index at which all arrays (the column indexes, the
  772. row pointers...) of the \p interface start.
  773. \def STARPU_CSR_GET_ELEMSIZE(interface)
  774. \ingroup API_Data_Interfaces
  775. Return the size of the elements registered into the matrix
  776. designated by \p interface.
  777. @name Accessing COO Data Interfaces
  778. \ingroup API_Data_Interfaces
  779. \struct starpu_coo_interface
  780. COO Matrices
  781. \ingroup API_Data_Interfaces
  782. \var starpu_coo_interface::id
  783. identifier of the interface
  784. \var starpu_coo_interface::columns
  785. column array of the matrix
  786. \var starpu_coo_interface::rows
  787. row array of the matrix
  788. \var starpu_coo_interface::values
  789. values of the matrix
  790. \var starpu_coo_interface::nx
  791. number of elements on the x-axis of the matrix
  792. \var starpu_coo_interface::ny
  793. number of elements on the y-axis of the matrix
  794. \var starpu_coo_interface::n_values
  795. number of values registered in the matrix
  796. \var starpu_coo_interface::elemsize
  797. size of the elements of the matrix
  798. \def STARPU_COO_GET_COLUMNS(interface)
  799. \ingroup API_Data_Interfaces
  800. Return a pointer to the column array of the matrix designated
  801. by \p interface.
  802. \def STARPU_COO_GET_COLUMNS_DEV_HANDLE(interface)
  803. \ingroup API_Data_Interfaces
  804. Return a device handle for the column array of the matrix
  805. designated by \p interface, to be used on OpenCL. The offset documented
  806. below has to be used in addition to this.
  807. \def STARPU_COO_GET_ROWS(interface)
  808. \ingroup API_Data_Interfaces
  809. Return a pointer to the rows array of the matrix designated by
  810. \p interface.
  811. \def STARPU_COO_GET_ROWS_DEV_HANDLE(interface)
  812. \ingroup API_Data_Interfaces
  813. Return a device handle for the row array of the matrix
  814. designated by \p interface, to be used on OpenCL. The offset documented
  815. below has to be used in addition to this.
  816. \def STARPU_COO_GET_VALUES(interface)
  817. \ingroup API_Data_Interfaces
  818. Return a pointer to the values array of the matrix designated
  819. by \p interface.
  820. \def STARPU_COO_GET_VALUES_DEV_HANDLE(interface)
  821. \ingroup API_Data_Interfaces
  822. Return a device handle for the value array of the matrix
  823. designated by \p interface, to be used on OpenCL. The offset documented
  824. below has to be used in addition to this.
  825. \def STARPU_COO_GET_OFFSET
  826. \ingroup API_Data_Interfaces
  827. Return the offset in the arrays of the COO matrix designated by
  828. \p interface.
  829. \def STARPU_COO_GET_NX(interface)
  830. \ingroup API_Data_Interfaces
  831. Return the number of elements on the x-axis of the matrix
  832. designated by \p interface.
  833. \def STARPU_COO_GET_NY(interface)
  834. \ingroup API_Data_Interfaces
  835. Return the number of elements on the y-axis of the matrix
  836. designated by \p interface.
  837. \def STARPU_COO_GET_NVALUES(interface)
  838. \ingroup API_Data_Interfaces
  839. Return the number of values registered in the matrix designated
  840. by \p interface.
  841. \def STARPU_COO_GET_ELEMSIZE(interface)
  842. \ingroup API_Data_Interfaces
  843. Return the size of the elements registered into the matrix
  844. designated by \p interface.
  845. @name Defining Interface
  846. \ingroup API_Data_Interfaces
  847. Applications can provide their own interface as shown in \ref
  848. DefiningANewDataInterface.
  849. \fn uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size)
  850. \ingroup API_Data_Interfaces
  851. Allocate \p size bytes on node \p dst_node. This returns 0 if
  852. allocation failed, the allocation method should then return <c>-ENOMEM</c> as
  853. allocated size.
  854. \fn void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size)
  855. \ingroup API_Data_Interfaces
  856. Free \p addr of \p size bytes on node \p dst_node.
  857. \fn int starpu_interface_copy(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, void *async_data)
  858. \ingroup API_Data_Interfaces
  859. Copy \p size bytes from byte offset \p src_offset of \p src on \p src_node
  860. to byte offset \p dst_offset of \p dst on \p dst_node. This is to be used in
  861. the any_to_any() copy method, which is provided with the async_data to
  862. be passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the
  863. transfer is still ongoing, or 0 if the transfer is already completed.
  864. \fn uint32_t starpu_hash_crc32c_be_n(const void *input, size_t n, uint32_t inputcrc)
  865. \ingroup API_Data_Interfaces
  866. Compute the CRC of a byte buffer seeded by the \p inputcrc
  867. <em>current state</em>. The return value should be considered as the new
  868. <em>current state</em> for future CRC computation. This is used for computing
  869. data size footprint.
  870. \fn uint32_t starpu_hash_crc32c_be(uint32_t input, uint32_t inputcrc)
  871. \ingroup API_Data_Interfaces
  872. Compute the CRC of a 32bit number seeded by the \p inputcrc
  873. <em>current state</em>. The return value should be considered as the new
  874. <em>current state</em> for future CRC computation. This is used for computing
  875. data size footprint.
  876. \fn uint32_t starpu_hash_crc32c_string(const char *str, uint32_t inputcrc)
  877. \ingroup API_Data_Interfaces
  878. Compute the CRC of a string seeded by the \p inputcrc <em>current
  879. state</em>. The return value should be considered as the new <em>current
  880. state</em> for future CRC computation. This is used for computing data
  881. size footprint.
  882. \fn int starpu_data_interface_get_next_id(void)
  883. \ingroup API_Data_Interfaces
  884. Return the next available id for a newly created data interface
  885. (\ref DefiningANewDataInterface).
  886. */