|
@@ -68,36 +68,36 @@ struct starpu_machine_topology_s {
|
|
* field of the starpu_conf structure passed to the starpu_init function. */
|
|
* field of the starpu_conf structure passed to the starpu_init function. */
|
|
struct starpu_sched_policy_s {
|
|
struct starpu_sched_policy_s {
|
|
/* Initialize the scheduling policy. */
|
|
/* Initialize the scheduling policy. */
|
|
- void (*init_sched)(unsigned);
|
|
|
|
|
|
+ void (*init_sched)(unsigned ctx_id);
|
|
|
|
|
|
/* Initialize the scheduling policy only for certain workers. */
|
|
/* Initialize the scheduling policy only for certain workers. */
|
|
- void (*init_sched_for_workers)(unsigned, unsigned);
|
|
|
|
|
|
+ void (*init_sched_for_workers)(unsigned ctx_id, unsigned n_added_workers);
|
|
|
|
|
|
/* Cleanup the scheduling policy. */
|
|
/* Cleanup the scheduling policy. */
|
|
- void (*deinit_sched)(unsigned);
|
|
|
|
|
|
+ void (*deinit_sched)(unsigned ctx_id);
|
|
|
|
|
|
/* Insert a task into the scheduler. */
|
|
/* Insert a task into the scheduler. */
|
|
- int (*push_task)(struct starpu_task *, unsigned);
|
|
|
|
|
|
+ int (*push_task)(struct starpu_task *, unsigned ctx_id);
|
|
/* Notify the scheduler that a task was directly pushed to the worker
|
|
/* Notify the scheduler that a task was directly pushed to the worker
|
|
* without going through the scheduler. This method is called when a
|
|
* without going through the scheduler. This method is called when a
|
|
* task is explicitely assigned to a worker. This method therefore
|
|
* task is explicitely assigned to a worker. This method therefore
|
|
* permits to keep the timing state of the scheduler coherent even
|
|
* permits to keep the timing state of the scheduler coherent even
|
|
* when StarPU bypasses the scheduling strategy. */
|
|
* when StarPU bypasses the scheduling strategy. */
|
|
- void (*push_task_notify)(struct starpu_task *, int workerid, unsigned);
|
|
|
|
|
|
+ void (*push_task_notify)(struct starpu_task *, int workerid, unsigned ctx_id);
|
|
|
|
|
|
|
|
|
|
/* Get a task from the scheduler. The mutex associated to the worker is
|
|
/* Get a task from the scheduler. The mutex associated to the worker is
|
|
* already taken when this method is called. */
|
|
* already taken when this method is called. */
|
|
- struct starpu_task *(*pop_task)(unsigned);
|
|
|
|
|
|
+ struct starpu_task *(*pop_task)(unsigned ctx_id);
|
|
|
|
|
|
/* Remove all available tasks from the scheduler (tasks are chained by
|
|
/* Remove all available tasks from the scheduler (tasks are chained by
|
|
* the means of the prev and next fields of the starpu_task
|
|
* the means of the prev and next fields of the starpu_task
|
|
* structure). The mutex associated to the worker is already taken
|
|
* structure). The mutex associated to the worker is already taken
|
|
* when this method is called. */
|
|
* when this method is called. */
|
|
- struct starpu_task *(*pop_every_task)(unsigned);
|
|
|
|
|
|
+ struct starpu_task *(*pop_every_task)(unsigned ctx_id);
|
|
|
|
|
|
/* This method is called every time a task has been executed. (optionnal) */
|
|
/* This method is called every time a task has been executed. (optionnal) */
|
|
- void (*post_exec_hook)(struct starpu_task *, unsigned);
|
|
|
|
|
|
+ void (*post_exec_hook)(struct starpu_task *, unsigned ctx_id);
|
|
|
|
|
|
/* Name of the policy (optionnal) */
|
|
/* Name of the policy (optionnal) */
|
|
const char *policy_name;
|
|
const char *policy_name;
|