瀏覽代碼

src/datawizard/ rename field interface in struct starpu_data_replicate_t into data_interface (on windows, when including <windows.h>, one gets #define interface struct, ...)

Nathalie Furmento 14 年之前
父節點
當前提交
452a0e24dc

+ 2 - 2
src/datawizard/coherency.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -449,7 +449,7 @@ int _starpu_fetch_task_input(struct starpu_task *task, uint32_t mask)
 		if (STARPU_UNLIKELY(ret))
 			goto enomem;
 
-		task->interface[index] = local_replicate->interface;
+		task->interface[index] = local_replicate->data_interface;
 
 		if (mode & STARPU_REDUX)
 		{

+ 1 - 1
src/datawizard/coherency.h

@@ -42,7 +42,7 @@ LIST_TYPE(starpu_data_replicate,
 	starpu_data_handle handle;
 
 	/* describe the actual data layout */
-	void *interface;
+	void *data_interface;
 
 	unsigned memory_node;
 

+ 3 - 3
src/datawizard/copy_driver.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -105,8 +105,8 @@ static int copy_data_1_to_1_generic(starpu_data_handle handle, struct starpu_dat
 	cudaStream_t stream;
 #endif
 
-	void *src_interface = src_replicate->interface;
-	void *dst_interface = dst_replicate->interface;
+	void *src_interface = src_replicate->data_interface;
+	void *dst_interface = dst_replicate->data_interface;
 
 	switch (_STARPU_MEMORY_NODE_TUPLE(src_kind,dst_kind)) {
 	case _STARPU_MEMORY_NODE_TUPLE(STARPU_CPU_RAM,STARPU_CPU_RAM):

+ 6 - 6
src/datawizard/filters.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -208,7 +208,7 @@ void starpu_data_partition(starpu_data_handle initial_handle, struct starpu_data
 			child_replicate->initialized = 0;
 
 			/* duplicate  the content of the interface on node 0 */
-			memcpy(child_replicate->interface, child->per_node[0].interface, child->ops->interface_size);
+			memcpy(child_replicate->data_interface, child->per_node[0].data_interface, child->ops->interface_size);
 		}
 
 		/* We compute the size and the footprint of the child once and
@@ -339,15 +339,15 @@ static void starpu_data_create_children(starpu_data_handle handle, unsigned nchi
 		{
 			/* relaxed_coherency = 0 */
 			handle_child->per_node[node].handle = handle_child;
-			handle_child->per_node[node].interface = calloc(1, interfacesize);
-			STARPU_ASSERT(handle_child->per_node[node].interface);
+			handle_child->per_node[node].data_interface = calloc(1, interfacesize);
+			STARPU_ASSERT(handle_child->per_node[node].data_interface);
 		}
 
 		for (worker = 0; worker < nworkers; worker++)
 		{
 			handle_child->per_worker[worker].handle = handle_child;
-			handle_child->per_worker[worker].interface = calloc(1, interfacesize);
-			STARPU_ASSERT(handle_child->per_worker[worker].interface);
+			handle_child->per_worker[worker].data_interface = calloc(1, interfacesize);
+			STARPU_ASSERT(handle_child->per_worker[worker].data_interface);
 		}
 	}
 	

+ 8 - 8
src/datawizard/interfaces/data_interface.c

@@ -120,7 +120,7 @@ static void _starpu_register_new_data(starpu_data_handle handle,
 		replicate->memory_node = starpu_worker_get_memory_node(worker);
 
 		/* duplicate  the content of the interface on node 0 */
-		memcpy(replicate->interface, handle->per_node[0].interface, handle->ops->interface_size);
+		memcpy(replicate->data_interface, handle->per_node[0].data_interface, handle->ops->interface_size);
 	} 
 
 	/* now the data is available ! */
@@ -147,8 +147,8 @@ static starpu_data_handle _starpu_data_handle_allocate(struct starpu_data_interf
 
 		replicate->handle = handle;
 
-		replicate->interface = calloc(1, interfacesize);
-		STARPU_ASSERT(replicate->interface);
+		replicate->data_interface = calloc(1, interfacesize);
+		STARPU_ASSERT(replicate->data_interface);
 	}
 
 	unsigned worker;
@@ -160,8 +160,8 @@ static starpu_data_handle _starpu_data_handle_allocate(struct starpu_data_interf
 
 		replicate->handle = handle;
 
-		replicate->interface = calloc(1, interfacesize);
-		STARPU_ASSERT(replicate->interface);
+		replicate->data_interface = calloc(1, interfacesize);
+		STARPU_ASSERT(replicate->data_interface);
 
 	}
 
@@ -207,10 +207,10 @@ void _starpu_data_free_interfaces(starpu_data_handle handle)
 	unsigned nworkers = starpu_worker_get_count();
 
 	for (node = 0; node < STARPU_MAXNODES; node++)
-		free(handle->per_node[node].interface);
+		free(handle->per_node[node].data_interface);
 
 	for (worker = 0; worker < nworkers; worker++)
-		free(handle->per_worker[worker].interface);
+		free(handle->per_worker[worker].data_interface);
 }
 
 struct unregister_callback_arg {
@@ -350,5 +350,5 @@ unsigned starpu_get_handle_interface_id(starpu_data_handle handle)
 
 void *starpu_data_get_interface_on_node(starpu_data_handle handle, unsigned memory_node)
 {
-	return handle->per_node[memory_node].interface;
+	return handle->per_node[memory_node].data_interface;
 }

+ 4 - 4
src/datawizard/memalloc.c

@@ -571,7 +571,7 @@ static starpu_mem_chunk_t _starpu_memchunk_init(struct starpu_data_replicate_s *
 	/* Save a copy of the interface */
 	mc->chunk_interface = malloc(interface_size);
 	STARPU_ASSERT(mc->chunk_interface);
-	memcpy(mc->chunk_interface, replicate->interface, interface_size);
+	memcpy(mc->chunk_interface, replicate->data_interface, interface_size);
 
 	return mc;
 }
@@ -673,8 +673,8 @@ static ssize_t _starpu_allocate_interface(starpu_data_handle handle, struct star
 		STARPU_ASSERT(handle->ops->allocate_data_on_node);
 
 		STARPU_TRACE_START_ALLOC(dst_node);
-		STARPU_ASSERT(replicate->interface);
-		allocated_memory = handle->ops->allocate_data_on_node(replicate->interface, dst_node);
+		STARPU_ASSERT(replicate->data_interface);
+		allocated_memory = handle->ops->allocate_data_on_node(replicate->data_interface, dst_node);
 		STARPU_TRACE_END_ALLOC(dst_node);
 
 		if (allocated_memory == -ENOMEM)
@@ -709,7 +709,7 @@ int _starpu_allocate_memory_on_node(starpu_data_handle handle, struct starpu_dat
 	if (replicate->allocated)
 		return 0;
 
-	STARPU_ASSERT(replicate->interface);
+	STARPU_ASSERT(replicate->data_interface);
 	allocated_memory = _starpu_allocate_interface(handle, replicate, dst_node);
 
 	/* perhaps we could really not handle that capacity misses */

+ 3 - 2
src/datawizard/reduction.c

@@ -1,6 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
+ * Copyright (C) 2011  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -69,7 +70,7 @@ void _starpu_redux_init_data_replicate(starpu_data_handle handle, struct starpu_
 
 	STARPU_ASSERT(init_func);
 
-	init_func(&replicate->interface, NULL);
+	init_func(&replicate->data_interface, NULL);
 
 	replicate->initialized = 1;
 }
@@ -113,7 +114,7 @@ void starpu_data_end_reduction_mode(starpu_data_handle handle)
 
 			uint32_t home_node = starpu_worker_get_memory_node(worker); 
 			starpu_data_register(&handle->reduction_tmp_handles[worker],
-				home_node, handle->per_worker[worker].interface, handle->ops);
+				home_node, handle->per_worker[worker].data_interface, handle->ops);
 
 			starpu_data_set_sequential_consistency_flag(handle->reduction_tmp_handles[worker], 0);