Ver código fonte

fix build with icpc

Samuel Thibault 13 anos atrás
pai
commit
093df9884a

+ 1 - 1
examples/basic_examples/multiformat.c

@@ -33,7 +33,7 @@ multiformat_scal_cpu_func(void *buffers[], void *args)
 	struct point *aos;
 	unsigned int n, i;
 
-	aos = STARPU_MULTIFORMAT_GET_PTR(buffers[0]);
+	aos = (struct point *) STARPU_MULTIFORMAT_GET_PTR(buffers[0]);
 	n = STARPU_MULTIFORMAT_GET_NX(buffers[0]);
 
 	for (i = 0; i < n; i++)

+ 1 - 0
include/starpu_data.h

@@ -30,6 +30,7 @@ typedef struct _starpu_data_state* starpu_data_handle_t;
 
 enum starpu_access_mode
 {
+	STARPU_NONE=0,
 	STARPU_R=(1<<0),
 	STARPU_W=(1<<1),
 	STARPU_RW=(STARPU_R|STARPU_W),

+ 1 - 1
src/core/task.c

@@ -326,7 +326,7 @@ void _starpu_task_check_deprecated_fields(struct starpu_task *task)
 				task->cl->modes[i] = task->buffers[i].mode;
 			}
 			task->buffers[i].handle = NULL;
-			task->buffers[i].mode = 0;
+			task->buffers[i].mode = STARPU_NONE;
 		}
 	}
 }

+ 1 - 1
src/core/task_bundle.c

@@ -273,7 +273,7 @@ static void insertion_handle_sorted(struct handle_list **listp, starpu_data_hand
 	if (prev->handle == handle)
 	{
 		/* The handle is already in the list */
-		prev->mode |= mode;
+		prev->mode = (enum starpu_access_mode) ((int) prev->mode | (int) mode);
 	}
 	else
 	{

+ 2 - 2
src/datawizard/coherency.c

@@ -297,11 +297,11 @@ static struct _starpu_data_request *_starpu_search_existing_data_request(struct
 				replicate->handle->busy_count++;
 			}
 
-			r->mode |= STARPU_R;
+			r->mode = (enum starpu_access_mode) ((int) r->mode | (int) STARPU_R);
 		}
 
 		if (mode & STARPU_W)
-			r->mode |= STARPU_W;
+			r->mode = (enum starpu_access_mode) ((int) r->mode | (int)  STARPU_W);
 	}
 
 	return r;

+ 2 - 2
src/datawizard/interfaces/data_interface.c

@@ -461,7 +461,7 @@ static void _starpu_data_unregister(starpu_data_handle_t handle, unsigned cohere
 			_STARPU_DEBUG("Conversion needed\n");
 			void *buffers[1];
 			struct starpu_multiformat_interface *format_interface;
-			format_interface = starpu_data_get_interface_on_node(handle, 0);
+			format_interface = (struct starpu_multiformat_interface *) starpu_data_get_interface_on_node(handle, 0);
 			struct starpu_codelet *cl;
 			enum _starpu_node_kind node_kind = _starpu_get_node_kind(handle->mf_node);
 
@@ -566,7 +566,7 @@ void starpu_data_invalidate(starpu_data_handle_t handle)
 	starpu_data_release(handle);
 }
 
-unsigned starpu_get_handle_interface_id(starpu_data_handle_t handle)
+enum starpu_data_interface_id starpu_get_handle_interface_id(starpu_data_handle_t handle)
 {
 	return handle->ops->interfaceid;
 }

+ 6 - 6
src/datawizard/interfaces/multiformat_interface.c

