瀏覽代碼

Drop unused mask parameter of _starpu_fetch_task_input and _starpu_push_task_output

Samuel Thibault 11 年之前
父節點
當前提交
5ec6f8b8a7

+ 4 - 4
src/datawizard/coherency.c

@@ -687,7 +687,7 @@ static struct _starpu_data_replicate *get_replicate(starpu_data_handle_t handle,
 		return &handle->per_node[node];
 }
 
-int _starpu_fetch_task_input(struct _starpu_job *j, uint32_t mask)
+int _starpu_fetch_task_input(struct _starpu_job *j)
 {
 	_STARPU_TRACE_START_FETCH_INPUT(NULL);
 
@@ -793,13 +793,13 @@ enomem:
 
 		local_replicate = get_replicate(handle, mode, workerid, node);
 
-		_starpu_release_data_on_node(handle, mask, local_replicate);
+		_starpu_release_data_on_node(handle, 0, local_replicate);
 	}
 
 	return -1;
 }
 
-void _starpu_push_task_output(struct _starpu_job *j, uint32_t mask)
+void _starpu_push_task_output(struct _starpu_job *j)
 {
 	_STARPU_TRACE_START_PUSH_OUTPUT(NULL);
 
@@ -839,7 +839,7 @@ void _starpu_push_task_output(struct _starpu_job *j, uint32_t mask)
 		handle->busy_count++;
 		_starpu_spin_unlock(&handle->header_lock);
 
-		_starpu_release_data_on_node(handle, mask, local_replicate);
+		_starpu_release_data_on_node(handle, 0, local_replicate);
 	}
 
 	if (profiling && task->profiling_info)

+ 3 - 3
src/datawizard/coherency.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2013  Université de Bordeaux 1
+ * Copyright (C) 2009-2014  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -248,10 +248,10 @@ size_t _starpu_data_get_size(starpu_data_handle_t handle);
 
 uint32_t _starpu_data_get_footprint(starpu_data_handle_t handle);
 
-void _starpu_push_task_output(struct _starpu_job *j, uint32_t mask);
+void _starpu_push_task_output(struct _starpu_job *j);
 
 STARPU_ATTRIBUTE_WARN_UNUSED_RESULT
-int _starpu_fetch_task_input(struct _starpu_job *j, uint32_t mask);
+int _starpu_fetch_task_input(struct _starpu_job *j);
 
 unsigned _starpu_is_data_present_or_requested(struct _starpu_data_state *state, unsigned node);
 

+ 2 - 2
src/drivers/cpu/driver_cpu.c

