Browse Source

examples: fix signed-ness

Nathalie Furmento 12 years ago
parent
commit
6100f10c94
2 changed files with 6 additions and 6 deletions
  1. 3 3
      examples/sched_ctx_utils/sched_ctx_utils.c
  2. 3 3
      examples/spmd/vector_scal_spmd.c

+ 3 - 3
examples/sched_ctx_utils/sched_ctx_utils.c

@@ -204,13 +204,13 @@ void start_2ndbench(void (*bench)(unsigned, unsigned))
 
 void construct_contexts(void (*bench)(unsigned, unsigned))
 {
-	int nprocs1 = cpu1 + gpu + gpu1;
-	int nprocs2 = cpu2 + gpu + gpu2;
+	unsigned nprocs1 = cpu1 + gpu + gpu1;
+	unsigned nprocs2 = cpu2 + gpu + gpu2;
 	unsigned n_all_gpus = gpu + gpu1 + gpu2;
 
 
 	int procs[nprocs1];
-	int i;
+	unsigned i;
 	int k = 0;
 
 	for(i = 0; i < gpu; i++)

+ 3 - 3
examples/spmd/vector_scal_spmd.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) 2010-2013  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -43,10 +43,10 @@ static int get_first_element_rank(int nel, int rank, int nb_workers)
 
 void scal_cpu_func(void *buffers[], void *_args)
 {
-	unsigned i;
+	int i;
 	float *factor = _args, f = *factor;
 	struct starpu_vector_interface *vector = buffers[0];
-	unsigned n = STARPU_VECTOR_GET_NX(vector);
+	int n = STARPU_VECTOR_GET_NX(vector);
 	float *val = (float *)STARPU_VECTOR_GET_PTR(vector);
 
 	int nb_workers = starpu_combined_worker_get_size();