Browse Source

Fix macro name to more precisely reflect behavior

Samuel Thibault 8 years ago
parent
commit
5d82d338bf

+ 4 - 4
doc/doxygen/chapters/api/data_management.doxy

@@ -307,7 +307,7 @@ completion, this function returns 0.
 This macro can be used to acquire data, but not require it to be available on a given node, only enforce R/W dependencies.
 This can for instance be used to wait for tasks which produce the data, but without requesting a fetch to the main memory.
 
-\def STARPU_ACQUIRE_ALL_NODES
+\def STARPU_ACQUIRE_NO_NODE_LOCK_ALL
 \ingroup API_Data_Management
 This is the same as STARPU_ACQUIRE_NO_NODE, but will lock the data on all nodes, preventing them from being evicted for instance.
 This is mostly useful inside starpu only.
@@ -317,7 +317,7 @@ This is mostly useful inside starpu only.
 This is the same as starpu_data_acquire(), except that the data
 will be available on the given memory node instead of main
 memory.
-STARPU_ACQUIRE_NO_NODE and STARPU_ACQUIRE_ALL_NODES can be used instead of an
+STARPU_ACQUIRE_NO_NODE and STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an
 explicit node number.
 
 \fn int starpu_data_acquire_on_node_cb(starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg)
@@ -325,7 +325,7 @@ explicit node number.
 This is the same as starpu_data_acquire_cb(), except that the
 data will be available on the given memory node instead of main
 memory.
-STARPU_ACQUIRE_NO_NODE and STARPU_ACQUIRE_ALL_NODES can be used instead of an
+STARPU_ACQUIRE_NO_NODE and STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an
 explicit node number.
 
 \fn int starpu_data_acquire_on_node_cb_sequential_consistency(starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg, int sequential_consistency)
@@ -333,7 +333,7 @@ explicit node number.
 This is the same as starpu_data_acquire_cb_sequential_consistency(), except that the
 data will be available on the given memory node instead of main
 memory.
-STARPU_ACQUIRE_NO_NODE and STARPU_ACQUIRE_ALL_NODES can be used instead of an
+STARPU_ACQUIRE_NO_NODE and STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an
 explicit node number.
 
 \def STARPU_DATA_ACQUIRE_CB(handle, mode, code)

+ 1 - 1
include/starpu_data.h

@@ -62,7 +62,7 @@ void starpu_data_invalidate_submit(starpu_data_handle_t handle);
 void starpu_data_advise_as_important(starpu_data_handle_t handle, unsigned is_important);
 
 #define STARPU_ACQUIRE_NO_NODE -1
-#define STARPU_ACQUIRE_ALL_NODES -2
+#define STARPU_ACQUIRE_NO_NODE_LOCK_ALL -2
 int starpu_data_acquire(starpu_data_handle_t handle, enum starpu_data_access_mode mode);
 int starpu_data_acquire_on_node(starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode);
 int starpu_data_acquire_cb(starpu_data_handle_t handle, enum starpu_data_access_mode mode, void (*callback)(void *), void *arg);

+ 1 - 1
src/datawizard/coherency.c

@@ -734,7 +734,7 @@ int _starpu_fetch_data_on_node(starpu_data_handle_t handle, int node, struct _st
 		/* Take references which will be released by _starpu_release_data_on_node */
 		if (dst_replicate)
 			dst_replicate->refcnt++;
-		else if (node == STARPU_ACQUIRE_ALL_NODES)
+		else if (node == STARPU_ACQUIRE_NO_NODE_LOCK_ALL)
 		{
 			int i;
 			for (i = 0; i < STARPU_MAXNODES; i++)

+ 5 - 5
src/datawizard/interfaces/data_interface.c

@@ -908,7 +908,7 @@ static void _starpu_data_unregister_submit_cb(void *arg)
 	STARPU_ASSERT(handle->busy_count);
         _starpu_spin_unlock(&handle->header_lock);
 
-	starpu_data_release_on_node(handle, STARPU_ACQUIRE_ALL_NODES);
+	starpu_data_release_on_node(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL);
 }
 
 void starpu_data_unregister_submit(starpu_data_handle_t handle)
@@ -922,7 +922,7 @@ void starpu_data_unregister_submit(starpu_data_handle_t handle)
 	}
 
 	/* Wait for all task dependencies on this handle before putting it for free */
-	starpu_data_acquire_on_node_cb(handle, STARPU_ACQUIRE_ALL_NODES, STARPU_RW, _starpu_data_unregister_submit_cb, handle);
+	starpu_data_acquire_on_node_cb(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL, STARPU_RW, _starpu_data_unregister_submit_cb, handle);
 }
 
 static void _starpu_data_invalidate(void *data)
@@ -980,14 +980,14 @@ static void _starpu_data_invalidate(void *data)
 
 	_starpu_spin_unlock(&handle->header_lock);
 
-	starpu_data_release_on_node(handle, STARPU_ACQUIRE_ALL_NODES);
+	starpu_data_release_on_node(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL);
 }
 
 void starpu_data_invalidate(starpu_data_handle_t handle)
 {
 	STARPU_ASSERT(handle);
 
-	starpu_data_acquire_on_node(handle, STARPU_ACQUIRE_ALL_NODES, STARPU_W);
+	starpu_data_acquire_on_node(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL, STARPU_W);
 
 	_starpu_data_invalidate(handle);
 
@@ -998,7 +998,7 @@ void starpu_data_invalidate_submit(starpu_data_handle_t handle)
 {
 	STARPU_ASSERT(handle);
 
-	starpu_data_acquire_on_node_cb(handle, STARPU_ACQUIRE_ALL_NODES, STARPU_W, _starpu_data_invalidate, handle);
+	starpu_data_acquire_on_node_cb(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL, STARPU_W, _starpu_data_invalidate, handle);
 
 	handle->initialized = 0;
 }

+ 3 - 3
src/datawizard/user_interactions.c

@@ -344,7 +344,7 @@ void starpu_data_release_on_node(starpu_data_handle_t handle, int node)
 	else
 	{
 		_starpu_spin_lock(&handle->header_lock);
-		if (node == STARPU_ACQUIRE_ALL_NODES)
+		if (node == STARPU_ACQUIRE_NO_NODE_LOCK_ALL)
 		{
 			int i;
 			for (i = 0; i < STARPU_MAXNODES; i++)
@@ -499,14 +499,14 @@ static void _starpu_data_wont_use(void *data)
 		}
 	}
 	_starpu_spin_unlock(&handle->header_lock);
-	starpu_data_release_on_node(handle, STARPU_ACQUIRE_ALL_NODES);
+	starpu_data_release_on_node(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL);
 	if (handle->home_node != -1)
 		starpu_data_idle_prefetch_on_node(handle, handle->home_node, 1);
 }
 
 void starpu_data_wont_use(starpu_data_handle_t handle)
 {
-	starpu_data_acquire_on_node_cb(handle, STARPU_ACQUIRE_ALL_NODES, STARPU_R, _starpu_data_wont_use, handle);
+	starpu_data_acquire_on_node_cb(handle, STARPU_ACQUIRE_NO_NODE_LOCK_ALL, STARPU_R, _starpu_data_wont_use, handle);
 }
 
 /*