Parcourir la source

Call starpu_get_memory_nodes_count() only once instead of every time through the loop.

Cyril Roelandt il y a 13 ans
Parent
commit
cbe6828ab9
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/datawizard/write_back.c

+ 2 - 2
src/datawizard/write_back.c

@@ -38,8 +38,8 @@ void _starpu_write_through_data(starpu_data_handle_t handle, uint32_t requesting
 	}
 
 	/* first commit all changes onto the nodes specified by the mask */
-	uint32_t node;
-	for (node = 0; node < starpu_get_memory_nodes_count(); node++)
+	uint32_t node, max;
+	for (node = 0, max = starpu_get_memory_nodes_count(); node < max; node++)
 	{
 		if (write_through_mask & (1<<node))
 		{