Pārlūkot izejas kodu

src: set the correct type for the return value of starpu_get_handle_interface_id()

Nathalie Furmento 13 gadi atpakaļ
vecāks
revīzija
ecb2f557c5

+ 2 - 2
src/core/perfmodel/perfmodel.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -260,7 +260,7 @@ double starpu_task_expected_conversion_time(struct starpu_task *task,
 
 	for (i = 0; i < task->cl->nbuffers; i++)
 	{
-		unsigned int id;
+		enum starpu_data_interface_id id;
 		starpu_data_handle_t handle;
 		struct starpu_task *conversion_task;
 

+ 1 - 1
src/core/task.c

@@ -656,7 +656,7 @@ _starpu_task_uses_multiformat_handles(struct starpu_task *task)
 	unsigned i;
 	for (i = 0; i < task->cl->nbuffers; i++)
 	{
-		unsigned int id;
+		enum starpu_data_interface_id id;
 		id = starpu_get_handle_interface_id(task->handles[i]);
 		if (id == STARPU_MULTIFORMAT_INTERFACE_ID)
 			return 1;

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

@@ -454,7 +454,7 @@ static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned cohere
 		 * this piece of data back into the CPU format.
 		 * XXX : This is quite hacky, could we submit a task instead ?
 		 */
-		unsigned int id = starpu_get_handle_interface_id(handle);
+		enum starpu_data_interface_id id = starpu_get_handle_interface_id(handle);
 		if (id == STARPU_MULTIFORMAT_INTERFACE_ID &&
 			_starpu_get_node_kind(handle->mf_node) != STARPU_CPU_RAM)
 		{

+ 1 - 1
src/datawizard/user_interactions.c

@@ -207,7 +207,7 @@ int starpu_data_acquire(starpu_data_handle_t handle, enum starpu_access_mode mod
 		return -EDEADLK;
         }
 
-	unsigned int id = starpu_get_handle_interface_id(handle);
+	enum starpu_data_interface_id id = starpu_get_handle_interface_id(handle);
 	if (id == STARPU_MULTIFORMAT_INTERFACE_ID &&
 	    _starpu_handle_needs_conversion_task(handle, 0))
 	{