Browse Source

Use starpu_data_invalidate_submit, not starpu_data_invalidate, to interlace computations with invalidations

Samuel Thibault 12 years ago
parent
commit
77fb61de8d
3 changed files with 6 additions and 5 deletions
  1. 1 1
      doc/chapters/advanced-examples.texi
  2. 4 3
      doc/chapters/basic-api.texi
  3. 1 1
      examples/cg/cg_kernels.c

+ 1 - 1
doc/chapters/advanced-examples.texi

@@ -676,7 +676,7 @@ ready to run.
 
 If another dot product has to be performed, one could unregister
 @code{dtq_handle}, and re-register it. But one can also use
-@code{starpu_invalidate(dtq_handle)}, which will clear all data from the handle,
+@code{starpu_data_invalidate_submit(dtq_handle)}, which will clear all data from the handle,
 thus resetting it back to the initial @code{register(NULL)} state.
 
 The @code{cg} example also uses reduction for the blocked gemv kernel, leading

+ 4 - 3
doc/chapters/basic-api.texi

@@ -493,9 +493,10 @@ task. No coherency is assumed.
 @end deftypefun
 
 @deftypefun void starpu_data_invalidate (starpu_data_handle_t @var{handle})
-Destroy all replicates of the data handle. After data invalidation, the first
-access to the handle must be performed in write-only mode. Accessing an
-invalidated data in read-mode results in undefined behaviour.
+Destroy all replicates of the data handle immediately. After data invalidation,
+the first access to the handle must be performed in write-only mode.
+Accessing an invalidated data in read-mode results in undefined
+behaviour.
 @end deftypefun
 
 @deftypefun void starpu_data_invalidate_submit (starpu_data_handle_t @var{handle})

+ 1 - 1
examples/cg/cg_kernels.c

@@ -287,7 +287,7 @@ int dot_kernel(starpu_data_handle_t v1,
 
 	/* Blank the accumulation variable */
 	if (use_reduction)
-		starpu_data_invalidate(s);
+		starpu_data_invalidate_submit(s);
 	else {
 		ret = starpu_insert_task(&bzero_variable_cl, STARPU_W, s, 0);
 		if (ret == -ENODEV) return ret;