jobs.h File Reference
`#include <starpu.h>`
`#include <semaphore.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <stdint.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include <common/config.h>`
`#include <common/timing.h>`
`#include <common/list.h>`
`#include <common/fxt.h>`
`#include <core/dependencies/tags.h>`
`#include <datawizard/datawizard.h>`
`#include <core/perfmodel/perfmodel.h>`
`#include <core/errorcheck.h>`
`#include <common/barrier.h>`
`#include <common/utils.h>`
`#include <cuda.h>`

Go to the source code of this file.

## Data Structures

struct | _starpu_data_descr
struct | _starpu_job

## Macros

#define | _STARPU_CPU_MAY_PERFORM(j)
#define | _STARPU_CUDA_MAY_PERFORM(j)
#define | _STARPU_OPENCL_MAY_PERFORM(j)
#define | _STARPU_MIC_MAY_PERFORM(j)
#define | _STARPU_JOB_GET_ORDERED_BUFFER_INDEX(job, i)
#define | _STARPU_JOB_GET_ORDERED_BUFFER_HANDLE(job, i)
#define | _STARPU_JOB_GET_ORDERED_BUFFER_MODE(job, i)
#define | _STARPU_JOB_GET_ORDERED_BUFFER_NODE(job, i)
#define | _STARPU_JOB_SET_ORDERED_BUFFER_INDEX(job, __index, i)
#define | _STARPU_JOB_SET_ORDERED_BUFFER_HANDLE(job, __handle, i)
#define | _STARPU_JOB_SET_ORDERED_BUFFER_MODE(job, __mode, i)
#define | _STARPU_JOB_SET_ORDERED_BUFFER_NODE(job, __node, i)
#define | _STARPU_JOB_SET_ORDERED_BUFFER(job, buffer, i)
#define | _STARPU_JOB_GET_ORDERED_BUFFERS(job)
#define | _STARPU_JOB_GET_DEP_SLOTS(job)

## Typedefs

typedef void(* | _starpu_cl_func_t) (void **, void *)

## Functions

void | _starpu_job_init (void)
void | _starpu_job_fini (void)
struct _starpu_job * | _starpu_job_create (struct starpu_task *task) STARPU_ATTRIBUTE_MALLOC
void | _starpu_job_destroy (struct _starpu_job *j)
int | _starpu_job_finished (struct _starpu_job *j)
void | _starpu_wait_job (struct _starpu_job *j)
int | _starpu_test_job_termination (struct _starpu_job *j)
void | _starpu_job_prepare_for_continuation_ext (struct _starpu_job *j, unsigned continuation_resubmit, void(*continuation_callback_on_sleep)(void *arg), void *continuation_callback_on_sleep_arg)
void | _starpu_job_prepare_for_continuation (struct _starpu_job *j)
void | _starpu_job_set_omp_cleanup_callback (struct _starpu_job *j, void(*omp_cleanup_callback)(void *arg), void *omp_cleanup_callback_arg)
void | _starpu_exclude_task_from_dag (struct starpu_task *task)
unsigned | _starpu_enforce_deps_and_schedule (struct _starpu_job *j)
unsigned | _starpu_enforce_deps_starting_from_task (struct _starpu_job *j)
unsigned | _starpu_reenforce_task_deps_and_schedule (struct _starpu_job *j)
void | _starpu_enforce_deps_notify_job_ready_soon (struct _starpu_job *j, _starpu_notify_job_start_data *data, int tag)
void | _starpu_handle_job_submission (struct _starpu_job *j)
void | _starpu_handle_job_termination (struct _starpu_job *j)
size_t | _starpu_job_get_data_size (struct starpu_perfmodel *model, struct starpu_perfmodel_arch *arch, unsigned nimpl, struct _starpu_job *j)
struct starpu_task * | _starpu_pop_local_task (struct _starpu_worker *worker)
int | _starpu_push_local_task (struct _starpu_worker *worker, struct starpu_task *task, int prio)

## Data Structure Documentation

## _starpu_data_descr

struct _starpu_data_descr

Data Fields
starpu_data_handle_t | handle |
enum starpu_data_access_mode | mode |
int | node |
int | index | This is the value actually chosen, only set by _starpu_fetch_task_input for coherency with __starpu_push_task_output
int | orderedindex |

## Typedef Documentation

## _starpu_cl_func_t

typedef void(* _starpu_cl_func_t) (void **, void *)

codelet function

## Function Documentation

## _starpu_job_create()

struct _starpu_job * _starpu_job_create | ( | struct starpu_task * | task | ) |

Create an internal struct _starpu_job *structure to encapsulate the task.

## _starpu_job_destroy()

void _starpu_job_destroy | ( | struct _starpu_job * | j | ) |

Destroy the data structure associated to the job structure

## _starpu_job_finished()

int _starpu_job_finished | ( | struct _starpu_job * | j | ) |

Test for the termination of the job

## _starpu_wait_job()

void _starpu_wait_job | ( | struct _starpu_job * | j | ) |

Wait for the termination of the job

## _starpu_test_job_termination()

int _starpu_test_job_termination | ( | struct _starpu_job * | j | ) |

Test for the termination of the job

## _starpu_job_prepare_for_continuation_ext()

void _starpu_job_prepare_for_continuation_ext | ( | struct _starpu_job * | j,
|  | unsigned | continuation_resubmit,
|  | void(*)(void *arg) | continuation_callback_on_sleep,
|  | void * | continuation_callback_on_sleep_arg
| ) |  |

Prepare the job for accepting new dependencies before becoming a continuation.

## _starpu_exclude_task_from_dag()

void _starpu_exclude_task_from_dag | ( | struct starpu_task * | task | ) |

Specify that the task should not appear in the DAG generated by debug tools.

## _starpu_enforce_deps_and_schedule()

unsigned _starpu_enforce_deps_and_schedule | ( | struct _starpu_job * | j | ) |

try to submit job j, enqueue it if it's not schedulable yet. The job's sync mutex is supposed to be held already

## _starpu_reenforce_task_deps_and_schedule()

unsigned _starpu_reenforce_task_deps_and_schedule | ( | struct _starpu_job * | j | ) |

When waking up a continuation, we only enforce new task dependencies

## _starpu_handle_job_submission()

void _starpu_handle_job_submission | ( | struct _starpu_job * | j | ) |

Called at the submission of the job

## _starpu_handle_job_termination()

void _starpu_handle_job_termination | ( | struct _starpu_job * | j | ) |

This function must be called after the execution of a job, this triggers all job's dependencies and perform the callback function if any.

## _starpu_job_get_data_size()

size_t _starpu_job_get_data_size | ( | struct starpu_perfmodel * | model,
|  | struct starpu_perfmodel_arch * | arch,
|  | unsigned | nimpl,
|  | struct _starpu_job * | j
| ) |  |

Get the sum of the size of the data accessed by the job.

## _starpu_pop_local_task()

struct starpu_task * _starpu_pop_local_task | ( | struct _starpu_worker * | worker | ) |

Get a task from the local pool of tasks that were explicitly attributed to that worker.

## _starpu_push_local_task()

int _starpu_push_local_task | ( | struct _starpu_worker * | worker,
|  | struct starpu_task * | task,
|  | int | prio
| ) |  |

Put a task into the pool of tasks that are explicitly attributed to the specified worker. If "back" is set, the task is put at the back of the list. Considering the tasks are popped from the back, this value should be 0 to enforce a FIFO ordering.