starpu_data_filters.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. * Copyright (C) 2010 Mehdi Juhoor
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __STARPU_DATA_FILTERS_H__
  18. #define __STARPU_DATA_FILTERS_H__
  19. #include <starpu.h>
  20. #include <stdarg.h>
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. /**
  26. @defgroup API_Data_Partition Data Partition
  27. @{
  28. */
  29. struct starpu_data_interface_ops;
  30. /**
  31. Describe a data partitioning operation, to be given to starpu_data_partition()
  32. */
  33. struct starpu_data_filter
  34. {
  35. /**
  36. Fill the \p child_interface structure with interface information
  37. for the \p i -th child of the parent \p father_interface (among
  38. \p nparts). The \p filter structure is provided, allowing to inspect the
  39. starpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr
  40. parameters.
  41. The details of what needs to be filled in \p child_interface vary according
  42. to the data interface, but generally speaking:
  43. <ul>
  44. <li> <c>id</c> is usually just copied over from the father,
  45. when the sub data has the same structure as the father,
  46. e.g. a subvector is a vector, a submatrix is a matrix, etc.
  47. This is however not the case for instance when dividing a
  48. BCSR matrix into its dense blocks, which then are matrices.
  49. </li>
  50. <li> <c>nx</c>, <c>ny</c> and alike are usually divided by
  51. the number of subdata, depending how the subdivision is
  52. done (e.g. nx division vs ny division for vertical matrix
  53. division vs horizontal matrix division). </li>
  54. <li> <c>ld</c> for matrix interfaces are usually just
  55. copied over: the leading dimension (ld) usually does not
  56. change. </li>
  57. <li> <c>elemsize</c> is usually just copied over. </li>
  58. <li> <c>ptr</c>, the pointer to the data, has to be
  59. computed according to \p i and the father's <c>ptr</c>, so
  60. as to point to the start of the sub data. This should
  61. however be done only if the father has <c>ptr</c> different
  62. from NULL: in the OpenCL case notably, the
  63. <c>dev_handle</c> and <c>offset</c> fields are used
  64. instead. </li>
  65. <li> <c>dev_handle</c> should be just copied over from the
  66. parent. </li>
  67. <li> <c>offset</c> has to be computed according to \p i and
  68. the father's <c>offset</c>, so as to provide the offset of
  69. the start of the sub data. This is notably used for the
  70. OpenCL case.
  71. </ul>
  72. */
  73. void (*filter_func)(void *father_interface, void *child_interface, struct starpu_data_filter *, unsigned id, unsigned nparts);
  74. unsigned nchildren; /**< Number of parts to partition the data into. */
  75. /**
  76. Return the number of children. This can be used instead of
  77. starpu_data_filter::nchildren when the number of children depends
  78. on the actual data (e.g. the number of blocks in a sparse
  79. matrix).
  80. */
  81. unsigned (*get_nchildren)(struct starpu_data_filter *, starpu_data_handle_t initial_handle);
  82. /**
  83. When children use different data interface,
  84. return which interface is used by child number \p id.
  85. */
  86. struct starpu_data_interface_ops *(*get_child_ops)(struct starpu_data_filter *, unsigned id);
  87. unsigned filter_arg; /**< Additional parameter for the filter function */
  88. /**
  89. Additional pointer parameter for
  90. the filter function, such as the
  91. sizes of the different parts. */
  92. void *filter_arg_ptr;
  93. };
  94. /**
  95. @name Basic API
  96. @{
  97. */
  98. /**
  99. Request the partitioning of \p initial_handle into several subdata
  100. according to the filter \p f.
  101. Here an example of how to use the function.
  102. \code{.c}
  103. struct starpu_data_filter f =
  104. {
  105. .filter_func = starpu_matrix_filter_block,
  106. .nchildren = nslicesx
  107. };
  108. starpu_data_partition(A_handle, &f);
  109. \endcode
  110. */
  111. void starpu_data_partition(starpu_data_handle_t initial_handle, struct starpu_data_filter *f);
  112. /**
  113. Unapply the filter which has been applied to \p root_data, thus
  114. unpartitioning the data. The pieces of data are collected back into
  115. one big piece in the \p gathering_node (usually ::STARPU_MAIN_RAM).
  116. Tasks working on the partitioned data will be waited for
  117. by starpu_data_unpartition().
  118. Here an example of how to use the function.
  119. \code{.c}
  120. starpu_data_unpartition(A_handle, STARPU_MAIN_RAM);
  121. \endcode
  122. */
  123. void starpu_data_unpartition(starpu_data_handle_t root_data, unsigned gathering_node);
  124. /**
  125. Return the \p i -th child of the given \p handle, which must have
  126. been partitionned beforehand.
  127. */
  128. starpu_data_handle_t starpu_data_get_child(starpu_data_handle_t handle, unsigned i);
  129. /**
  130. Return the number of children \p handle has been partitioned into.
  131. */
  132. int starpu_data_get_nb_children(starpu_data_handle_t handle);
  133. /**
  134. After partitioning a StarPU data by applying a filter,
  135. starpu_data_get_sub_data() can be used to get handles for each of the
  136. data portions. \p root_data is the parent data that was partitioned.
  137. \p depth is the number of filters to traverse (in case several filters
  138. have been applied, to e.g. partition in row blocks, and then in column
  139. blocks), and the subsequent parameters are the indexes. The function
  140. returns a handle to the subdata.
  141. Here an example of how to use the function.
  142. \code{.c}
  143. h = starpu_data_get_sub_data(A_handle, 1, taskx);
  144. \endcode
  145. */
  146. starpu_data_handle_t starpu_data_get_sub_data(starpu_data_handle_t root_data, unsigned depth, ... );
  147. /**
  148. Similar to starpu_data_get_sub_data() but use a \c va_list for the
  149. parameter list.
  150. */
  151. starpu_data_handle_t starpu_data_vget_sub_data(starpu_data_handle_t root_data, unsigned depth, va_list pa);
  152. /**
  153. Apply \p nfilters filters to the handle designated by \p
  154. root_handle recursively. \p nfilters pointers to variables of the
  155. type starpu_data_filter should be given.
  156. */
  157. void starpu_data_map_filters(starpu_data_handle_t root_data, unsigned nfilters, ...);
  158. /**
  159. Apply \p nfilters filters to the handle designated by
  160. \p root_handle recursively. Use a \p va_list of pointers to
  161. variables of the type starpu_data_filter.
  162. */
  163. void starpu_data_vmap_filters(starpu_data_handle_t root_data, unsigned nfilters, va_list pa);
  164. /** @} */
  165. /**
  166. @name Asynchronous API
  167. @{
  168. */
  169. /**
  170. Plan to partition \p initial_handle into several subdata according to
  171. the filter \p f.
  172. The handles are returned into the \p children array, which has to be
  173. the same size as the number of parts described in \p f. These handles
  174. are not immediately usable, starpu_data_partition_submit() has to be
  175. called to submit the actual partitioning.
  176. Here is an example of how to use the function:
  177. \code{.c}
  178. starpu_data_handle_t children[nslicesx];
  179. struct starpu_data_filter f =
  180. {
  181. .filter_func = starpu_matrix_filter_block,
  182. .nchildren = nslicesx
  183. };
  184. starpu_data_partition_plan(A_handle, &f, children);
  185. \endcode
  186. */
  187. void starpu_data_partition_plan(starpu_data_handle_t initial_handle, struct starpu_data_filter *f, starpu_data_handle_t *children);
  188. /**
  189. Submit the actual partitioning of \p initial_handle into the \p nparts
  190. \p children handles. This call is asynchronous, it only submits that the
  191. partitioning should be done, so that the \p children handles can now be used to
  192. submit tasks, and \p initial_handle can not be used to submit tasks any more (to
  193. guarantee coherency).
  194. For instance,
  195. \code{.c}
  196. starpu_data_partition_submit(A_handle, nslicesx, children);
  197. \endcode
  198. */
  199. void starpu_data_partition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
  200. /**
  201. Similar to starpu_data_partition_submit(), but do not invalidate \p
  202. initial_handle. This allows to continue using it, but the application has to be
  203. careful not to write to \p initial_handle or \p children handles, only read from
  204. them, since the coherency is otherwise not guaranteed. This thus allows to
  205. submit various tasks which concurrently read from various partitions of the data.
  206. When the application wants to write to \p initial_handle again, it should call
  207. starpu_data_unpartition_submit(), which will properly add dependencies between the
  208. reads on the \p children and the writes to be submitted.
  209. If instead the application wants to write to \p children handles, it should
  210. call starpu_data_partition_readwrite_upgrade_submit(), which will correctly add
  211. dependencies between the reads on the \p initial_handle and the writes to be
  212. submitted.
  213. */
  214. void starpu_data_partition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
  215. /**
  216. Assume that a partitioning of \p initial_handle has already been submited
  217. in readonly mode through starpu_data_partition_readonly_submit(), and will upgrade
  218. that partitioning into read-write mode for the \p children, by invalidating \p
  219. initial_handle, and adding the necessary dependencies.
  220. */
  221. void starpu_data_partition_readwrite_upgrade_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children);
  222. /**
  223. Assuming that \p initial_handle is partitioned into \p children,
  224. submit an unpartitionning of \p initial_handle, i.e. submit a
  225. gathering of the pieces on the requested \p gathering_node memory
  226. node, and submit an invalidation of the children.
  227. */
  228. void starpu_data_unpartition_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node);
  229. void starpu_data_unpartition_submit_r(starpu_data_handle_t initial_handle, int gathering_node);
  230. /**
  231. Similar to starpu_data_partition_submit(), but do not invalidate \p
  232. initial_handle. This allows to continue using it, but the application has to be
  233. careful not to write to \p initial_handle or \p children handles, only read from
  234. them, since the coherency is otherwise not guaranteed. This thus allows to
  235. submit various tasks which concurrently read from various
  236. partitions of the data.
  237. */
  238. void starpu_data_unpartition_readonly_submit(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node);
  239. /**
  240. Clear the partition planning established between \p root_data and
  241. \p children with starpu_data_partition_plan(). This will notably
  242. submit an unregister all the \p children, which can thus not be
  243. used any more afterwards.
  244. */
  245. void starpu_data_partition_clean(starpu_data_handle_t root_data, unsigned nparts, starpu_data_handle_t *children);
  246. /**
  247. Similar to starpu_data_unpartition_submit_sequential_consistency()
  248. but allow to specify a callback function for the unpartitiong task
  249. */
  250. void starpu_data_unpartition_submit_sequential_consistency_cb(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gather_node, int sequential_consistency, void (*callback_func)(void *), void *callback_arg);
  251. /**
  252. Similar to starpu_data_partition_submit() but also allow to specify
  253. the coherency to be used for the main data \p initial_handle
  254. through the parameter \p sequential_consistency.
  255. */
  256. void starpu_data_partition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int sequential_consistency);
  257. /**
  258. Similar to starpu_data_unpartition_submit() but also allow to specify
  259. the coherency to be used for the main data \p initial_handle
  260. through the parameter \p sequential_consistency.
  261. */
  262. void starpu_data_unpartition_submit_sequential_consistency(starpu_data_handle_t initial_handle, unsigned nparts, starpu_data_handle_t *children, int gathering_node, int sequential_consistency);
  263. /**
  264. Disable the automatic partitioning of the data \p handle for which
  265. a asynchronous plan has previously been submitted
  266. */
  267. void starpu_data_partition_not_automatic(starpu_data_handle_t handle);
  268. /** @} */
  269. /**
  270. @name Predefined BCSR Filter Functions
  271. Predefined partitioning functions for BCSR data. Examples on how to
  272. use them are shown in \ref PartitioningData.
  273. @{
  274. */
  275. /**
  276. Partition a block-sparse matrix into dense matrices.
  277. starpu_data_filter::get_child_ops needs to be set to
  278. starpu_bcsr_filter_canonical_block_child_ops()
  279. and starpu_data_filter::get_nchildren set to
  280. starpu_bcsr_filter_canonical_block_get_nchildren().
  281. */
  282. void starpu_bcsr_filter_canonical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  283. /**
  284. Return the number of children obtained with starpu_bcsr_filter_canonical_block().
  285. */
  286. unsigned starpu_bcsr_filter_canonical_block_get_nchildren(struct starpu_data_filter *f, starpu_data_handle_t handle)
  287. ;
  288. /**
  289. Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().
  290. */
  291. struct starpu_data_interface_ops *starpu_bcsr_filter_canonical_block_child_ops(struct starpu_data_filter *f, unsigned child);
  292. /**
  293. Partition a block-sparse matrix into block-sparse matrices.
  294. The split is done along the leading dimension, i.e. along adjacent nnz blocks.
  295. */
  296. void starpu_bcsr_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  297. /** @} */
  298. /**
  299. @name Predefined CSR Filter Functions
  300. Predefined partitioning functions for CSR data. Examples on how to
  301. use them are shown in \ref PartitioningData.
  302. @{
  303. */
  304. /**
  305. Partition a block-sparse matrix into vertical block-sparse matrices.
  306. */
  307. void starpu_csr_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  308. /** @} */
  309. /**
  310. @name Predefined Matrix Filter Functions
  311. Predefined partitioning functions for matrix
  312. data. Examples on how to use them are shown in \ref
  313. PartitioningData.
  314. Note: this is using the C element order which is row-major, i.e. elements
  315. with consecutive x coordinates are consecutive in memory.
  316. @{
  317. */
  318. /**
  319. Partition a dense Matrix along the x dimension, thus getting (x/\p
  320. nparts ,y) matrices. If \p nparts does not divide x, the last
  321. submatrix contains the remainder.
  322. */
  323. void starpu_matrix_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  324. /**
  325. Partition a dense Matrix along the x dimension, with a
  326. shadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\p
  327. nparts +2*shadow,y) matrices. If \p nparts does not divide x-2*shadow,
  328. the last submatrix contains the remainder.
  329. <b>IMPORTANT</b>: This can
  330. only be used for read-only access, as no coherency is enforced for the
  331. shadowed parts. A usage example is available in
  332. examples/filters/shadow2d.c
  333. */
  334. void starpu_matrix_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  335. /**
  336. Partition a dense Matrix along the y dimension, thus getting
  337. (x,y/\p nparts) matrices. If \p nparts does not divide y, the last
  338. submatrix contains the remainder.
  339. */
  340. void starpu_matrix_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  341. /**
  342. Partition a dense Matrix along the y dimension, with a
  343. shadow border <c>filter_arg_ptr</c>, thus getting
  344. (x,(y-2*shadow)/\p nparts +2*shadow) matrices. If \p nparts does not
  345. divide y-2*shadow, the last submatrix contains the remainder.
  346. <b>IMPORTANT</b>: This can only be used for read-only access, as no
  347. coherency is enforced for the shadowed parts. A usage example is
  348. available in examples/filters/shadow2d.c
  349. */
  350. void starpu_matrix_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  351. /** @} */
  352. /**
  353. @name Predefined Vector Filter Functions
  354. Predefined partitioning functions for vector
  355. data. Examples on how to use them are shown in \ref
  356. PartitioningData.
  357. @{
  358. */
  359. /**
  360. Return in \p child_interface the \p id th element of the vector
  361. represented by \p father_interface once partitioned in \p nparts chunks of
  362. equal size.
  363. */
  364. void starpu_vector_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  365. /**
  366. Return in \p child_interface the \p id th element of the vector
  367. represented by \p father_interface once partitioned in \p nparts chunks of
  368. equal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector
  369. of size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field
  370. of \p f must be the shadow size casted into \c void*.
  371. <b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is
  372. enforced for the shadowed parts. An usage example is available in
  373. examples/filters/shadow.c
  374. */
  375. void starpu_vector_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  376. /**
  377. Return in \p child_interface the \p id th element of the vector
  378. represented by \p father_interface once partitioned into \p nparts chunks
  379. according to the <c>filter_arg_ptr</c> field of \p f. The
  380. <c>filter_arg_ptr</c> field must point to an array of \p nparts long
  381. elements, each of which specifies the number of elements in each chunk
  382. of the partition.
  383. */
  384. void starpu_vector_filter_list_long(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  385. /**
  386. Return in \p child_interface the \p id th element of the vector
  387. represented by \p father_interface once partitioned into \p nparts chunks
  388. according to the <c>filter_arg_ptr</c> field of \p f. The
  389. <c>filter_arg_ptr</c> field must point to an array of \p nparts uint32_t
  390. elements, each of which specifies the number of elements in each chunk
  391. of the partition.
  392. */
  393. void starpu_vector_filter_list(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  394. /**
  395. Return in \p child_interface the \p id th element of the vector
  396. represented by \p father_interface once partitioned in <c>2</c> chunks of
  397. equal size, ignoring nparts. Thus, \p id must be <c>0</c> or <c>1</c>.
  398. */
  399. void starpu_vector_filter_divide_in_2(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  400. /** @} */
  401. /**
  402. @name Predefined Block Filter Functions
  403. Predefined partitioning functions for block data. Examples on how
  404. to use them are shown in \ref PartitioningData. An example is
  405. available in \c examples/filters/shadow3d.c
  406. Note: this is using the C element order which is row-major, i.e. elements
  407. with consecutive x coordinates are consecutive in memory.
  408. @{
  409. */
  410. /**
  411. Partition a block along the X dimension, thus getting
  412. (x/\p nparts ,y,z) 3D matrices. If \p nparts does not divide x, the last
  413. submatrix contains the remainder.
  414. */
  415. void starpu_block_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  416. /**
  417. Partition a block along the X dimension, with a
  418. shadow border <c>filter_arg_ptr</c>, thus getting
  419. ((x-2*shadow)/\p nparts +2*shadow,y,z) blocks. If \p nparts does not
  420. divide x, the last submatrix contains the remainder.
  421. <b>IMPORTANT</b>:
  422. This can only be used for read-only access, as no coherency is
  423. enforced for the shadowed parts.
  424. */
  425. void starpu_block_filter_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  426. /**
  427. Partition a block along the Y dimension, thus getting
  428. (x,y/\p nparts ,z) blocks. If \p nparts does not divide y, the last
  429. submatrix contains the remainder.
  430. */
  431. void starpu_block_filter_vertical_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  432. /**
  433. Partition a block along the Y dimension, with a
  434. shadow border <c>filter_arg_ptr</c>, thus getting
  435. (x,(y-2*shadow)/\p nparts +2*shadow,z) 3D matrices. If \p nparts does not
  436. divide y, the last submatrix contains the remainder.
  437. <b>IMPORTANT</b>:
  438. This can only be used for read-only access, as no coherency is
  439. enforced for the shadowed parts.
  440. */
  441. void starpu_block_filter_vertical_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  442. /**
  443. Partition a block along the Z dimension, thus getting
  444. (x,y,z/\p nparts) blocks. If \p nparts does not divide z, the last
  445. submatrix contains the remainder.
  446. */
  447. void starpu_block_filter_depth_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  448. /**
  449. Partition a block along the Z dimension, with a
  450. shadow border <c>filter_arg_ptr</c>, thus getting
  451. (x,y,(z-2*shadow)/\p nparts +2*shadow) blocks. If \p nparts does not
  452. divide z, the last submatrix contains the remainder.
  453. <b>IMPORTANT</b>:
  454. This can only be used for read-only access, as no coherency is
  455. enforced for the shadowed parts.
  456. */
  457. void starpu_block_filter_depth_block_shadow(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts);
  458. /**
  459. Given an integer \p n, \p n the number of parts it must be divided in, \p id the
  460. part currently considered, determines the \p chunk_size and the \p offset, taking
  461. into account the size of the elements stored in the data structure \p elemsize
  462. and \p ld, the leading dimension, which is most often 1.
  463. */
  464. void
  465. starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts,
  466. size_t elemsize, unsigned id,
  467. unsigned ld, unsigned *chunk_size,
  468. size_t *offset);
  469. /** @} */
  470. /** @} */
  471. #ifdef __cplusplus
  472. }
  473. #endif
  474. #endif