Explorar o código

mpi: remove useless parenthesis

Nathalie Furmento %!s(int64=7) %!d(string=hai) anos
pai
achega
39ae080dbf

+ 15 - 15
mpi/examples/user_datatype/my_interface.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2015, 2016  CNRS
+ * Copyright (C) 2015, 2016, 2017  CNRS
  *
  * 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 +69,7 @@ void _starpu_my_interface_datatype_allocate(MPI_Datatype *mpi_datatype)
 
 void starpu_my_interface_datatype_allocate(starpu_data_handle_t handle, MPI_Datatype *mpi_datatype)
 {
-	(handle);
+	(void)handle;
 	_starpu_my_interface_datatype_allocate(mpi_datatype);
 }
 
@@ -120,20 +120,20 @@ static void data_register_data_handle(starpu_data_handle_t handle, unsigned home
 
 static starpu_ssize_t data_allocate_data_on_node(void *data_interface, unsigned node)
 {
-	(data_interface);
-	(node);
+	(void)data_interface;
+	(void)node;
 	return 0;
 }
 
 static void data_free_data_on_node(void *data_interface, unsigned node)
 {
-	(data_interface);
-	(node);
+	(void)data_interface;
+	(void)node;
 }
 
 static size_t data_get_size(starpu_data_handle_t handle)
 {
-	(handle);
+	(void)handle;
 	return sizeof(int) + sizeof(char);
 }
 
@@ -144,20 +144,20 @@ static uint32_t data_footprint(starpu_data_handle_t handle)
 
 static int data_pack_data(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
 {
-	(handle);
-	(node);
-	(ptr);
-	(count);
+	(void)handle;
+	(void)node;
+	(void)ptr;
+	(void)count;
 	STARPU_ASSERT_MSG(0, "The data interface has been registered with starpu_mpi_datatype_register(). Calling the pack_data function should not happen\n");
 	return 0;
 }
 
 static int data_unpack_data(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count)
 {
-	(handle);
-	(node);
-	(ptr);
-	(count);
+	(void)handle;
+	(void)node;
+	(void)ptr;
+	(void)count;
 	STARPU_ASSERT_MSG(0, "The data interface has been registered with starpu_mpi_datatype_register(). Calling the unpack_data function should not happen\n");
 	return 0;
 }

+ 2 - 2
mpi/src/load_balancer/policy/load_data_interface.c

@@ -124,7 +124,7 @@ int load_data_wakeup_cond(starpu_data_handle_t handle)
 	struct load_data_interface *ld_interface =
 		(struct load_data_interface *) starpu_data_get_interface_on_node(handle, STARPU_MAIN_RAM);
 
-	return ((ld_interface->wakeup_task_threshold > 0) && (ld_interface->nfinished_tasks == ld_interface->wakeup_task_threshold));
+	return (ld_interface->wakeup_task_threshold > 0) && (ld_interface->nfinished_tasks == ld_interface->wakeup_task_threshold);
 }
 
 static void load_data_register_data_handle(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
@@ -166,7 +166,7 @@ static void load_data_free_data_on_node(void *data_interface, unsigned node)
 static size_t load_data_get_size(starpu_data_handle_t handle)
 {
 	(void) handle;
-	return (sizeof(struct load_data_interface));
+	return sizeof(struct load_data_interface);
 }
 
 static uint32_t load_data_footprint(starpu_data_handle_t handle)

+ 2 - 2
mpi/src/load_balancer/policy/load_heat_propagation.c

@@ -27,12 +27,12 @@
 
 static int TAG_LOAD(int n)
 {
-	return ((n+1) << 24);
+	return (n+1) << 24;
 }
 
 static int TAG_MOV(int n)
 {
-	return ((n+1) << 20);
+	return (n+1) << 20;
 }
 
 /* Hash table of local pieces of data that has been moved out of the local MPI

+ 2 - 2
mpi/tests/mpi_scatter_gather.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016  CNRS
+ * Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017  CNRS
  *
  * 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
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
 		{
 			starpu_vector_data_register(&data_handles[x], 0, (uintptr_t)&vector[x], 1, sizeof(int));
 		}
-		else if ((mpi_rank == rank))
+		else if (mpi_rank == rank)
 		{
 			/* I do not own that index but i will need it for my computations */
 			starpu_vector_data_register(&data_handles[x], -1, (uintptr_t)NULL, 1, sizeof(int));