浏览代码

src/ examples/ tests/ tools/: fix coding style, curly braces go on a newline

Nathalie Furmento 10 年之前
父节点
当前提交
4f6b40a1da
共有 60 个文件被更改,包括 245 次插入174 次删除
  1. 3 2
      examples/axpy/axpy.c
  2. 5 3
      examples/basic_examples/vector_scal.c
  3. 2 2
      examples/cg/cg_dot_kernel.cu
  4. 2 1
      examples/cg/cg_kernels.c
  5. 29 41
      examples/cholesky/cholesky.h
  6. 7 4
      examples/filters/shadow2d.c
  7. 19 10
      examples/filters/shadow3d.c
  8. 12 6
      examples/gl_interop/gl_interop.c
  9. 12 6
      examples/gl_interop/gl_interop_idle.c
  10. 3 2
      examples/lu/lu_example.c
  11. 3 2
      examples/lu/xlu_implicit.c
  12. 3 2
      examples/lu/xlu_kernels.c
  13. 3 2
      examples/openmp/vector_scal_omp.c
  14. 5 5
      examples/pi/pi_kernel.cu
  15. 3 3
      examples/pi/pi_redux_kernel.cu
  16. 7 4
      examples/spmd/vector_scal_spmd.c
  17. 2 2
      examples/stencil/stencil-blocks.c
  18. 10 6
      examples/stencil/stencil-tasks.c
  19. 9 5
      examples/tag_example/tag_example4.c
  20. 5 3
      examples/tag_example/tag_restartable.c
  21. 2 1
      src/datawizard/coherency.h
  22. 2 3
      src/sched_policies/deque_modeling_policy_data_aware.c
  23. 9 9
      src/sched_policies/locality_work_stealing_policy.c
  24. 6 3
      src/util/openmp_runtime_support.c
  25. 9 9
      tests/datawizard/double_parameter.c
  26. 3 2
      tests/datawizard/interfaces/bcsr/bcsr_interface.c
  27. 5 3
      tests/main/pause_resume.c
  28. 2 1
      tests/openmp/array_slice_01.c
  29. 2 1
      tests/openmp/cuda_task_01.c
  30. 2 1
      tests/openmp/environment.c
  31. 2 1
      tests/openmp/init_exit_01.c
  32. 2 1
      tests/openmp/init_exit_02.c
  33. 2 1
      tests/openmp/parallel_01.c
  34. 2 1
      tests/openmp/parallel_02.c
  35. 2 1
      tests/openmp/parallel_03.c
  36. 2 1
      tests/openmp/parallel_barrier_01.c
  37. 2 1
      tests/openmp/parallel_critical_01.c
  38. 2 1
      tests/openmp/parallel_critical_inline_01.c
  39. 2 1
      tests/openmp/parallel_critical_named_01.c
  40. 2 1
      tests/openmp/parallel_critical_named_inline_01.c
  41. 2 1
      tests/openmp/parallel_for_01.c
  42. 2 1
      tests/openmp/parallel_for_02.c
  43. 2 1
      tests/openmp/parallel_for_ordered_01.c
  44. 2 1
      tests/openmp/parallel_master_01.c
  45. 2 1
      tests/openmp/parallel_master_inline_01.c
  46. 2 1
      tests/openmp/parallel_nested_lock_01.c
  47. 2 1
      tests/openmp/parallel_sections_01.c
  48. 2 1
      tests/openmp/parallel_sections_combined_01.c
  49. 2 1
      tests/openmp/parallel_simple_lock_01.c
  50. 2 1
      tests/openmp/parallel_single_copyprivate_01.c
  51. 2 1
      tests/openmp/parallel_single_copyprivate_inline_01.c
  52. 2 1
      tests/openmp/parallel_single_inline_01.c
  53. 2 1
      tests/openmp/parallel_single_nowait_01.c
  54. 2 1
      tests/openmp/parallel_single_wait_01.c
  55. 2 1
      tests/openmp/task_01.c
  56. 2 1
      tests/openmp/task_02.c
  57. 2 1
      tests/openmp/taskgroup_01.c
  58. 2 1
      tests/openmp/taskgroup_02.c
  59. 2 1
      tests/openmp/taskwait_01.c
  60. 1 1
      tools/dev/experimental/modes/fix_cocci_output_test.c

