task_bundle.h File Reference
`#include <starpu_thread.h>`

Go to the source code of this file.

## Data Structures

struct | _starpu_task_bundle_entry
struct | _starpu_task_bundle
struct | _starpu_handle_list

## Functions

void | _starpu_task_bundle_destroy (starpu_task_bundle_t bundle)
void | _starpu_insertion_handle_sorted (struct _starpu_handle_list **listp, starpu_data_handle_t handle, enum starpu_data_access_mode mode)

## Data Structure Documentation

## _starpu_task_bundle_entry

struct _starpu_task_bundle_entry

struct _starpu_task_bundle_entry ================================ Purpose ======= Structure used to describe a linked list containing tasks in _starpu_task_bundle.

Fields ====== task Pointer to the task structure.

next Pointer to the next element in the linked list.

Data Fields
struct starpu_task * | task |
struct _starpu_task_bundle_entry * | next |

## _starpu_task_bundle

struct _starpu_task_bundle

struct _starpu_task_bundle ========================== Purpose ======= 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.

Fields ====== mutex Mutex protecting the structure.

list Array of tasks included in the bundle.

closed Used to know if the user is still willing to add/remove some tasks in the bundle. Especially useful for the runtime to know whether it is safe to destroy a bundle.

Data Fields
starpu_pthread_mutex_t | mutex | Mutex protecting the bundle
struct _starpu_task_bundle_entry * | list |
int | closed |

## _starpu_handle_list

struct _starpu_handle_list

struct _starpu_handle_list ========================== Purpose ======= Structure describing a list of handles sorted by address to speed-up when looking for an element. The list cannot containes duplicate handles.

Fields ====== handle Pointer to the handle structure.

access_mode Total access mode over the whole bundle.

next Pointer to the next element in the linked list.

Data Fields
starpu_data_handle_t | handle |
enum starpu_data_access_mode | mode |
struct _starpu_handle_list * | next |

## Function Documentation

## _starpu_task_bundle_destroy()

void _starpu_task_bundle_destroy | ( | starpu_task_bundle_t | bundle | ) |

_starpu_task_bundle_destroy ========================== Purpose ======= Destroy and deinitialize a bundle, memory previoulsy allocated is freed.

Arguments ========= bundle (input) Bundle to destroy.

## _starpu_insertion_handle_sorted()

void _starpu_insertion_handle_sorted | ( | struct _starpu_handle_list ** | listp,
|  | starpu_data_handle_t | handle,
|  | enum starpu_data_access_mode | mode
| ) |  |

_starpu_insertion_handle_sorted ======================== Purpose ======= Insert an handle in a _starpu_handle_list, elements are sorted in increasing order, considering their physical address. As the list doesn't accept duplicate elements, a handle with the same address as an handle contained in the list is not inserted, but its mode access is merged with the one of the latter.

Arguments ========= listp (input, output) Pointer to the first element of the list. In the case of an empty list or an inserted handle with small address, it should have changed when the call returns.

handle (input) Handle to insert in the list.

mode (input) Access mode of the handle.