Sfoglia il codice sorgente

Avoid confusing ld(blocksize) with ld

Samuel Thibault 3 anni fa
parent
commit
8d52b38b3a
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 2 2
      include/starpu_data_filters.h
  2. 3 3
      src/datawizard/filters.c

+ 2 - 2
include/starpu_data_filters.h

@@ -531,12 +531,12 @@ void starpu_block_filter_depth_block_shadow(void *father_interface, void *child_
    Given an integer \p n, \p n the number of parts it must be divided in, \p id the
    part currently considered, determines the \p chunk_size and the \p offset, taking
    into account the size of the elements stored in the data structure \p elemsize
-   and \p ld, the leading dimension, which is most often 1.
+   and \p blocksize, which is most often 1.
  */
 void
 starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts,
 					     size_t elemsize, unsigned id,
-					     unsigned ld, unsigned *chunk_size,
+					     unsigned blocksize, unsigned *chunk_size,
 					     size_t *offset);
 
 /** @} */

+ 3 - 3
src/datawizard/filters.c

@@ -1043,7 +1043,7 @@ void _starpu_data_partition_access_submit(starpu_data_handle_t target, int write
 void
 starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts,
 					     size_t elemsize, unsigned id,
-					     unsigned ld, unsigned *chunk_size,
+					     unsigned blocksize, unsigned *chunk_size,
 					     size_t *offset)
 {
 	*chunk_size = n/nparts;
@@ -1061,8 +1061,8 @@ starpu_filter_nparts_compute_chunk_size_and_offset(unsigned n, unsigned nparts,
 	 * 	if (i < n%nparts)
 	 *		total++;
 	 * }
-	 * offset = total * elemsize * ld;
+	 * offset = total * elemsize * blocksize;
 	 */
 	if (offset != NULL)
-		*offset = (id *(n/nparts) + STARPU_MIN(remainder, id)) * ld * elemsize;
+		*offset = (id *(n/nparts) + STARPU_MIN(remainder, id)) * blocksize * elemsize;
 }