Bläddra i källkod

Minor cleanups

Cédric Augonnet 15 år sedan
förälder
incheckning
d901a076c7
3 ändrade filer med 22 tillägg och 90 borttagningar
  1. 0 68
      src/datawizard/Makefile
  2. 20 20
      src/datawizard/filters.c
  3. 2 2
      src/datawizard/memalloc.c

+ 0 - 68
src/datawizard/Makefile

@@ -1,68 +0,0 @@
-#
-# StarPU
-# Copyright (C) INRIA 2008-2009 (see AUTHORS file)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#
-# See the GNU Lesser General Public License in COPYING.LGPL for more details.
-#
-
-.PHONY: interfaces common
-
-OBJS := write_back.o coherency.o data_request.o progress.o copy-driver.o hierarchy.o memalloc.o footprint.o datastats.o
-
-DWOBJDEPS += ../common/hash.o
-DWOBJDEPS += ../common/timing.o 
-DWOBJDEPS += ../common/htable32.o 
-DWOBJDEPS += ../common/mutex.o 
-DWOBJDEPS += ../common/rwlock.o 
-DWOBJDEPS += progress.o
-DWOBJDEPS += write_back.o
-DWOBJDEPS += copy-driver.o
-DWOBJDEPS += data_request.o
-DWOBJDEPS += coherency.o 
-DWOBJDEPS += hierarchy.o 
-DWOBJDEPS += memalloc.o
-DWOBJDEPS += footprint.o
-DWOBJDEPS += interfaces/blas_filters.o
-DWOBJDEPS += interfaces/csr_filters.o
-DWOBJDEPS += interfaces/bcsr_filters.o
-DWOBJDEPS += interfaces/vector_filters.o
-DWOBJDEPS += interfaces/blas_interface.o
-DWOBJDEPS += interfaces/csr_interface.o
-DWOBJDEPS += interfaces/bcsr_interface.o
-DWOBJDEPS += interfaces/vector_interface.o
-
-
-all: datawizard.a interfaces $(SPE_TARGET) $(OBJS)
-
-datawizard.so: common interfaces $(SPE_TARGET) $(OBJS) 
-	gcc --shared -o datawizard.so $(DWOBJDEPS)
-
-datawizard.a: common interfaces $(SPE_TARGET) $(OBJS)
-	$(AR) rcs $@ $(DWOBJDEPS)
-
-common:
-	@make -C ../common/
-
-interfaces:
-	@make -C interfaces
-
-ifeq ($(filter ${MAKECMDGOALS},clean distclean),)
-%.d: %.c
-	$(CC) $(CFLAGS) $< -MM -o $*.d
-
--include $(OBJS:.o=.d)
-endif
-
-clean:
-	@make -C interfaces clean
-	@rm -f *.o *.d *.gcno *.gcda
-	@rm -f *.a *.so

+ 20 - 20
src/datawizard/filters.c

@@ -111,42 +111,42 @@ void starpu_data_partition(starpu_data_handle initial_handle, starpu_filter *f)
 
 	for (i = 0; i < nparts; i++)
 	{
-		starpu_data_handle children =
+		starpu_data_handle child =
 			starpu_data_get_child(initial_handle, i);
 
-		STARPU_ASSERT(children);
+		STARPU_ASSERT(child);
 
-		children->nchildren = 0;
-		children->root_handle = initial_handle->root_handle;
-		children->father_handle = initial_handle;
-		children->sibling_index = i;
-		children->depth = initial_handle->depth + 1;
+		child->nchildren = 0;
+		child->root_handle = initial_handle->root_handle;
+		child->father_handle = initial_handle;
+		child->sibling_index = i;
+		child->depth = initial_handle->depth + 1;
 
-		children->is_not_important = initial_handle->is_not_important;
-		children->wb_mask = initial_handle->wb_mask;
-		children->home_node = initial_handle->home_node;
+		child->is_not_important = initial_handle->is_not_important;
+		child->wb_mask = initial_handle->wb_mask;
+		child->home_node = initial_handle->home_node;
 
 		/* We compute the size and the footprint of the child once and
 		 * store it in the handle */
-		children->data_size = children->ops->get_size(children);
-		children->footprint = _starpu_compute_data_footprint(children);
+		child->data_size = child->ops->get_size(child);
+		child->footprint = _starpu_compute_data_footprint(child);
 
 		/* initialize the chunk lock */
-		children->req_list = starpu_data_requester_list_new();
-		children->refcnt = 0;
-		_starpu_spin_init(&children->header_lock);
+		child->req_list = starpu_data_requester_list_new();
+		child->refcnt = 0;
+		_starpu_spin_init(&child->header_lock);
 
-		children->sequential_consistency = initial_handle->sequential_consistency;
+		child->sequential_consistency = initial_handle->sequential_consistency;
 
 		unsigned node;
 		for (node = 0; node < STARPU_MAXNODES; node++)
 		{
-			children->per_node[node].state = 
+			child->per_node[node].state = 
 				initial_handle->per_node[node].state;
-			children->per_node[node].allocated = 
+			child->per_node[node].allocated = 
 				initial_handle->per_node[node].allocated;
-			children->per_node[node].automatically_allocated = initial_handle->per_node[node].automatically_allocated;
-			children->per_node[node].refcnt = 0;
+			child->per_node[node].automatically_allocated = initial_handle->per_node[node].automatically_allocated;
+			child->per_node[node].refcnt = 0;
 		}
 	}
 

+ 2 - 2
src/datawizard/memalloc.c

@@ -1,6 +1,6 @@
 /*
  * StarPU
- * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
+ * Copyright (C) INRIA 2008-2010 (see AUTHORS file)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -14,7 +14,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#include "memalloc.h"
+#include <datawizard/memalloc.h>
 #include <datawizard/footprint.h>
 
 static pthread_rwlock_t mc_rwlock[STARPU_MAXNODES];