浏览代码

Do not change the new replicate fields, this is handled by the caller. Fix the cache allocation to actually reuse old buffers.

Samuel Thibault 10 年之前
父节点
当前提交
a93bf83bb4
共有 2 个文件被更改,包括 9 次插入6 次删除
  1. 8 1
      ChangeLog
  2. 1 5
      src/datawizard/memalloc.c

+ 8 - 1
ChangeLog

@@ -95,7 +95,14 @@ Small changes:
   * Rename function starpu_trace_user_event() as
     starpu_fxt_trace_user_event()
 
-StarPU 1.1.3 (svn revision xxx)
+StarPU 1.1.4 (svn revision xxx)
+==============================================
+The scheduling context release
+
+New features:
+  * Fix and actually enable the cache allocation.
+
+StarPU 1.1.3 (svn revision 13450)
 ==============================================
 The scheduling context release
 

+ 1 - 5
src/datawizard/memalloc.c

@@ -434,10 +434,6 @@ static void reuse_mem_chunk(unsigned node, struct _starpu_data_replicate *new_re
 	else
 		data_interface = mc->chunk_interface;
 
-	new_replicate->allocated = 1;
-	new_replicate->automatically_allocated = 1;
-	new_replicate->initialized = 0;
-
 	STARPU_ASSERT(new_replicate->data_interface);
 	STARPU_ASSERT(data_interface);
 	memcpy(new_replicate->data_interface, data_interface, mc->size_interface);
@@ -522,7 +518,7 @@ static struct _starpu_mem_chunk *_starpu_memchunk_cache_lookup_locked(unsigned n
 	     mc = _starpu_mem_chunk_list_next(mc))
 	{
 		/* Is that a false hit ? (this is _very_ unlikely) */
-		if (_starpu_data_interface_compare(handle->per_node[node].data_interface, handle->ops, mc->chunk_interface, mc->ops))
+		if (_starpu_data_interface_compare(handle->per_node[node].data_interface, handle->ops, mc->chunk_interface, mc->ops) != 1)
 			continue;
 
 		/* Cache hit */