Loading...
Searching...
No Matches
Parallel Tasks

## Functions

unsigned | starpu_combined_worker_get_count (void)
unsigned | starpu_worker_is_combined_worker (int id)
int | starpu_combined_worker_get_id (void)
int | starpu_combined_worker_get_size (void)
int | starpu_combined_worker_get_rank (void)
int | starpu_combined_worker_assign_workerid (int nworkers, int workerid_array[])
int | starpu_combined_worker_get_description (int workerid, int *worker_size, int **combined_workerid)
int | starpu_combined_worker_can_execute_task (unsigned workerid, struct starpu_task *task, unsigned nimpl)
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)

## Detailed Description

## Function Documentation

## starpu_combined_worker_get_count()

unsigned starpu_combined_worker_get_count | ( | void |  | ) |

Return the number of different combined workers. See Helper functions for defining a scheduling policy (Basic or modular) for more details.

## starpu_worker_is_combined_worker()

unsigned starpu_worker_is_combined_worker | ( | int | id | ) |

See Helper functions for defining a scheduling policy (Basic or modular) for more details.

## starpu_combined_worker_get_id()

int starpu_combined_worker_get_id | ( | void |  | ) |

Return the identifier of the current combined worker. See Helper functions for defining a scheduling policy (Basic or modular) for more details.

## starpu_combined_worker_get_size()

int starpu_combined_worker_get_size | ( | void |  | ) |

Return the size of the current combined worker, i.e. the total number of CPUS running the same task in the case of STARPU_SPMD parallel tasks, or the total number of threads that the task is allowed to start in the case of STARPU_FORKJOIN parallel tasks. See Fork-mode Parallel Tasks and SPMD-mode Parallel Tasks for more details.

## starpu_combined_worker_get_rank()

int starpu_combined_worker_get_rank | ( | void |  | ) |

Return the rank of the current thread within the combined worker. Can only be used in STARPU_SPMD parallel tasks, to know which part of the task to work on. See SPMD-mode Parallel Tasks for more details.

## starpu_combined_worker_assign_workerid()

int starpu_combined_worker_assign_workerid | ( | int | nworkers,
|  | int | workerid_array[]
| ) |  |

Register a new combined worker and get its identifier. See Helper functions for defining a scheduling policy (Basic or modular) for more details.

## starpu_combined_worker_get_description()

int starpu_combined_worker_get_description | ( | int | workerid,
|  | int * | worker_size,
|  | int ** | combined_workerid
| ) |  |

Get the description of a combined worker. See Helper functions for defining a scheduling policy (Basic or modular) for more details.

`workerid` is the requested combined worker id, `worker_size` returns the number of workers in the combined worker, `combined_workerid` returns the list for worker ids in the combined worker.

## starpu_combined_worker_can_execute_task()

int starpu_combined_worker_can_execute_task | ( | unsigned | workerid,
|  | struct starpu_task * | task,
|  | unsigned | nimpl
| ) |  |

Variant of starpu_worker_can_execute_task() compatible with combined workers. See Defining A New Basic Scheduling Policy for more details.

## starpu_parallel_task_barrier_init()

void starpu_parallel_task_barrier_init | ( | struct starpu_task * | task,
|  | int | workerid
| ) |  |

Initialise the barrier for the parallel task, and dispatch the task between the different workers of the given combined worker. See Helper functions for defining a scheduling policy (Basic or modular) for more details.

## starpu_parallel_task_barrier_init_n()

void starpu_parallel_task_barrier_init_n | ( | struct starpu_task * | task,
|  | int | worker_size
| ) |  |

Initialise the barrier for the parallel task, to be pushed to `worker_size` workers (without having to explicit a given combined worker). See Helper functions for defining a scheduling policy (Basic or modular) for more details.