浏览代码

mpi/tests/user_defined_datatype_value.h: allow to overlap sending of the size and packing of the data

Nathalie Furmento 12 年之前
父节点
当前提交
0bfeca4de0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mpi/tests/user_defined_datatype_value.h

+ 1 - 1
mpi/tests/user_defined_datatype_value.h

@@ -94,9 +94,9 @@ static int value_pack_data(starpu_data_handle_t handle, unsigned node, void **pt
 	struct starpu_value_interface *value_interface = (struct starpu_value_interface *)
 	struct starpu_value_interface *value_interface = (struct starpu_value_interface *)
 		starpu_data_get_interface_on_node(handle, node);
 		starpu_data_get_interface_on_node(handle, node);
 
 
+	*count = sizeof(int);
 	if (ptr != NULL)
 	if (ptr != NULL)
 	{
 	{
-		*count = sizeof(int);
 		*ptr = malloc(*count);
 		*ptr = malloc(*count);
 		memcpy(*ptr, value_interface->value, sizeof(int));
 		memcpy(*ptr, value_interface->value, sizeof(int));
 	}
 	}