Browse Source

src: let's make icc happy

Nathalie Furmento 13 years ago
parent
commit
5908a48866

+ 2 - 1
src/core/jobs.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -26,6 +26,7 @@
 #include <profiling/profiling.h>
 #include <profiling/bound.h>
 #include <starpu_top.h>
+#include <top/starpu_top_core.h>
 
 size_t _starpu_job_get_data_size(struct starpu_perfmodel *model, enum starpu_perf_archtype arch, unsigned nimpl, struct _starpu_job *j)
 {

+ 7 - 7
src/core/perfmodel/perfmodel_bus.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  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
@@ -266,7 +266,7 @@ static void measure_bandwidth_between_host_and_dev_on_cpu_with_opencl(int dev, i
 	_starpu_bind_thread_on_cpu(config, cpu);
         /* Allocate a buffer on the host */
 	unsigned char *h_buffer;
-        h_buffer = malloc(size);
+        h_buffer = (unsigned char *)malloc(size);
 	STARPU_ASSERT(h_buffer);
 
 	/* hack to avoid third party libs to rebind threads */
@@ -319,8 +319,8 @@ static void measure_bandwidth_between_host_and_dev_on_cpu_with_opencl(int dev, i
 /* NB: we want to sort the bandwidth by DECREASING order */
 static int compar_dev_timing(const void *left_dev_timing, const void *right_dev_timing)
 {
-	const struct dev_timing *left = left_dev_timing;
-	const struct dev_timing *right = right_dev_timing;
+	const struct dev_timing *left = (const struct dev_timing *)left_dev_timing;
+	const struct dev_timing *right = (const struct dev_timing *)right_dev_timing;
 
 	double left_dtoh = left->timing_dtoh;
 	double left_htod = left->timing_htod;
@@ -376,13 +376,13 @@ static void measure_bandwidth_between_cpus_and_dev(int dev, struct dev_timing *d
 
 	if (!no_node_obj_was_found)
 	{
-		is_available_per_numa_node = malloc(nnuma_nodes * sizeof(unsigned));
+		is_available_per_numa_node = (unsigned *)malloc(nnuma_nodes * sizeof(unsigned));
 		STARPU_ASSERT(is_available_per_numa_node);
 
-		dev_timing_htod_per_numa_node = malloc(nnuma_nodes * sizeof(double));
+		dev_timing_htod_per_numa_node = (double *)malloc(nnuma_nodes * sizeof(double));
 		STARPU_ASSERT(dev_timing_htod_per_numa_node);
 
-		dev_timing_dtoh_per_numa_node = malloc(nnuma_nodes * sizeof(double));
+		dev_timing_dtoh_per_numa_node = (double *)malloc(nnuma_nodes * sizeof(double));
 		STARPU_ASSERT(dev_timing_dtoh_per_numa_node);
 
 		memset(is_available_per_numa_node, 0, nnuma_nodes*sizeof(unsigned));

+ 1 - 1
src/core/perfmodel/perfmodel_history.c

@@ -813,7 +813,7 @@ int starpu_load_history_debug(const char *symbol, struct starpu_perfmodel *model
 	res = access(path, F_OK);
 	if (res)
 	{
-		char *dot = strrchr(symbol, '.');
+		const char *dot = strrchr(symbol, '.');
 		if (dot)
 		{
 			char *symbol2 = strdup(symbol);

+ 4 - 2
src/core/sched_policy.c

@@ -402,6 +402,8 @@ struct starpu_task *_starpu_create_conversion_task(starpu_data_handle_t handle,
 struct starpu_task *_starpu_pop_task(struct _starpu_worker *worker)
 {
 	struct starpu_task *task;
+	int worker_id;
+	unsigned node;
 
 	/* We can't tell in advance which task will be picked up, so we measure
 	 * a timestamp, and will attribute it afterwards to the task. */
@@ -431,11 +433,11 @@ pick:
 	if (task->mf_skip)
 		goto profiling;
 
-	int worker_id = starpu_worker_get_id();
+	worker_id = starpu_worker_get_id();
 	if (!starpu_worker_can_execute_task(worker_id, task, 0))
 		return task;
 
-	unsigned node = starpu_worker_get_memory_node(worker_id);
+	node = starpu_worker_get_memory_node(worker_id);
 
 	/*
 	 * We do have a task that uses multiformat handles. Let's create the 

+ 3 - 3
src/core/topology.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  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
@@ -339,7 +339,7 @@ static int _starpu_init_machine_config(struct _starpu_machine_config *config,
 	{
 		config->workers[topology->nworkers + cudagpu].arch = STARPU_CUDA_WORKER;
 		int devid = _starpu_get_next_cuda_gpuid(config);
-		enum starpu_perf_archtype arch = STARPU_CUDA_DEFAULT + devid;
+		enum starpu_perf_archtype arch = (enum starpu_perf_archtype)((int)STARPU_CUDA_DEFAULT + devid);
 		config->workers[topology->nworkers + cudagpu].devid = devid;
 		config->workers[topology->nworkers + cudagpu].perf_arch = arch;
 		config->workers[topology->nworkers + cudagpu].worker_mask = STARPU_CUDA;
@@ -412,7 +412,7 @@ static int _starpu_init_machine_config(struct _starpu_machine_config *config,
 			break;
 		}
 		config->workers[topology->nworkers + openclgpu].arch = STARPU_OPENCL_WORKER;
-		enum starpu_perf_archtype arch = STARPU_OPENCL_DEFAULT + devid;
+		enum starpu_perf_archtype arch = (enum starpu_perf_archtype)((int)STARPU_OPENCL_DEFAULT + devid);
 		config->workers[topology->nworkers + openclgpu].devid = devid;
 		config->workers[topology->nworkers + openclgpu].perf_arch = arch;
 		config->workers[topology->nworkers + openclgpu].worker_mask = STARPU_OPENCL;