|
@@ -1,6 +1,6 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
- * Copyright (C) 2010 Université de Bordeaux 1
|
|
|
+ * Copyright (C) 2010, 2014 Université de Bordeaux 1
|
|
|
*
|
|
|
* 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
|
|
@@ -34,16 +34,11 @@ struct starpu_task *starpu_task_dup(struct starpu_task *task)
|
|
|
return task_dup;
|
|
|
}
|
|
|
|
|
|
-void starpu_parallel_task_barrier_init(struct starpu_task* task, int workerid)
|
|
|
+void starpu_parallel_task_barrier_init_n(struct starpu_task* task, int worker_size)
|
|
|
{
|
|
|
- /* The master needs to dispatch the task between the
|
|
|
- * different combined workers */
|
|
|
- struct _starpu_combined_worker *combined_worker = _starpu_get_combined_worker_struct(workerid);
|
|
|
- int worker_size = combined_worker->worker_size;
|
|
|
-
|
|
|
struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
|
|
|
j->task_size = worker_size;
|
|
|
- j->combined_workerid = workerid;
|
|
|
+ j->combined_workerid = -1;
|
|
|
j->active_task_alias_count = 0;
|
|
|
|
|
|
//fprintf(stderr, "POP -> size %d best_size %d\n", worker_size, best_size);
|
|
@@ -54,3 +49,16 @@ void starpu_parallel_task_barrier_init(struct starpu_task* task, int workerid)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+void starpu_parallel_task_barrier_init(struct starpu_task* task, int workerid)
|
|
|
+{
|
|
|
+ /* The master needs to dispatch the task between the
|
|
|
+ * different combined workers */
|
|
|
+ struct _starpu_combined_worker *combined_worker = _starpu_get_combined_worker_struct(workerid);
|
|
|
+ int worker_size = combined_worker->worker_size;
|
|
|
+ struct _starpu_job *j = _starpu_get_job_associated_to_task(task);
|
|
|
+
|
|
|
+ starpu_parallel_task_barrier_init_n(task, worker_size);
|
|
|
+
|
|
|
+ j->combined_workerid = workerid;
|
|
|
+}
|
|
|
+
|