瀏覽代碼

fix conversion and shadow declarations

Nathalie Furmento 12 年之前
父節點
當前提交
1332d6d77b

+ 8 - 8
examples/filters/fblock_opencl.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -17,13 +17,13 @@
 
 #include <starpu.h>
 
-#define CHECK_CL_SET_KERNEL_ARG(kernel, n, size, ptr)       \
-do                                                          \
-{							    \
-	int err;                                            \
-	err = clSetKernelArg(kernel, n, size, ptr);         \
-	if (err != CL_SUCCESS)                              \
-       		STARPU_OPENCL_REPORT_ERROR(err);            \
+#define CHECK_CL_SET_KERNEL_ARG(kernel, n, size, ptr)       	\
+do                                                          	\
+{								\
+	int check_err;                           	        \
+	check_err = clSetKernelArg(kernel, n, size, ptr);       \
+	if (check_err != CL_SUCCESS)                            \
+       		STARPU_OPENCL_REPORT_ERROR(check_err);          \
 } while (0)
 
 extern struct starpu_opencl_program opencl_program;

+ 3 - 3
examples/stencil/stencil-tasks.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  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
@@ -253,8 +253,8 @@ void create_start_task(int z, int dir)
  */
 void create_tasks(int rank)
 {
-	unsigned iter;
-	unsigned bz;
+	int iter;
+	int bz;
 	int niter = get_niter();
 	int nbz = get_nbz();
 

+ 4 - 4
include/starpu_util.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  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
@@ -207,17 +207,17 @@ static __inline int starpu_get_env_number(const char *str)
 	if (strval)
 	{
 		/* the env variable was actually set */
-		unsigned val;
+		long int val;
 		char *check;
 
-		val = (int)strtol(strval, &check, 10);
+		val = strtol(strval, &check, 10);
 		if (*check) {
 			fprintf(stderr,"The %s environment variable must contain an integer\n", str);
 			STARPU_ABORT();
 		}
 
 		/* fprintf(stderr, "ENV %s WAS %d\n", str, val); */
-		return val;
+		return (int)val;
 	}
 	else
 	{

+ 2 - 2
mpi/examples/matrix_decomposition/mpi_decomposition_params.c

@@ -25,8 +25,8 @@ unsigned nblocks = 16;
 unsigned nbigblocks = 2;
 unsigned noprio = 0;
 unsigned display = 0;
-unsigned dblockx = -1;
-unsigned dblocky = -1;
+int dblockx = -1;
+int dblocky = -1;
 
 void parse_args(int argc, char **argv, int nodes)
 {

+ 2 - 2
mpi/src/starpu_mpi_stats.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  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
@@ -70,7 +70,7 @@ void starpu_mpi_comm_amounts_retrieve(size_t *comm_amounts)
 
 void _starpu_mpi_comm_amounts_display(int node)
 {
-	unsigned dst;
+	int dst;
 	size_t sum = 0;
 
 	if (stats_enabled == 0) return;