StarPU Internal Handbook
Loading...
Searching...
No Matches
task.h File Reference
#include <starpu.h>
#include <common/config.h>
#include <core/jobs.h>
#include <common/starpu_spinlock.h>

Go to the source code of this file.

Data Structures

struct  _starpu_trs_epoch
 
struct  starpu_transaction
 

Macros

#define _STARPU_JOB_UNSET
 
#define _STARPU_JOB_SETTING
 
#define _STARPU_TASK_SET_INTERFACE(task, interface, i)
 
#define _STARPU_TASK_GET_INTERFACES(task)
 

Enumerations

enum  _starpu_trs_state { _starpu_trs_uninitialized , _starpu_trs_initialized }
 
enum  _starpu_trs_epoch_state {
  _starpu_trs_epoch_uninitialized , _starpu_trs_epoch_inactive , _starpu_trs_epoch_confirmed , _starpu_trs_epoch_cancelled ,
  _starpu_trs_epoch_terminated
}
 

Functions

void _starpu_task_destroy (struct starpu_task *task)
 
int _starpu_task_test_termination (struct starpu_task *task)
 
void _starpu_task_init (void)
 
void _starpu_task_deinit (void)
 
void _starpu_set_current_task (struct starpu_task *task)
 
int _starpu_submit_job (struct _starpu_job *j, int nodeps)
 
void _starpu_task_declare_deps_array (struct starpu_task *task, unsigned ndeps, struct starpu_task *task_array[], int check)
 
struct _starpu_job_starpu_get_job_associated_to_task_slow (struct starpu_task *task, struct _starpu_job *job)
 
static struct _starpu_job_starpu_get_job_associated_to_task (struct starpu_task *task)
 
int _starpu_task_submit_internally (struct starpu_task *task)
 
int _starpu_handle_needs_conversion_task (starpu_data_handle_t handle, unsigned int node)
 
int _starpu_handle_needs_conversion_task_for_arch (starpu_data_handle_t handle, enum starpu_node_kind node_kind)
 
void _starpu_task_prepare_for_continuation_ext (unsigned continuation_resubmit, void(*continuation_callback_on_sleep)(void *arg), void *continuation_callback_on_sleep_arg)
 
void _starpu_task_prepare_for_continuation (void)
 
void _starpu_task_set_omp_cleanup_callback (struct starpu_task *task, void(*omp_cleanup_callback)(void *arg), void *omp_cleanup_callback_arg)
 
int _starpu_task_uses_multiformat_handles (struct starpu_task *task)
 
int _starpu_task_submit_conversion_task (struct starpu_task *task, unsigned int workerid)
 
void _starpu_task_check_deprecated_fields (struct starpu_task *task)
 
void _starpu_codelet_check_deprecated_fields (struct starpu_codelet *cl)
 
static starpu_cpu_func_t _starpu_task_get_cpu_nth_implementation (struct starpu_codelet *cl, unsigned nimpl)
 
static starpu_cuda_func_t _starpu_task_get_cuda_nth_implementation (struct starpu_codelet *cl, unsigned nimpl)
 
static starpu_hip_func_t _starpu_task_get_hip_nth_implementation (struct starpu_codelet *cl, unsigned nimpl)
 
static starpu_opencl_func_t _starpu_task_get_opencl_nth_implementation (struct starpu_codelet *cl, unsigned nimpl)
 
static starpu_max_fpga_func_t _starpu_task_get_fpga_nth_implementation (struct starpu_codelet *cl, unsigned nimpl)
 
static const char * _starpu_task_get_cpu_name_nth_implementation (struct starpu_codelet *cl, unsigned nimpl)
 
void _starpu_watchdog_init (void)
 
void _starpu_watchdog_shutdown (void)
 
int _starpu_task_wait_for_all_and_return_nb_waited_tasks (void)
 
int _starpu_task_wait_for_all_in_ctx_and_return_nb_waited_tasks (unsigned sched_ctx)
 

Data Structure Documentation

◆ _starpu_trs_epoch

struct _starpu_trs_epoch
Data Fields
enum _starpu_trs_epoch_state state
int do_sync

if 1, the epoch entry task will wait on some user-supplied handle TODO: only used for first epoch on transaction opening for now, add for next epoch

int is_begin

if 1, the epoch is the first of the transaction

int is_end

if 1, the epoch will be the last, and the transaction will be closed after its execution

void * do_start_arg

inline argument supplied by the user and passed to the user function deciding whether to start or cancel the epoch execution

Enumeration Type Documentation

◆ _starpu_trs_state

transaction states

◆ _starpu_trs_epoch_state

transaction epoch states

Enumerator
_starpu_trs_epoch_inactive 

epoch is initialized but its entry task has not yet been executed to decide whether to confirm of cancel its execution

_starpu_trs_epoch_confirmed 

epoch has been confirmed for execution, its tasks will be actually executed

_starpu_trs_epoch_cancelled 

epoch has been cancelled, its task will be skipped

_starpu_trs_epoch_terminated 

the exit task of the epoch has been executed

Function Documentation

◆ _starpu_task_destroy()

void _starpu_task_destroy ( struct starpu_task *  task)

Internal version of starpu_task_destroy: don't check task->destroy flag

◆ _starpu_task_test_termination()

int _starpu_task_test_termination ( struct starpu_task *  task)

Test for the termination of the task. Call starpu_task_destroy if required and the task is terminated.

◆ _starpu_task_init()

void _starpu_task_init ( void  )

A pthread key is used to store the task currently executed on the thread. _starpu_task_init initializes this pthread key and _starpu_set_current_task updates its current value.

◆ _starpu_get_job_associated_to_task_slow()

struct _starpu_job * _starpu_get_job_associated_to_task_slow ( struct starpu_task *  task,
struct _starpu_job job 
)

Returns the job structure (which is the internal data structure associated to a task).

◆ _starpu_task_submit_internally()

int _starpu_task_submit_internally ( struct starpu_task *  task)

Submits starpu internal tasks to the initial context

◆ _starpu_task_prepare_for_continuation_ext()

void _starpu_task_prepare_for_continuation_ext ( unsigned  continuation_resubmit,
void(*)(void *arg)  continuation_callback_on_sleep,
void *  continuation_callback_on_sleep_arg 
)

Prepare the current task for accepting new dependencies before becoming a continuation.