@@ -102,7 +102,7 @@ static void *multiformat_handle_to_pointer(starpu_data_handle_t handle, uint32_t
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 	struct starpu_multiformat_interface *multiformat_interface =
-		starpu_data_get_interface_on_node(handle, node);
+		(struct starpu_multiformat_interface *) starpu_data_get_interface_on_node(handle, node);
 
 	switch(_starpu_get_node_kind(node))
 	{
@@ -130,7 +130,7 @@ static void register_multiformat_handle(starpu_data_handle_t handle, uint32_t ho
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
 		struct starpu_multiformat_interface *local_interface =
-			starpu_data_get_interface_on_node(handle, node);
+			(struct starpu_multiformat_interface *) starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node)
 		{
@@ -194,8 +194,8 @@ static uint32_t footprint_multiformat_interface_crc32(starpu_data_handle_t handl
 
 static int multiformat_compare(void *data_interface_a, void *data_interface_b)
 {
-	struct starpu_multiformat_interface *multiformat_a = data_interface_a;
-	struct starpu_multiformat_interface *multiformat_b = data_interface_b;
+	struct starpu_multiformat_interface *multiformat_a = (struct starpu_multiformat_interface *) data_interface_a;
+	struct starpu_multiformat_interface *multiformat_b = (struct starpu_multiformat_interface *) data_interface_b;
 
 	return ((multiformat_a->nx == multiformat_b->nx)
 			&& (multiformat_a->ops->cpu_elemsize == multiformat_b->ops->cpu_elemsize)
@@ -223,7 +223,7 @@ static size_t multiformat_interface_get_size(starpu_data_handle_t handle)
 {
 	size_t size;
 	struct starpu_multiformat_interface *multiformat_interface;
-	multiformat_interface = starpu_data_get_interface_on_node(handle, 0);
+	multiformat_interface = (struct starpu_multiformat_interface *) starpu_data_get_interface_on_node(handle, 0);
 	size = multiformat_interface->nx * multiformat_interface->ops->cpu_elemsize;
 	return size;
 }
@@ -231,7 +231,7 @@ static size_t multiformat_interface_get_size(starpu_data_handle_t handle)
 uint32_t starpu_multiformat_get_nx(starpu_data_handle_t handle)
 {
 	struct starpu_multiformat_interface *multiformat_interface;
-	multiformat_interface = starpu_data_get_interface_on_node(handle, 0);
+	multiformat_interface = (struct starpu_multiformat_interface *) starpu_data_get_interface_on_node(handle, 0);
 	return multiformat_interface->nx;
 }
 

+ 1 - 1
src/datawizard/user_interactions.c

@@ -32,7 +32,7 @@ int starpu_data_request_allocation(starpu_data_handle_t handle, uint32_t node)
 
 	STARPU_ASSERT(handle);
 
-	r = _starpu_create_data_request(handle, NULL, &handle->per_node[node], node, 0, 0, 0);
+	r = _starpu_create_data_request(handle, NULL, &handle->per_node[node], node, STARPU_NONE, 0, 0);
 
 	/* we do not increase the refcnt associated to the request since we are
 	 * not waiting for its termination */

+ 2 - 2
src/profiling/bound.c

@@ -181,7 +181,7 @@ static void new_task(struct _starpu_job *j)
 	t->tag_id = j->task->tag_id;
 	t->use_tag = j->task->use_tag;
 	t->cl = j->task->cl;
-	t->footprint = _starpu_compute_buffers_footprint(NULL, 0, 0, j);
+	t->footprint = _starpu_compute_buffers_footprint(NULL, STARPU_CPU_DEFAULT, 0, j);
 	t->priority = j->task->priority;
 	t->deps = NULL;
 	t->depsn = 0;
@@ -214,7 +214,7 @@ void _starpu_bound_record(struct _starpu_job *j)
 	{
 		struct bound_task_pool *tp;
 
-		_starpu_compute_buffers_footprint(NULL, 0, 0, j);
+		_starpu_compute_buffers_footprint(NULL, STARPU_CPU_DEFAULT, 0, j);
 
 		if (last && last->cl == j->task->cl && last->footprint == j->footprint)
 			tp = last;

+ 1 - 1
src/util/starpu_insert_task_utils.c

@@ -181,7 +181,7 @@ int _starpu_insert_task_create_and_submit(char *arg_buffer, struct starpu_codele
 			/* We have an access mode : we expect to find a handle */
 			starpu_data_handle_t handle = va_arg(varg_list, starpu_data_handle_t);
 
-			enum starpu_access_mode mode = arg_type;
+			enum starpu_access_mode mode = (enum starpu_access_mode) arg_type;
 
 			(*task)->handles[current_buffer] = handle;
 			if (cl->modes[current_buffer])

+ 1 - 1
tests/datawizard/in_place_partition.c

@@ -37,7 +37,7 @@ int main(int argc, char **argv)
 	n = starpu_worker_get_count();
 	size = 10 * n;
 
-	foo = calloc(size, sizeof(*foo));
+	foo = (unsigned *) calloc(size, sizeof(*foo));
 	for (i = 0; i < size; i++)
 		foo[i] = i;
 

+ 1 - 1
tests/datawizard/interfaces/multiformat/multiformat_interface.c

@@ -54,7 +54,7 @@ test_multiformat_cpu_func(void *buffers[], void *args)
 	unsigned int n, i;
 	int factor;
 
-	aos = STARPU_MULTIFORMAT_GET_PTR(buffers[0]);
+	aos = (struct point *) STARPU_MULTIFORMAT_GET_PTR(buffers[0]);
 	n = STARPU_MULTIFORMAT_GET_NX(buffers[0]);
 	factor = *(int *) args;
 

+ 2 - 2
tests/datawizard/interfaces/test_interfaces.c

@@ -50,7 +50,7 @@ enum exit_code
 };
 
 static char *
-enum_to_string(exit_code)
+enum_to_string(int exit_code)
 {
 	switch (exit_code)
 	{
@@ -580,7 +580,7 @@ run_sync(void)
 	struct starpu_data_copy_methods new_copy_methods;
 	struct starpu_data_copy_methods *old_copy_methods;
 
-	old_copy_methods = handle->ops->copy_methods;
+	old_copy_methods = (struct starpu_data_copy_methods *) handle->ops->copy_methods;
 
 	memcpy(&new_copy_methods,
 		old_copy_methods,

+ 1 - 1
tools/starpu_perfmodel_display.c

@@ -270,7 +270,7 @@ static void display_all_perf_models(struct starpu_perfmodel *model)
 
 			unsigned implid;
 			for (implid = 0; implid < STARPU_MAXIMPLEMENTATIONS; implid++)
-				display_perf_model(model, (enum starpu_perf_archtype) STARPU_CPU_DEFAULT + k - 1, implid);
+				display_perf_model(model, (enum starpu_perf_archtype) (STARPU_CPU_DEFAULT + k - 1), implid);
 			return;
 		}