@@ -126,7 +126,7 @@ static int execute_job_on_cpu(struct _starpu_job *j, struct starpu_task *worker_
 
 	if (rank == 0)
 	{
-		ret = _starpu_fetch_task_input(j, 0);
+		ret = _starpu_fetch_task_input(j);
 		if (ret != 0)
 		{
 			/* there was not enough memory so the codelet cannot be executed right now ... */
@@ -178,7 +178,7 @@ static int execute_job_on_cpu(struct _starpu_job *j, struct starpu_task *worker_
 	{
 		_starpu_driver_update_job_feedback(j, cpu_args,
 				perf_arch, &codelet_start, &codelet_end, profiling);
-		_starpu_push_task_output(j, 0);
+		_starpu_push_task_output(j);
 	}
 
 	return 0;

+ 2 - 3
src/drivers/cuda/driver_cuda.c

@@ -330,7 +330,6 @@ void _starpu_init_cuda(void)
 static int execute_job_on_cuda(struct _starpu_job *j, struct _starpu_worker *args)
 {
 	int ret;
-	uint32_t mask = 0;
 
 	STARPU_ASSERT(j);
 	struct starpu_task *task = j->task;
@@ -343,7 +342,7 @@ static int execute_job_on_cuda(struct _starpu_job *j, struct _starpu_worker *arg
 	struct starpu_codelet *cl = task->cl;
 	STARPU_ASSERT(cl);
 
-	ret = _starpu_fetch_task_input(j, mask);
+	ret = _starpu_fetch_task_input(j);
 	if (ret != 0)
 	{
 		/* there was not enough memory, so the input of
@@ -375,7 +374,7 @@ static int execute_job_on_cuda(struct _starpu_job *j, struct _starpu_worker *arg
 
 	_starpu_driver_update_job_feedback(j, args, &args->perf_arch, &codelet_start, &codelet_end, profiling);
 
-	_starpu_push_task_output(j, mask);
+	_starpu_push_task_output(j);
 
 	return 0;
 }

+ 5 - 5
src/drivers/gordon/driver_gordon.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2013  Université de Bordeaux 1
+ * Copyright (C) 2009-2014  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
@@ -175,7 +175,7 @@ static struct gordon_task_wrapper_s *starpu_to_gordon_job(struct _starpu_job *j)
 
 static void handle_terminated_job(struct _starpu_job *j)
 {
-	_starpu_push_task_output(j, 0);
+	_starpu_push_task_output(j);
 	_starpu_handle_job_termination(j);
 	starpu_wake_all_blocked_workers();
 }
@@ -215,7 +215,7 @@ static void gordon_callback_list_func(void *arg)
 		}
 #endif
 
-		_starpu_push_task_output(j, 0);
+		_starpu_push_task_output(j);
 		_starpu_handle_job_termination(j);
 		//starpu_wake_all_blocked_workers();
 
@@ -253,7 +253,7 @@ static void gordon_callback_func(void *arg)
 int inject_task(struct _starpu_job *j, struct _starpu_worker *worker)
 {
 	struct starpu_task *task = j->task;
-	int ret = _starpu_fetch_task_input(j, 0);
+	int ret = _starpu_fetch_task_input(j);
 
 	if (ret != 0)
 	{
@@ -316,7 +316,7 @@ int inject_task_list(struct _starpu_job_list *list, struct _starpu_worker *worke
 		int ret;
 
 		struct starpu_task *task = j->task;
-		ret = _starpu_fetch_task_input(j, 0);
+		ret = _starpu_fetch_task_input(j);
 		STARPU_ASSERT(!ret);
 
 		_starpu_sched_pre_exec_hook(task);

+ 2 - 4
src/drivers/mp_common/source_common.c

@@ -31,7 +31,6 @@
 /* Finalize the execution of a task by a worker*/
 static int _starpu_src_common_finalize_job (struct _starpu_job *j, struct _starpu_worker *worker) 
 {
-	uint32_t mask = 0;
 	int profiling = starpu_profiling_status_get();
 	struct timespec codelet_end;
 	_starpu_driver_end_job(worker, j, &worker->perf_arch, &codelet_end, 0,
@@ -59,7 +58,7 @@ static int _starpu_src_common_finalize_job (struct _starpu_job *j, struct _starp
 				&j->cl_start, &codelet_end,
 				profiling);
 
-		_starpu_push_task_output (j, mask);
+		_starpu_push_task_output (j);
 
 		_starpu_handle_job_termination(j);
 	}
@@ -401,7 +400,6 @@ static int _starpu_src_common_execute(struct _starpu_job *j,
 		struct _starpu_mp_node * node)
 {
 	int ret;
-	uint32_t mask = 0;
 
 	STARPU_ASSERT(j);
 	struct starpu_task *task = j->task;
@@ -411,7 +409,7 @@ static int _starpu_src_common_execute(struct _starpu_job *j,
 	STARPU_ASSERT(task);
 	if (worker->current_rank == 0) 
 	{
-		ret = _starpu_fetch_task_input(j, mask);
+		ret = _starpu_fetch_task_input(j);
 		if (ret != 0)
 		{
 			/* there was not enough memory, so the input of

+ 2 - 3
src/drivers/opencl/driver_opencl.c

@@ -737,7 +737,6 @@ cl_device_type _starpu_opencl_get_device_type(int devid)
 static int _starpu_opencl_execute_job(struct _starpu_job *j, struct _starpu_worker *args)
 {
 	int ret;
-	uint32_t mask = 0;
 
 	STARPU_ASSERT(j);
 	struct starpu_task *task = j->task;
@@ -749,7 +748,7 @@ static int _starpu_opencl_execute_job(struct _starpu_job *j, struct _starpu_work
 	struct starpu_codelet *cl = task->cl;
 	STARPU_ASSERT(cl);
 
-	ret = _starpu_fetch_task_input(j, mask);
+	ret = _starpu_fetch_task_input(j);
 	if (ret != 0)
 	{
 		/* there was not enough memory, so the input of
@@ -791,7 +790,7 @@ static int _starpu_opencl_execute_job(struct _starpu_job *j, struct _starpu_work
 	_starpu_driver_update_job_feedback(j, args, &args->perf_arch,
 					   &codelet_start, &codelet_end, profiling);
 
-	_starpu_push_task_output(j, mask);
+	_starpu_push_task_output(j);
 
 	return EXIT_SUCCESS;
 }