|
@@ -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));
|