+ 3 - 2
examples/axpy/axpy.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2009-2014  Université de Bordeaux
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -100,7 +100,8 @@ check(void)
 	for (i = 0; i < N; i++)
 	{
 		TYPE expected_value = _alpha * _vec_x[i] + 4.0;
-		if (fabs(_vec_y[i] - expected_value) > expected_value * EPSILON) {
+		if (fabs(_vec_y[i] - expected_value) > expected_value * EPSILON)
+		{
 			FPRINTF(stderr,"at %d, %f*%f+%f=%f, expected %f\n", i, _alpha, _vec_x[i], 4.0, _vec_y[i], expected_value);
 			return EXIT_FAILURE;
 		}

+ 5 - 3
examples/basic_examples/vector_scal.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2014  Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -54,7 +54,8 @@ static struct starpu_codelet cl =
 {
 	.where = STARPU_CPU | STARPU_CUDA | STARPU_OPENCL | STARPU_MIC,
 	/* CPU implementation of the codelet */
-	.cpu_funcs = {
+	.cpu_funcs =
+	{
 		scal_cpu_func
 #if defined(STARPU_HAVE_ICC) && !defined(__KNC__) && !defined(__KNF__)
 		, scal_cpu_func_icc
@@ -66,7 +67,8 @@ static struct starpu_codelet cl =
 #endif
 #endif
 	},
-	.cpu_funcs_name = {
+	.cpu_funcs_name =
+	{
 		"scal_cpu_func",
 #if defined(STARPU_HAVE_ICC) && !defined(__KNC__) && !defined(__KNF__)
 		"scal_cpu_func_icc",

+ 2 - 2
examples/cg/cg_dot_kernel.cu

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux
- * Copyright (C) 2010, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2012, 2015  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
@@ -39,7 +39,7 @@ static __global__ void dot_device(TYPE *vx, TYPE *vy, unsigned n, TYPE *dot_arra
 
 	int ind;
 	for (ind = tid; ind < n; ind += nthreads)
-	{ 
+	{
 		TYPE x = vx[ind];
 		TYPE y = vy[ind];
 

+ 2 - 1
examples/cg/cg_kernels.c

@@ -290,7 +290,8 @@ int dot_kernel(starpu_data_handle_t v1,
 	/* Blank the accumulation variable */
 	if (use_reduction)
 		starpu_data_invalidate_submit(s);
-	else {
+	else
+	{
 		ret = starpu_task_insert(&bzero_variable_cl, STARPU_W, s, 0);
 		if (ret == -ENODEV) return ret;
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");

+ 29 - 41
examples/cholesky/cholesky.h

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -173,78 +173,66 @@ static void STARPU_ATTRIBUTE_UNUSED parse_args(int argc, char **argv)
 		{
 			with_ctxs = 1;
 			break;
-		} else
-		if (strcmp(argv[i], "-with_noctxs") == 0) 
+		}
+		else if (strcmp(argv[i], "-with_noctxs") == 0) 
 		{
 			with_noctxs = 1;
 			break;
-		} else
-		
-		if (strcmp(argv[i], "-chole1") == 0) 
+		}
+		else if (strcmp(argv[i], "-chole1") == 0) 
 		{
 			chole1 = 1;
 			break;
-		} else
-
-		if (strcmp(argv[i], "-chole2") == 0) 
+		}
+		else if (strcmp(argv[i], "-chole2") == 0) 
 		{
 			chole2 = 1;
 			break;
-		} else
-
-		if (strcmp(argv[i], "-size") == 0)
+		}
+		else if (strcmp(argv[i], "-size") == 0)
 		{
 		        char *argptr;
 			size = strtol(argv[++i], &argptr, 10);
-		} else
-
-		if (strcmp(argv[i], "-nblocks") == 0)
+		}
+		else if (strcmp(argv[i], "-nblocks") == 0)
 		{
 		        char *argptr;
 			nblocks = strtol(argv[++i], &argptr, 10);
-		} else
-
-		if (strcmp(argv[i], "-nbigblocks") == 0)
+		}
+		else if (strcmp(argv[i], "-nbigblocks") == 0)
 		{
 		        char *argptr;
 			nbigblocks = strtol(argv[++i], &argptr, 10);
-		} else
-
-		if (strcmp(argv[i], "-no-pin") == 0)
+		}
+		else if (strcmp(argv[i], "-no-pin") == 0)
 		{
 			pinned = 0;
-		} else
-
-		if (strcmp(argv[i], "-no-prio") == 0)
+		}
+		else if (strcmp(argv[i], "-no-prio") == 0)
 		{
 			noprio = 1;
-		} else
-
-		if (strcmp(argv[i], "-bound") == 0)
+		}
+		else if (strcmp(argv[i], "-bound") == 0)
 		{
 			bound = 1;
-		} else
-
-		if (strcmp(argv[i], "-bound-lp") == 0)
+		}
+		else if (strcmp(argv[i], "-bound-lp") == 0)
 		{
 			bound_lp = 1;
-		} else
-
-		if (strcmp(argv[i], "-bound-mps") == 0)
+		}
+		else if (strcmp(argv[i], "-bound-mps") == 0)
 		{
 			bound_mps = 1;
-		} else
-
-		if (strcmp(argv[i], "-bound-deps") == 0)
+		}
+		else if (strcmp(argv[i], "-bound-deps") == 0)
 		{
 			bound_deps = 1;
-		} else
-
-		if (strcmp(argv[i], "-check") == 0)
+		}
+		else if (strcmp(argv[i], "-check") == 0)
 		{
 			check = 1;
-		} else
-
+		}
+		else
 		/* if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i],"--help") == 0) */
 		{
 			fprintf(stderr,"usage : %s [-size size] [-nblocks nblocks] [-no-pin] [-no-prio] [-bound] [-bound-deps] [-bound-lp] [-check]\n", argv[0]);

+ 7 - 4
examples/filters/shadow2d.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2012-2014  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -169,18 +169,21 @@ int main(int argc, char **argv)
 
 	/* Copy borders */
 	for (j = SHADOWY ; j<SHADOWY+NY ; j++)
-		for(i=0 ; i<SHADOWX ; i++) {
+		for(i=0 ; i<SHADOWX ; i++)
+		{
 			matrix[j][i] = matrix[j][i+NX];
 			matrix[j][SHADOWX+NX+i] = matrix[j][SHADOWX+i];
 		}
 	for(j=0 ; j<SHADOWY ; j++)
-		for(i=SHADOWX ; i<SHADOWX+NX ; i++) {
+		for(i=SHADOWX ; i<SHADOWX+NX ; i++)
+		{
 			matrix[j][i] = matrix[j+NY][i];
 			matrix[SHADOWY+NY+j][i] = matrix[SHADOWY+j][i];
 		}
 	/* Copy corners */
 	for(j=0 ; j<SHADOWY ; j++)
-		for(i=0 ; i<SHADOWX ; i++) {
+		for(i=0 ; i<SHADOWX ; i++)
+		{
 			matrix[j][i] = matrix[j+NY][i+NX];
 			matrix[j][SHADOWX+NX+i] = matrix[j+NY][SHADOWX+i];
 			matrix[SHADOWY+NY+j][i] = matrix[SHADOWY+j][i+NX];

+ 19 - 10
examples/filters/shadow3d.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2012-2014  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -100,7 +100,8 @@ void cuda_func(void *buffers[], void *cl_arg)
 	STARPU_ASSERT(x == x2);
 	STARPU_ASSERT(y == y2);
 	STARPU_ASSERT(z == z2);
-	for (k = 0; k < z; k++) {
+	for (k = 0; k < z; k++)
+	{
 		cures = cudaMemcpy2DAsync(val2+k*ldz2, ldy2*sizeof(*val2), val+k*ldz, ldy*sizeof(*val),
 				x*sizeof(*val), y, cudaMemcpyDeviceToDevice, starpu_cuda_get_local_stream());
 		STARPU_ASSERT(!cures);
@@ -137,19 +138,22 @@ int main(int argc, char **argv)
 	/* Copy planes */
 	for (k = SHADOWZ ; k<SHADOWZ+NZ ; k++)
 		for (j = SHADOWY ; j<SHADOWY+NY ; j++)
-			for(i=0 ; i<SHADOWX ; i++) {
+			for(i=0 ; i<SHADOWX ; i++)
+			{
 				matrix[k][j][i] = matrix[k][j][i+NX];
 				matrix[k][j][SHADOWX+NX+i] = matrix[k][j][SHADOWX+i];
 			}
 	for(k=SHADOWZ ; k<SHADOWZ+NZ ; k++)
 		for(j=0 ; j<SHADOWY ; j++)
-			for(i=SHADOWX ; i<SHADOWX+NX ; i++) {
+			for(i=SHADOWX ; i<SHADOWX+NX ; i++)
+			{
 				matrix[k][j][i] = matrix[k][j+NY][i];
 				matrix[k][SHADOWY+NY+j][i] = matrix[k][SHADOWY+j][i];
 			}
 	for(k=0 ; k<SHADOWZ ; k++)
 		for(j=SHADOWY ; j<SHADOWY+NY ; j++)
-			for(i=SHADOWX ; i<SHADOWX+NX ; i++) {
+			for(i=SHADOWX ; i<SHADOWX+NX ; i++)
+			{
 				matrix[k][j][i] = matrix[k+NZ][j][i];
 				matrix[SHADOWZ+NZ+k][j][i] = matrix[SHADOWZ+k][j][i];
 			}
@@ -157,7 +161,8 @@ int main(int argc, char **argv)
 	/* Copy borders */
 	for (k = SHADOWZ ; k<SHADOWZ+NZ ; k++)
 		for(j=0 ; j<SHADOWY ; j++)
-			for(i=0 ; i<SHADOWX ; i++) {
+			for(i=0 ; i<SHADOWX ; i++)
+			{
 				matrix[k][j][i] = matrix[k][j+NY][i+NX];
 				matrix[k][SHADOWY+NY+j][i] = matrix[k][SHADOWY+j][i+NX];
 				matrix[k][SHADOWY+NY+j][SHADOWX+NX+i] = matrix[k][SHADOWY+j][SHADOWX+i];
@@ -165,7 +170,8 @@ int main(int argc, char **argv)
 			}
 	for(k=0 ; k<SHADOWZ ; k++)
 		for (j = SHADOWY ; j<SHADOWY+NY ; j++)
-			for(i=0 ; i<SHADOWX ; i++) {
+			for(i=0 ; i<SHADOWX ; i++)
+			{
 				matrix[k][j][i] = matrix[k+NZ][j][i+NX];
 				matrix[SHADOWZ+NZ+k][j][i] = matrix[SHADOWZ+k][j][i+NX];
 				matrix[SHADOWZ+NZ+k][j][SHADOWX+NX+i] = matrix[SHADOWZ+k][j][SHADOWX+i];
@@ -173,7 +179,8 @@ int main(int argc, char **argv)
 			}
 	for(k=0 ; k<SHADOWZ ; k++)
 		for(j=0 ; j<SHADOWY ; j++)
-			for(i=SHADOWX ; i<SHADOWX+NX ; i++) {
+			for(i=SHADOWX ; i<SHADOWX+NX ; i++)
+			{
 				matrix[k][j][i] = matrix[k+NZ][j+NY][i];
 				matrix[SHADOWZ+NZ+k][j][i] = matrix[SHADOWZ+k][j+NY][i];
 				matrix[SHADOWZ+NZ+k][SHADOWY+NY+j][i] = matrix[SHADOWZ+k][SHADOWY+j][i];
@@ -183,7 +190,8 @@ int main(int argc, char **argv)
 	/* Copy corners */
 	for(k=0 ; k<SHADOWZ ; k++)
 		for(j=0 ; j<SHADOWY ; j++)
-			for(i=0 ; i<SHADOWX ; i++) {
+			for(i=0 ; i<SHADOWX ; i++)
+			{
 				matrix[k][j][i] = matrix[k+NZ][j+NY][i+NX];
 				matrix[k][j][SHADOWX+NX+i] = matrix[k+NZ][j+NY][SHADOWX+i];
 				matrix[k][SHADOWY+NY+j][i] = matrix[k+NZ][SHADOWY+j][i+NX];
@@ -300,7 +308,8 @@ int main(int argc, char **argv)
 	{
 		for(j=0 ; j<NY + PARTSY*2*SHADOWY ; j++)
 		{
-			for(i=0 ; i<NX + PARTSX*2*SHADOWX ; i++) {
+			for(i=0 ; i<NX + PARTSX*2*SHADOWX ; i++)
+			{
 				FPRINTF(stderr, "%5d ", matrix2[k][j][i]);
 			}
 			FPRINTF(stderr,"\n");

+ 12 - 6
examples/gl_interop/gl_interop.c

@@ -40,16 +40,19 @@ void dummy(void *buffers[], void *cl_arg)
 	printf("Codelet done\n");
 }
 
-struct starpu_codelet cl = {
+struct starpu_codelet cl =
+{
 	.cuda_funcs = { dummy },
 	.nbuffers = 1,
 	.modes = { STARPU_W },
 };
 
-void foo(void) {
+void foo(void)
+{
 }
 
-void display(float i) {
+void display(float i)
+{
 	glClear(GL_COLOR_BUFFER_BIT);
 	glColor3f(1, 1, 1);
 	glBegin(GL_LINES);
@@ -61,10 +64,12 @@ void display(float i) {
 	glutMainLoopEvent();
 }
 
-void callback_func(void *foo) {
+void callback_func(void *foo)
+{
 	printf("Callback running, rendering\n");
 	float i = 1.;
-	while (i > 0) {
+	while (i > 0)
+	{
 		usleep(100000);
 		display(i);
 		i -= 0.1;
@@ -84,7 +89,8 @@ int main(int argc, char **argv)
 	struct starpu_conf conf;
 	int cuda_device = 0;
 	int cuda_devices[] = { cuda_device };
-	struct starpu_driver drivers[] = {
+	struct starpu_driver drivers[] =
+	{
 		{ .type = STARPU_CUDA_WORKER, .id.cuda_id = cuda_device }
 	};
 	int ret;

+ 12 - 6
examples/gl_interop/gl_interop_idle.c

@@ -43,16 +43,19 @@ void dummy(void *buffers[], void *cl_arg)
 	printf("Codelet done\n");
 }
 
-struct starpu_codelet cl = {
+struct starpu_codelet cl =
+{
 	.cuda_funcs = { dummy },
 	.nbuffers = 1,
 	.modes = { STARPU_W },
 };
 
-void foo(void) {
+void foo(void)
+{
 }
 
-void display(float i) {
+void display(float i)
+{
 	glClear(GL_COLOR_BUFFER_BIT);
 	glColor3f(1, 1, 1);
 	glBegin(GL_LINES);
@@ -64,14 +67,17 @@ void display(float i) {
 }
 
 static int cuda_devices[] = { 0 };
-static struct starpu_driver drivers[] = {
+static struct starpu_driver drivers[] =
+{
 	{ .type = STARPU_CUDA_WORKER }
 };
 
-void callback_func(void *foo) {
+void callback_func(void *foo)
+{
 	printf("Callback running, rendering\n");
 	float i = 1.;
-	while (i > 0) {
+	while (i > 0)
+	{
 		usleep(100000);
 		display(i);
 		i -= 0.1;

+ 3 - 2
examples/lu/lu_example.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009-2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -405,7 +405,8 @@ int main(int argc, char **argv)
 	if (check)
 	{
 		FPRINTF(stderr, "Checking result\n");
-		if (pivot) {
+		if (pivot)
+		{
 			pivot_saved_matrix(ipiv);
 			free(ipiv);
 		}

+ 3 - 2
examples/lu/xlu_implicit.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2011, 2014  Université de Bordeaux
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2015  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
@@ -136,7 +136,8 @@ static int dw_codelet_facto_v3(starpu_data_handle_t dataA, unsigned nblocks)
 		}
 
 		for (i = k+1; i<nblocks; i++)
-		     for (j = k+1; j<nblocks; j++) {
+		     for (j = k+1; j<nblocks; j++)
+		     {
 			  ret = create_task_22(dataA, k, i, j);
 			  if (ret == -ENODEV) return ret;
 		     }

+ 3 - 2
examples/lu/xlu_kernels.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2012, 2014  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2015  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
@@ -104,7 +104,8 @@ static struct starpu_perfmodel STARPU_LU(model_22) =
 };
 
 #ifdef STARPU_USE_CUDA
-static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nimpl) {
+static int can_execute(unsigned workerid, struct starpu_task *task, unsigned nimpl)
+{
 	if (starpu_worker_get_type(workerid) == STARPU_CPU_WORKER)
 		return 1;
 

+ 3 - 2
examples/openmp/vector_scal_omp.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2013  Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -44,7 +44,8 @@ void scal_cpu_func(void *buffers[], void *_args)
 	FPRINTF(stderr, "running task with %d CPUs.\n", starpu_combined_worker_get_size());
 
 #pragma omp parallel for num_threads(starpu_combined_worker_get_size())
-	for (i = 0; i < n; i++) {
+	for (i = 0; i < n; i++)
+	{
 		float v = val[i];
 		int j;
 		for (j = 0; j < 100; j++)

+ 5 - 5
examples/pi/pi_kernel.cu

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2013  Université de Bordeaux
- * Copyright (C) 2010, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2012, 2015  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
@@ -38,7 +38,7 @@ static __global__ void monte_carlo(TYPE *random_numbers_x, TYPE *random_numbers_
 	__syncthreads();
 	int ind;
 	for (ind = tid; ind < n; ind += nthreads)
-	{ 
+	{
 		TYPE x = random_numbers_x[ind];
 		TYPE y = random_numbers_y[ind];
 		TYPE dist = (x*x + y*y);
@@ -109,7 +109,7 @@ extern "C" void cuda_kernel(void *descr[], void *cl_arg)
 	float *random_numbers;
 	cudaMalloc((void **)&random_numbers, 2*nx*sizeof(float));
 	STARPU_ASSERT(random_numbers);
-	
+
 	sobolGPU(2*nx/n_dimensions, n_dimensions, directions, random_numbers);
 	cudaStreamSynchronize(starpu_cuda_get_local_stream());
 
@@ -118,11 +118,11 @@ extern "C" void cuda_kernel(void *descr[], void *cl_arg)
 
 	unsigned *cnt = (unsigned *)STARPU_VECTOR_GET_PTR(descr[1]);
 
-	/* How many blocks do we use ? */ 
+	/* How many blocks do we use ? */
 	unsigned nblocks = 128; // TODO
 
 	STARPU_ASSERT(nblocks <= MAXNBLOCKS);
-	
+
 	unsigned *per_block_cnt;
 	cudaMalloc((void **)&per_block_cnt, nblocks*sizeof(unsigned));
 

+ 3 - 3
examples/pi/pi_redux_kernel.cu

@@ -35,7 +35,7 @@ static __global__ void monte_carlo(float *x, float *y, unsigned n, unsigned long
 	__syncthreads();
 	int ind;
 	for (ind = tid; ind < n; ind += nthreads)
-	{ 
+	{
 		float xval = (2.0f * x[ind] - 1.0f);
 		float yval = (2.0f * y[ind] - 1.0f);
 		float dist = (xval*xval + yval*yval);
@@ -98,11 +98,11 @@ extern "C" void pi_redux_cuda_kernel(float *x, float *y, unsigned n, unsigned lo
 {
 	cudaError_t cures;
 
-	/* How many blocks do we use ? */ 
+	/* How many blocks do we use ? */
 	unsigned nblocks = 128; // TODO
 	STARPU_ASSERT(nblocks <= MAXNBLOCKS);
 	STARPU_ASSERT((n % nblocks) == 0);
-	
+
 	unsigned long *per_block_cnt;
 	cudaMalloc((void **)&per_block_cnt, nblocks*sizeof(unsigned long));
 

+ 7 - 4
examples/spmd/vector_scal_spmd.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2013, 2015  Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -67,7 +67,8 @@ void scal_cpu_func(void *buffers[], void *_args)
 	int begin = get_first_element_rank(n, rank, nb_workers);
 
 
-	for (i = 0; i < nel_worker; i++) {
+	for (i = 0; i < nel_worker; i++)
+	{
 		rank = i + begin;
 
 		float v = val[rank];
@@ -124,7 +125,8 @@ int main(int argc, char **argv)
 
 	float factor = 1.001;
 
-	for (i = 0; i < ITER; i++) {
+	for (i = 0; i < ITER; i++)
+	{
 		struct starpu_task *task = starpu_task_create();
 
 		task->cl = &cl;
@@ -134,7 +136,8 @@ int main(int argc, char **argv)
 		task->cl_arg_size = sizeof(factor);
 
 		ret = starpu_task_submit(task);
-		if (ret == -ENODEV) {
+		if (ret == -ENODEV)
+		{
 		     ret = 77;
 		     break;
 		}

+ 2 - 2
examples/stencil/stencil-blocks.c

@@ -325,7 +325,7 @@ void allocate_memory_on_node(int rank)
 						(sizex + 2*K), (sizey + 2*K), K);
 			allocate_block_on_node(&block->boundaries_handle[T][1], &block->boundaries[T][1],
 						(sizex + 2*K), (sizey + 2*K), K);
-		} 
+		}
 
 		/* Boundary blocks : Bottom */
 		int bottom_node = block->boundary_blocks[B]->mpi_node;
@@ -335,7 +335,7 @@ void allocate_memory_on_node(int rank)
 						(sizex + 2*K), (sizey + 2*K), K);
 			allocate_block_on_node(&block->boundaries_handle[B][1], &block->boundaries[B][1],
 						(sizex + 2*K), (sizey + 2*K), K);
-		} 
+		}
 	}
 }
 

+ 10 - 6
examples/stencil/stencil-tasks.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2013-2014  Université de Bordeaux
- * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013, 2015  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
@@ -140,7 +140,8 @@ void create_task_save(unsigned iter, unsigned z, int dir, int local_rank)
 		/* Save data from update */
 		create_task_save_local(iter, z, dir, local_rank);
 		if (node_z_and_d != local_rank)
-		{ /* R(z) = local & R(z+d) != local, We have to send the data */
+		{
+			/* R(z) = local & R(z+d) != local, We have to send the data */
 			create_task_save_mpi_send(iter, z, dir, local_rank);
 		}
 
@@ -152,9 +153,10 @@ void create_task_save(unsigned iter, unsigned z, int dir, int local_rank)
 			create_task_save_mpi_recv(iter, z, dir, local_rank);
 		}
 		else
-		{ /* R(z) != local & R(z+d) != local We don't have
-			      the saved data and don't need it, we shouldn't
-			      even have been called! */
+		{
+			/* R(z) != local & R(z+d) != local We don't have
+			   the saved data and don't need it, we shouldn't
+			   even have been called! */
 			STARPU_ABORT();
 		}
 	}
@@ -212,7 +214,9 @@ void create_task_update(unsigned iter, unsigned z, int local_rank)
 }
 
 /* Dummy empty codelet taking one buffer */
-void null_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED) { }
+void null_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
+{
+}
 
 static double null_cost_function(struct starpu_task *task, unsigned nimpl)
 {

+ 9 - 5
examples/tag_example/tag_example4.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2012-2013  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -48,7 +48,8 @@ void cpu_codelet_B(void *descr[], void *_args)
 	fprintf(stderr,"B");
 }
 
-struct starpu_codelet cl_A = {
+struct starpu_codelet cl_A =
+{
 	.cpu_funcs = { cpu_codelet_A},
 	.cuda_funcs = { cpu_codelet_A},
 	.opencl_funcs = { cpu_codelet_A},
@@ -56,7 +57,8 @@ struct starpu_codelet cl_A = {
 	.name = "dummyA"
 };
 
-struct starpu_codelet cl_B = {
+struct starpu_codelet cl_B =
+{
 	.cpu_funcs = { cpu_codelet_B},
 	.cuda_funcs = { cpu_codelet_B},
 	.opencl_funcs = { cpu_codelet_B},
@@ -107,7 +109,8 @@ int main(int argc STARPU_ATTRIBUTE_UNUSED , char **argv STARPU_ATTRIBUTE_UNUSED)
 
 		for (i = 1; i < ni; i++)
 		{
-			for (j = 1; j < i; j++) {
+			for (j = 1; j < i; j++)
+			{
 				struct starpu_task *task_A = starpu_task_create();
 				task_A->cl = &cl_A;
 				task_A->cl_arg = &array[i];
@@ -119,7 +122,8 @@ int main(int argc STARPU_ATTRIBUTE_UNUSED , char **argv STARPU_ATTRIBUTE_UNUSED)
 				STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 			}
 
-			for (j = 1; j < i; j++) {
+			for (j = 1; j < i; j++)
+			{
 				struct starpu_task *task_B = starpu_task_create();
 				task_B->cl = &cl_B;
 				task_B->cl_arg = &array[i];

+ 5 - 3
examples/tag_example/tag_restartable.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2013  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -97,7 +97,8 @@ static int start_task_grid(unsigned iter)
 
 	/* FPRINTF(stderr, "start grid %d ni %d...\n", iter, ni); */
 
-	for (i = 0; i < ni; i++) {
+	for (i = 0; i < ni; i++)
+	{
 		ret = starpu_task_submit(tasks[iter][i]);
 		if (ret == -ENODEV) return 77;
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
@@ -161,7 +162,8 @@ int main(int argc STARPU_ATTRIBUTE_UNUSED , char **argv STARPU_ATTRIBUTE_UNUSED)
 	FPRINTF(stderr, "TEST DONE ...\n");
 
 enodev:
-	for (i = 0; i < Nrolls; i++) {
+	for (i = 0; i < Nrolls; i++)
+	{
 		for (j = 0; j < ni; j++)
 			starpu_task_destroy(tasks[i][j]);
 		free(tasks[i]);

+ 2 - 1
src/datawizard/coherency.h

@@ -101,7 +101,8 @@ struct _starpu_task_wrapper_list
 };
 
 /* This structure describes a doubly-linked list of task */
-struct _starpu_task_wrapper_dlist {
+struct _starpu_task_wrapper_dlist
+{
 	struct starpu_task *task;
 	struct _starpu_task_wrapper_dlist *next;
 	struct _starpu_task_wrapper_dlist *prev;

+ 2 - 3
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2014  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  * Copyright (C) 2011-2012  INRIA
  *
@@ -793,7 +793,7 @@ static double _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned
 	starpu_task_set_implementation(task, selected_impl);
 
 	if(!simulate)
-	{	
+	{
 		/* we should now have the best worker in variable "best" */
 		return push_task_on_best_worker(task, best, model_best, transfer_model_best, prio, sched_ctx_id);
 	}
@@ -801,7 +801,6 @@ static double _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned
 	{
 //		double max_len = (max_exp_end - starpu_timing_now());
 		/* printf("%d: dmda max_exp_end %lf best_exp_end %lf max_len %lf \n", sched_ctx_id, max_exp_end/1000000.0, best_exp_end/1000000.0, max_len/1000000.0);	 */
-	
 		return exp_end[best_in_ctx][selected_impl] ;
 	}
 }

+ 9 - 9
src/sched_policies/locality_work_stealing_policy.c

@@ -52,7 +52,7 @@ static unsigned select_victim_neighborhood(unsigned sched_ctx_id, int workerid)
 	{
 		neighbor = ws->proxlist[workerid][i];
 		int ntasks = ws->queue_array[neighbor]->ntasks;
-		
+
 		if (ntasks)
 			return neighbor;
 	}
@@ -162,7 +162,7 @@ static struct starpu_task *lws_pop_task(unsigned sched_ctx_id)
 
 	/* Note: Releasing this mutex before taking the victim mutex, to avoid interlock*/
 	STARPU_PTHREAD_MUTEX_UNLOCK(worker_sched_mutex);
-       
+
 
 	/* we need to steal someone's job */
 	unsigned victim = select_victim(sched_ctx_id, workerid);
@@ -210,14 +210,14 @@ static int lws_push_task(struct starpu_task *task)
 
 	/* int workerid = starpu_worker_get_id(); */
 	/* print_neighborhood(sched_ctx_id, 0); */
-	
+
 	starpu_pthread_mutex_t *sched_mutex;
 	starpu_pthread_cond_t *sched_cond;
 	starpu_worker_get_sched_condition(workerid, &sched_mutex, &sched_cond);
 	STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
 
 	_starpu_fifo_push_task(ws->queue_array[workerid], task);
-	
+
 	starpu_push_task_end(task);
 
 	STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);
@@ -238,7 +238,7 @@ static int lws_push_task(struct starpu_task *task)
 #endif
 
 
-	
+
 	return 0;
 }
 
@@ -277,7 +277,7 @@ static void lws_add_workers(unsigned sched_ctx_id, int *workerids,unsigned nwork
 		workerid = workerids[i];
 		ws->proxlist[workerid] = (int*)malloc(nworkers*sizeof(int));
 		int bindid;
-		
+
 		struct starpu_tree *neighbour = NULL;
 		struct starpu_sched_ctx_iterator it;
 
@@ -304,9 +304,9 @@ static void lws_add_workers(unsigned sched_ctx_id, int *workerids,unsigned nwork
 				break;
 			it.value = it.possible_value;
 			it.possible_value = NULL;
-		} 
+		}
 	}
-#endif	
+#endif
 }
 
 static void lws_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned nworkers)
@@ -345,7 +345,7 @@ static void lws_initialize_policy(unsigned sched_ctx_id)
 	ws->queue_array = (struct _starpu_fifo_taskq**)malloc(nw*sizeof(struct _starpu_fifo_taskq*));
 
 }
-	
+
 static void lws_deinit_policy(unsigned sched_ctx_id)
 {
 	struct _starpu_lws_data *ws = (struct _starpu_lws_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);

+ 6 - 3
src/util/openmp_runtime_support.c

@@ -71,16 +71,19 @@ struct starpu_omp_task *_starpu_omp_get_task(void)
 	return task;
 }
 
-static void weak_task_lock(struct starpu_omp_task *task) {
+static void weak_task_lock(struct starpu_omp_task *task)
+{
 	_starpu_spin_lock(&task->lock);
-	while (task->transaction_pending) {
+	while (task->transaction_pending)
+	{
 		_starpu_spin_unlock(&task->lock);
 		STARPU_UYIELD();
 		_starpu_spin_lock(&task->lock);
 	}
 }
 
-static void weak_task_unlock(struct starpu_omp_task *task) {
+static void weak_task_unlock(struct starpu_omp_task *task)
+{
 	_starpu_spin_unlock(&task->lock);
 }
 

+ 9 - 9
tests/datawizard/double_parameter.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011  Université de Bordeaux
- * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013, 2015  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
@@ -34,7 +34,7 @@ static struct starpu_codelet codelet_R_R =
 static struct starpu_codelet codelet_R_W =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_R, STARPU_W}
@@ -43,7 +43,7 @@ static struct starpu_codelet codelet_R_W =
 static struct starpu_codelet codelet_R_RW =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_R, STARPU_RW}
@@ -52,7 +52,7 @@ static struct starpu_codelet codelet_R_RW =
 static struct starpu_codelet codelet_W_R =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_W, STARPU_R}
@@ -61,7 +61,7 @@ static struct starpu_codelet codelet_W_R =
 static struct starpu_codelet codelet_W_W =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_W, STARPU_W}
@@ -70,7 +70,7 @@ static struct starpu_codelet codelet_W_W =
 static struct starpu_codelet codelet_W_RW =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_W, STARPU_RW}
@@ -79,7 +79,7 @@ static struct starpu_codelet codelet_W_RW =
 static struct starpu_codelet codelet_RW_R =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_RW, STARPU_R}
@@ -88,7 +88,7 @@ static struct starpu_codelet codelet_RW_R =
 static struct starpu_codelet codelet_RW_W =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_RW, STARPU_W}
@@ -97,7 +97,7 @@ static struct starpu_codelet codelet_RW_W =
 static struct starpu_codelet codelet_RW_RW =
 {
         .cpu_funcs = { dummy_func },
-		.cpu_funcs_name = {"dummy_func"},
+	.cpu_funcs_name = {"dummy_func"},
         .model = NULL,
         .nbuffers = 2,
 	.modes = {STARPU_RW, STARPU_RW}

+ 3 - 2
tests/datawizard/interfaces/bcsr/bcsr_interface.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  Centre National de la Recherche Scientifique
  * Copyright (C) 2011, 2012  inria
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -53,7 +53,8 @@ extern void test_bcsr_opencl_func(void *buffers[], void *args);
 #endif /* !STARPU_USE_OPENCL */
 
 
-static int nzval[NZVAL_SIZE]  = {
+static int nzval[NZVAL_SIZE]  =
+{
 	0, 1, 2, 3,    /* Fisrt block  */
 	4, 5, 6, 7,    /* Second block */
 	8, 9, 10, 11   /* Third block  */

+ 5 - 3
tests/main/pause_resume.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2011, 2013-2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015  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
@@ -80,14 +80,16 @@ int main(int argc, char **argv)
 	 * is any overhead associated with the pause/resume calls.
 	 */
 	starpu_pause();
-	for (i = 0; i < ntasks; i++) {
+	for (i = 0; i < ntasks; i++)
+	{
 		ret = starpu_task_insert(&dummy_codelet, 0);
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
 	}
 	starpu_resume();
 
 	start = starpu_timing_now();
-	for (i = 0; i < 100; i++) {
+	for (i = 0; i < 100; i++)
+	{
 		starpu_pause();
 		starpu_resume();
 	}

+ 2 - 1
tests/openmp/array_slice_01.c

@@ -221,7 +221,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	(void)argc;
 	(void)argv;
 	struct starpu_omp_parallel_region_attr attr;

+ 2 - 1
tests/openmp/cuda_task_01.c

@@ -161,7 +161,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	(void)argc;
 	(void)argv;
 	struct starpu_omp_parallel_region_attr attr;

+ 2 - 1
tests/openmp/environment.c

@@ -26,7 +26,8 @@ int main(int argc, char **argv)
 }
 #else
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	setenv("OMP_DYNAMIC","false", 1);
 	setenv("OMP_NESTED","false", 1);
 	setenv("OMP_SCHEDULE","auto", 1);

+ 2 - 1
tests/openmp/init_exit_01.c

@@ -25,7 +25,8 @@ int main(int argc, char **argv)
 }
 #else
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	int ret = starpu_omp_init();
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_omp_init");
 	starpu_omp_shutdown();

+ 2 - 1
tests/openmp/init_exit_02.c

@@ -38,7 +38,8 @@ static void omp_destructor(void)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	return 0;
 }
 #endif

+ 2 - 1
tests/openmp/parallel_01.c

@@ -50,7 +50,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/parallel_02.c

@@ -67,7 +67,8 @@ void parallel_region_1_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_1_f;

+ 2 - 1
tests/openmp/parallel_03.c

@@ -50,7 +50,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/parallel_barrier_01.c

@@ -57,7 +57,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	pthread_t tid;
 	struct starpu_omp_parallel_region_attr attr;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_critical_01.c

@@ -65,7 +65,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_critical_inline_01.c

@@ -68,7 +68,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_critical_named_01.c

@@ -75,7 +75,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_critical_named_inline_01.c

@@ -68,7 +68,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_for_01.c

@@ -148,7 +148,8 @@ static void check_array(void)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 
 	memset(&attr, 0, sizeof(attr));

+ 2 - 1
tests/openmp/parallel_for_02.c

@@ -78,7 +78,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/parallel_for_ordered_01.c

@@ -166,7 +166,8 @@ static void check_array(void)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 
 	memset(&attr, 0, sizeof(attr));

+ 2 - 1
tests/openmp/parallel_master_01.c

@@ -65,7 +65,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_master_inline_01.c

@@ -59,7 +59,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_nested_lock_01.c

@@ -99,7 +99,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_sections_01.c

@@ -94,7 +94,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/parallel_sections_combined_01.c

@@ -88,7 +88,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/parallel_simple_lock_01.c

@@ -89,7 +89,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_single_copyprivate_01.c

@@ -73,7 +73,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_single_copyprivate_inline_01.c

@@ -70,7 +70,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_single_inline_01.c

@@ -76,7 +76,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_single_nowait_01.c

@@ -65,7 +65,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/parallel_single_wait_01.c

@@ -65,7 +65,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	pthread_t tid;
 	tid = pthread_self();

+ 2 - 1
tests/openmp/task_01.c

@@ -75,7 +75,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/task_02.c

@@ -183,7 +183,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 
 	memset(&attr, 0, sizeof(attr));

+ 2 - 1
tests/openmp/taskgroup_01.c

@@ -107,7 +107,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/taskgroup_02.c

@@ -111,7 +111,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 2 - 1
tests/openmp/taskwait_01.c

@@ -93,7 +93,8 @@ void parallel_region_f(void *buffers[], void *args)
 }
 
 int
-main (int argc, char *argv[]) {
+main (int argc, char *argv[])
+{
 	struct starpu_omp_parallel_region_attr attr;
 	memset(&attr, 0, sizeof(attr));
 	attr.cl.cpu_funcs[0] = parallel_region_f;

+ 1 - 1
tools/dev/experimental/modes/fix_cocci_output_test.c

@@ -14,7 +14,7 @@ foo(void)
 	struct starpu_codelet cl =
 	{
 		.where = STARPU_CPU,
-		/* .modes = STARPU_R, STARPU_RW, STARPU_W } */
+		/* .modes = { STARPU_R, STARPU_RW, STARPU_W } */
 		.modes[2] = STARPU_W,
 		.modes[1] = STARPU_RW,
 		.modes[0] = STARPU_R