Browse Source

Revert 7338 as function starpu_data_release_on_node is public

 * src/datawizard/user_interactions.c: revert 7338
 * include/starpu_data.h: add function prototype
 * doc/chapters/basic-api.texi: add function documentation
Nathalie Furmento 12 years ago
parent
commit
a334a2764c
3 changed files with 8 additions and 3 deletions
  1. 5 0
      doc/chapters/basic-api.texi
  2. 1 0
      include/starpu_data.h
  3. 2 3
      src/datawizard/user_interactions.c

+ 5 - 0
doc/chapters/basic-api.texi

@@ -573,6 +573,11 @@ This function releases the piece of data acquired by the application either by
 @code{starpu_data_acquire} or by @code{starpu_data_acquire_cb}.
 @end deftypefun
 
+@deftypefun void starpu_data_release_on_node (starpu_data_handle_t @var{handle}, unsigned @var{node})
+This is the same as @code{starpu_data_release}, except that the data will be
+available on the given memory node instead of main memory.
+@end deftypefun
+
 @node Data Interfaces
 @section Data Interfaces
 

+ 1 - 0
include/starpu_data.h

@@ -83,6 +83,7 @@ int starpu_data_acquire_on_node_cb(starpu_data_handle_t handle, unsigned node, e
 #endif
 
 void starpu_data_release(starpu_data_handle_t handle);
+void starpu_data_release_on_node(starpu_data_handle_t handle, unsigned node);
 
 int starpu_malloc(void **A, size_t dim);
 int starpu_free(void *A);

+ 2 - 3
src/datawizard/user_interactions.c

@@ -315,8 +315,7 @@ int starpu_data_acquire(starpu_data_handle_t handle, enum starpu_access_mode mod
 
 /* This function must be called after starpu_data_acquire so that the
  * application release the data */
-static
-void _starpu_data_release_on_node(starpu_data_handle_t handle, unsigned node)
+void starpu_data_release_on_node(starpu_data_handle_t handle, unsigned node)
 {
 	STARPU_ASSERT(handle);
 
@@ -329,7 +328,7 @@ void _starpu_data_release_on_node(starpu_data_handle_t handle, unsigned node)
 
 void starpu_data_release(starpu_data_handle_t handle)
 {
-	_starpu_data_release_on_node(handle, 0);
+	starpu_data_release_on_node(handle, 0);
 }
 
 static void _prefetch_data_on_node(void *arg)