|
@@ -179,7 +179,7 @@ DefiningANewDataInterface can also be used within StarPU-MPI and
|
|
|
exchanged between nodes. Two functions needs to be defined through the
|
|
|
type starpu_data_interface_ops. The function
|
|
|
starpu_data_interface_ops::pack_data takes a handle and returns a
|
|
|
-contiguous memory buffer along with its size where data to be conveyed
|
|
|
+contiguous memory buffer allocated with starpu_malloc_flags(ptr, size, 0) along with its size where data to be conveyed
|
|
|
to another node should be copied. The reversed operation is
|
|
|
implemented in the function starpu_data_interface_ops::unpack_data which
|
|
|
takes a contiguous memory buffer and recreates the data handle.
|
|
@@ -193,7 +193,7 @@ static int complex_pack_data(starpu_data_handle_t handle, unsigned node, void **
|
|
|
(struct starpu_complex_interface *) starpu_data_get_interface_on_node(handle, node);
|
|
|
|
|
|
*count = complex_get_size(handle);
|
|
|
- *ptr = malloc(*count);
|
|
|
+ starpu_malloc_flags(ptr, *count, 0);
|
|
|
memcpy(*ptr, complex_interface->real, complex_interface->nx*sizeof(double));
|
|
|
memcpy(*ptr+complex_interface->nx*sizeof(double), complex_interface->imaginary,
|
|
|
complex_interface->nx*sizeof(double));
|