소스 검색

Fix warnings

Samuel Thibault 10 년 전
부모
커밋
f7bc4f304f

+ 2 - 2
examples/callback/prologue.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009, 2010, 2013  Université de Bordeaux
+ * Copyright (C) 2009, 2010, 2013-2014  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -57,7 +57,7 @@ void prologue_callback_func(void *callback_arg)
 
 void pop_prologue_callback_func(void *args)
 {
-	unsigned val = (unsigned) args;
+	unsigned val = (uintptr_t) args;
 	printf("pop_prologue_callback val %d \n", val);
 }
 

+ 3 - 3
examples/cg/cg_kernels.c

@@ -395,10 +395,10 @@ static void gemv_kernel_cpu(void *descr[], void *cl_arg)
 	if (worker_size > 1)
 	{
 		/* Parallel CPU task */
-		int rank = starpu_combined_worker_get_rank();
+		unsigned rank = starpu_combined_worker_get_rank();
 		
-		int block_size = (ny + worker_size - 1)/worker_size;
-		int new_nx = STARPU_MIN(nx, block_size*(rank+1)) - block_size*rank;
+		unsigned block_size = (ny + worker_size - 1)/worker_size;
+		unsigned new_nx = STARPU_MIN(nx, block_size*(rank+1)) - block_size*rank;
 
 		nx = new_nx;
 		v1 = &v1[block_size*rank];

+ 3 - 3
examples/cholesky/cholesky_kernels.c

@@ -55,10 +55,10 @@ static inline void chol_common_cpu_codelet_update_u22(void *descr[], int s, STAR
 		else
 		{
 			/* Parallel CPU kernel */
-			int rank = starpu_combined_worker_get_rank();
+			unsigned rank = starpu_combined_worker_get_rank();
 
-			int block_size = (dx + worker_size - 1)/worker_size;
-			int new_dx = STARPU_MIN(dx, block_size*(rank+1)) - block_size*rank;
+			unsigned block_size = (dx + worker_size - 1)/worker_size;
+			unsigned new_dx = STARPU_MIN(dx, block_size*(rank+1)) - block_size*rank;
 			
 			float *new_left = &left[block_size*rank];
 			float *new_center = &center[block_size*rank];

+ 1 - 2
examples/mandelbrot/mandelbrot.c

@@ -507,8 +507,7 @@ int main(int argc, char **argv)
 
 	double start, end;
 
-	if (demo)
-		start = starpu_timing_now();
+	start = starpu_timing_now();
 
 	while (niter-- != 0)
 	{

+ 3 - 3
examples/mult/xgemm.c

@@ -180,10 +180,10 @@ static void cpu_mult(void *descr[], STARPU_ATTRIBUTE_UNUSED  void *arg)
 	else
 	{
 		/* Parallel CPU task */
-		int rank = starpu_combined_worker_get_rank();
+		unsigned rank = starpu_combined_worker_get_rank();
 
-		int block_size = (nyC + worker_size - 1)/worker_size;
-		int new_nyC = STARPU_MIN(nyC, block_size*(rank+1)) - block_size*rank;
+		unsigned block_size = (nyC + worker_size - 1)/worker_size;
+		unsigned new_nyC = STARPU_MIN(nyC, block_size*(rank+1)) - block_size*rank;
 
 		STARPU_ASSERT(nyC = STARPU_MATRIX_GET_NY(descr[1]));
 

+ 2 - 2
examples/pi/SobolQRNG/sobol_primitives.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux
+ * Copyright (C) 2010, 2014  Université de Bordeaux
  *
  * 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
@@ -66,7 +66,7 @@
 const struct primitive sobol_primitives[] =
 {
     /* First dimension is a special case so this entry is actually ignored */
-    {1, 0, 0 },
+    {1, 0, 0, {0}},
     {2, 1, 0, {1}},
     {3, 2, 1, {1, 3}},
     {4, 3, 1, {1, 3, 1}},

+ 4 - 4
examples/sched_ctx/nested_sched_ctxs.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux
+ * Copyright (C) 2010-2014  Université de Bordeaux
  * Copyright (C) 2010-2014  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@ int parallel_code(int sched_ctx)
 static void sched_ctx_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg)
 {
 	int w = starpu_worker_get_id();
-	unsigned sched_ctx = (unsigned)arg;
+	unsigned sched_ctx = (uintptr_t)arg;
 	int n = parallel_code(sched_ctx);
 //	printf("w %d executed %d it \n", w, n);
 }
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &sched_ctx_codelet;
-		task->cl_arg = sched_ctx1;
+		task->cl_arg = (void*)(uintptr_t) sched_ctx1;
 		task->possibly_parallel = 1;
 
 		/*submit tasks to context*/
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &sched_ctx_codelet;
-		task->cl_arg = sched_ctx2;
+		task->cl_arg = (void*)(uintptr_t) sched_ctx2;
 		task->possibly_parallel = 1;
 
 		/*submit tasks to context*/

+ 3 - 3
examples/sched_ctx/sched_ctx_without_sched_policy.c

@@ -51,7 +51,7 @@ int parallel_code(int sched_ctx)
 
 static void sched_ctx_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg)
 {
-	unsigned sched_ctx = (unsigned)arg;
+	unsigned sched_ctx = (uintptr_t)arg;
 	tasks_executed[sched_ctx-1] += parallel_code(sched_ctx);
 }
 
@@ -130,7 +130,7 @@ int main(int argc, char **argv)
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &sched_ctx_codelet;
-		task->cl_arg = sched_ctx1;
+		task->cl_arg = (void*)(uintptr_t) sched_ctx1;
 
 		/*submit tasks to context*/
 		ret = starpu_task_submit_to_ctx(task,sched_ctx1);
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &sched_ctx_codelet;
-		task->cl_arg = sched_ctx2;
+		task->cl_arg = (void*)(uintptr_t) sched_ctx2;
 
 		/*submit tasks to context*/
 		ret = starpu_task_submit_to_ctx(task,sched_ctx2);

+ 4 - 4
examples/sched_ctx/sched_ctx_without_sched_policy_awake.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2013  Université de Bordeaux 1
+ * Copyright (C) 2010-2014  Université de Bordeaux 1
  * Copyright (C) 2010-2014  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -43,7 +43,7 @@ int parallel_code(int sched_ctx)
 
 static void sched_ctx_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg)
 {
-	unsigned sched_ctx = (unsigned)arg;
+	unsigned sched_ctx = (uintptr_t)arg;
 	parallel_code(sched_ctx);
 }
 
@@ -115,7 +115,7 @@ int main(int argc, char **argv)
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &sched_ctx_codelet;
-		task->cl_arg = sched_ctx1;
+		task->cl_arg = (void*)(uintptr_t) sched_ctx1;
 
 		/*submit tasks to context*/
 		ret = starpu_task_submit_to_ctx(task,sched_ctx1);
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &sched_ctx_codelet;
-		task->cl_arg = sched_ctx2;
+		task->cl_arg = (void*)(uintptr_t) sched_ctx2;
 
 		/*submit tasks to context*/
 		ret = starpu_task_submit_to_ctx(task,sched_ctx2);