data_interfaces.doxy 42 KB

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