浏览代码

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

Cyril Roelandt 13 年之前
父节点
当前提交
cbe6828ab9
共有 1 个文件被更改,包括 2 次插入2 次删除
  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))
 		{