Task Bundles

## Typedefs

typedef struct _starpu_task_bundle * | starpu_task_bundle_t

## Functions

void | starpu_task_bundle_create (starpu_task_bundle_t *bundle)
int | starpu_task_bundle_insert (starpu_task_bundle_t bundle, struct starpu_task *task)
int | starpu_task_bundle_remove (starpu_task_bundle_t bundle, struct starpu_task *task)
void | starpu_task_bundle_close (starpu_task_bundle_t bundle)
double | starpu_task_bundle_expected_length (starpu_task_bundle_t bundle, struct starpu_perfmodel_arch *arch, unsigned nimpl)
double | starpu_task_bundle_expected_data_transfer_time (starpu_task_bundle_t bundle, unsigned memory_node)
double | starpu_task_bundle_expected_energy (starpu_task_bundle_t bundle, struct starpu_perfmodel_arch *arch, unsigned nimpl)

## Detailed Description

## Typedef Documentation

## starpu_task_bundle_t

typedef struct _starpu_task_bundle* starpu_task_bundle_t

Opaque structure describing a list of tasks that should be scheduled on the same worker whenever it’s possible. It must be considered as a hint given to the scheduler as there is no guarantee that they will be executed on the same worker.

## Function Documentation

## starpu_task_bundle_create()

void starpu_task_bundle_create | ( | starpu_task_bundle_t * | bundle | ) |

Factory function creating and initializing `bundle`, when the call returns, memory needed is allocated and `bundle` is ready to use.

## starpu_task_bundle_insert()

int starpu_task_bundle_insert | ( | starpu_task_bundle_t | bundle,
|  | struct starpu_task * | task
| ) |  |

Insert `task` in `bundle`. Until `task` is removed from `bundle` its expected length and data transfer time will be considered along those of the other tasks of bundle. This function must not be called if `bundle` is already closed and/or `task` is already submitted. On success, it returns 0. There are two cases of error : if `bundle` is already closed it returns `-EPERM`, if `task` was already submitted it returns `-EINVAL`.

## starpu_task_bundle_remove()

int starpu_task_bundle_remove | ( | starpu_task_bundle_t | bundle,
|  | struct starpu_task * | task
| ) |  |

Remove `task` from `bundle`. Of course `task` must have been previously inserted in `bundle`. This function must not be called if `bundle` is already closed and/or `task` is already submitted. Doing so would result in undefined behaviour. On success, it returns 0. If `bundle` is already closed it returns `-ENOENT`.

## starpu_task_bundle_close()

void starpu_task_bundle_close | ( | starpu_task_bundle_t | bundle | ) |

Inform the runtime that the user will not modify `bundle` anymore, it means no more inserting or removing task. Thus the runtime can destroy it when possible.

## starpu_task_bundle_expected_length()

double starpu_task_bundle_expected_length | ( | starpu_task_bundle_t | bundle,
|  | struct starpu_perfmodel_arch * | arch,
|  | unsigned | nimpl
| ) |  |

Return the expected duration of `bundle` in micro-seconds.

## starpu_task_bundle_expected_data_transfer_time()

double starpu_task_bundle_expected_data_transfer_time | ( | starpu_task_bundle_t | bundle,
|  | unsigned | memory_node
| ) |  |

Return the time (in micro-seconds) expected to transfer all data used within `bundle`.

## starpu_task_bundle_expected_energy()

double starpu_task_bundle_expected_energy | ( | starpu_task_bundle_t | bundle,
|  | struct starpu_perfmodel_arch * | arch,
|  | unsigned | nimpl
| ) |  |

Return the expected energy consumption of `bundle` in J.