Browse Source

turn function starpu_data_get_data_handle_from_tag private and hence rename it as _starpu_data_get_data_handle_from_tag

Nathalie Furmento 11 years ago
parent
commit
42c8e7dc8e

+ 0 - 1
include/starpu_data.h

@@ -125,7 +125,6 @@ int starpu_data_get_rank(starpu_data_handle_t handle);
 
 
 int starpu_data_set_tag(starpu_data_handle_t handle, int tag);
 int starpu_data_set_tag(starpu_data_handle_t handle, int tag);
 int starpu_data_get_tag(starpu_data_handle_t handle);
 int starpu_data_get_tag(starpu_data_handle_t handle);
-starpu_data_handle_t starpu_data_get_data_handle_from_tag(int tag);
 struct starpu_data_interface_ops* starpu_data_get_interface_ops(starpu_data_handle_t handle);
 struct starpu_data_interface_ops* starpu_data_get_interface_ops(starpu_data_handle_t handle);
 
 
 unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node);
 unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle_t handle, unsigned memory_node);

+ 3 - 2
mpi/src/starpu_mpi.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2009, 2010-2013  Université de Bordeaux 1
  * Copyright (C) 2009, 2010-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,6 +24,7 @@
 #include <starpu_mpi_task_insert.h>
 #include <starpu_mpi_task_insert.h>
 #include <common/config.h>
 #include <common/config.h>
 #include <common/thread.h>
 #include <common/thread.h>
+#include <datawizard/interfaces/data_interface.h>
 
 
 static void _starpu_mpi_add_sync_point_in_fxt(void);
 static void _starpu_mpi_add_sync_point_in_fxt(void);
 static void _starpu_mpi_submit_new_mpi_request(void *arg);
 static void _starpu_mpi_submit_new_mpi_request(void *arg);
@@ -1355,7 +1356,7 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 					starpu_data_handle_t data_handle = NULL;
 					starpu_data_handle_t data_handle = NULL;
 
 
 					STARPU_PTHREAD_MUTEX_UNLOCK(&mutex);
 					STARPU_PTHREAD_MUTEX_UNLOCK(&mutex);
-					data_handle = starpu_data_get_data_handle_from_tag(recv_env->mpi_tag);
+					data_handle = _starpu_data_get_data_handle_from_tag(recv_env->mpi_tag);
 					STARPU_PTHREAD_MUTEX_LOCK(&mutex);
 					STARPU_PTHREAD_MUTEX_LOCK(&mutex);
 
 
 					struct _starpu_mpi_copy_handle* chandle = calloc(1, sizeof(struct _starpu_mpi_copy_handle));
 					struct _starpu_mpi_copy_handle* chandle = calloc(1, sizeof(struct _starpu_mpi_copy_handle));

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

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2009-2013  Université de Bordeaux 1
  * Copyright (C) 2009-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -404,7 +404,7 @@ int starpu_data_get_tag(starpu_data_handle_t handle)
 	return handle->tag;
 	return handle->tag;
 }
 }
 
 
-starpu_data_handle_t starpu_data_get_data_handle_from_tag(int tag)
+starpu_data_handle_t _starpu_data_get_data_handle_from_tag(int tag)
 {
 {
 	struct handle_tag_entry *ret;
 	struct handle_tag_entry *ret;
 
 
@@ -428,8 +428,8 @@ int starpu_data_set_tag(starpu_data_handle_t handle, int tag)
 	entry = (struct handle_tag_entry *) malloc(sizeof(*entry));
 	entry = (struct handle_tag_entry *) malloc(sizeof(*entry));
 	STARPU_ASSERT(entry != NULL);
 	STARPU_ASSERT(entry != NULL);
 
 
-	STARPU_ASSERT_MSG(!(starpu_data_get_data_handle_from_tag(tag)),
-			  "There is already a data handle %p registered with the tag %d\n", starpu_data_get_data_handle_from_tag(tag), tag);
+	STARPU_ASSERT_MSG(!(_starpu_data_get_data_handle_from_tag(tag)),
+			  "There is already a data handle %p registered with the tag %d\n", _starpu_data_get_data_handle_from_tag(tag), tag);
 
 
 	entry->tag = tag;
 	entry->tag = tag;
 	entry->handle = handle;
 	entry->handle = handle;

+ 2 - 1
src/datawizard/interfaces/data_interface.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2009-2012  Université de Bordeaux 1
  * Copyright (C) 2009-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -64,5 +64,6 @@ extern void _starpu_data_register_ram_pointer(starpu_data_handle_t handle,
 	STARPU_ATTRIBUTE_INTERNAL;
 	STARPU_ATTRIBUTE_INTERNAL;
 
 
 extern int _starpu_data_is_multiformat_handle(starpu_data_handle_t handle);
 extern int _starpu_data_is_multiformat_handle(starpu_data_handle_t handle);
+extern starpu_data_handle_t _starpu_data_get_data_handle_from_tag(int tag);
 
 
 #endif // __DATA_INTERFACE_H__
 #endif // __DATA_INTERFACE_H__