#[repr(C)]pub struct starpu_task {Show 63 fields
pub name: *const c_char,
pub file: *const c_char,
pub line: c_int,
pub cl: *mut starpu_codelet,
pub where_: i32,
pub nbuffers: c_int,
pub dyn_handles: *mut starpu_data_handle_t,
pub dyn_interfaces: *mut *mut c_void,
pub dyn_modes: *mut starpu_data_access_mode,
pub handles: [starpu_data_handle_t; 8],
pub interfaces: [*mut c_void; 8],
pub modes: [starpu_data_access_mode; 8],
pub handles_sequential_consistency: *mut c_uchar,
pub cl_arg: *mut c_void,
pub cl_arg_size: usize,
pub cl_ret: *mut c_void,
pub cl_ret_size: usize,
pub epilogue_callback_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
pub epilogue_callback_arg: *mut c_void,
pub callback_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
pub callback_arg: *mut c_void,
pub prologue_callback_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
pub prologue_callback_arg: *mut c_void,
pub prologue_callback_pop_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
pub prologue_callback_pop_arg: *mut c_void,
pub transaction: *mut starpu_transaction,
pub trs_epoch: starpu_trs_epoch_t,
pub tag_id: starpu_tag_t,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2]>,
pub mf_skip: c_uchar,
pub failed: c_uchar,
pub scheduled: c_uchar,
pub prefetched: c_uchar,
pub workerid: c_uint,
pub workerorder: c_uint,
pub workerids: *mut u32,
pub workerids_len: c_uint,
pub priority: c_int,
pub status: starpu_task_status,
pub magic: c_int,
pub type_: c_uint,
pub color: c_uint,
pub sched_ctx: c_uint,
pub hypervisor_tag: c_int,
pub possibly_parallel: c_uint,
pub bundle: starpu_task_bundle_t,
pub profiling_info: *mut starpu_profiling_task_info,
pub flops: f64,
pub predicted: f64,
pub predicted_transfer: f64,
pub predicted_start: f64,
pub prev: *mut starpu_task,
pub next: *mut starpu_task,
pub starpu_private: *mut c_void,
pub omp_task: *mut starpu_omp_task,
pub bubble_parent: c_ulong,
pub bubble_func: starpu_bubble_func_t,
pub bubble_func_arg: *mut c_void,
pub bubble_gen_dag_func: starpu_bubble_gen_dag_func_t,
pub bubble_gen_dag_func_arg: *mut c_void,
pub nb_termination_call_required: c_uint,
pub sched_data: *mut c_void,
}Expand description
@defgroup API_Task_Bundles Task Bundles @{
Fields§
§name: *const c_charOptional name of the task. This can be useful for debugging purposes.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_NAME followed by the const char *.
file: *const c_charOptional file name where the task was submitted. This can be useful for debugging purposes.
line: c_intOptional line number where the task was submitted. This can be useful for debugging purposes.
cl: *mut starpu_codeletPointer to the corresponding structure starpu_codelet. This
describes where the kernel should be executed, and supplies
the appropriate implementations. When set to
where_: i32When set, specify where the task is allowed to be executed. When unset, take the value of starpu_codelet::where.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_EXECUTE_WHERE followed by an unsigned long long.
nbuffers: c_intSpecify the number of buffers. This is only used when starpu_codelet::nbuffers is \ref STARPU_VARIABLE_NBUFFERS.
With starpu_task_insert() and alike this is automatically computed when using ::STARPU_DATA_ARRAY and alike.
dyn_handles: *mut starpu_data_handle_tArray of ::starpu_data_handle_t. Specify the handles to the different pieces of data accessed by the task. The number of entries in this array must be specified in the field starpu_codelet::nbuffers. This field should be used for tasks having a number of data greater than \ref STARPU_NMAXBUFS (see \ref SettingManyDataHandlesForATask). When defining a task, one should either define this field or the field starpu_task::handles defined below.
With starpu_task_insert() and alike this is automatically filled when using ::STARPU_DATA_ARRAY and alike.
dyn_interfaces: *mut *mut c_voidArray of data pointers to the memory node where execution will happen, managed by the DSM. Is used when the field starpu_task::dyn_handles is defined.
This is filled by StarPU.
dyn_modes: *mut starpu_data_access_modeUsed only when starpu_codelet::nbuffers is \ref STARPU_VARIABLE_NBUFFERS. Array of ::starpu_data_access_mode which describes the required access modes to the data needed by the codelet (e.g. ::STARPU_RW). The number of entries in this array must be specified in the field starpu_codelet::nbuffers. This field should be used for codelets having a number of data greater than \ref STARPU_NMAXBUFS (see \ref SettingManyDataHandlesForATask). When defining a codelet, one should either define this field or the field starpu_task::modes defined below.
With starpu_task_insert() and alike this is automatically filled when using ::STARPU_DATA_MODE_ARRAY and alike.
handles: [starpu_data_handle_t; 8]Array of ::starpu_data_handle_t. Specify the handles to the different pieces of data accessed by the task. The number of entries in this array must be specified in the field starpu_codelet::nbuffers, and should not exceed \ref STARPU_NMAXBUFS. If insufficient, this value can be set with the configure option \ref enable-maxbuffers “–enable-maxbuffers”.
With starpu_task_insert() and alike this is automatically filled when using ::STARPU_R and alike.
interfaces: [*mut c_void; 8]Array of Data pointers to the memory node where execution will happen, managed by the DSM.
This is filled by StarPU.
modes: [starpu_data_access_mode; 8]Used only when starpu_codelet::nbuffers is \ref STARPU_VARIABLE_NBUFFERS. Array of ::starpu_data_access_mode which describes the required access modes to the data needed by the codelet (e.g. ::STARPU_RW). The number of entries in this array must be specified in the field starpu_task::nbuffers, and should not exceed \ref STARPU_NMAXBUFS. If insufficient, this value can be set with the configure option \ref enable-maxbuffers “–enable-maxbuffers”.
With starpu_task_insert() and alike this is automatically filled when using ::STARPU_DATA_MODE_ARRAY and alike.
handles_sequential_consistency: *mut c_ucharOptional pointer to an array of characters which allows to define the sequential consistency for each handle for the current task.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *
cl_arg: *mut c_voidOptional pointer which is passed to the codelet through the
second argument of the codelet implementation (e.g.
starpu_codelet::cpu_func or starpu_codelet::cuda_func). The
default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_CL_ARGS followed by a void* and a size_t.
cl_arg_size: usizeOptional field. For some specific drivers, the pointer starpu_task::cl_arg cannot not be directly given to the driver function. A buffer of size starpu_task::cl_arg_size needs to be allocated on the driver. This buffer is then filled with the starpu_task::cl_arg_size bytes starting at address starpu_task::cl_arg. In this case, the argument given to the codelet is therefore not the starpu_task::cl_arg pointer, but the address of the buffer in local store (LS) instead. This field is ignored for CPU, CUDA and OpenCL codelets, where the starpu_task::cl_arg pointer is given as such.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_CL_ARGS followed by a void* and a size_t.
cl_ret: *mut c_voidOptional pointer which points to the return value of submitted task.
The default value is
cl_ret_size: usizeOptional field. The buffer of starpu_codelet_pack_arg() and starpu_codelet_unpack_arg() can be allocated with the starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret. starpu_task::cl_ret_size can be used for MPI support.
epilogue_callback_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>Optional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_EPILOGUE_CALLBACK followed by the function pointer.
epilogue_callback_arg: *mut c_voidOptional field, the default value is
callback_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>Optional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_CALLBACK followed by the function pointer, or thanks to ::STARPU_CALLBACK_WITH_ARG (or ::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function pointer and the argument.
callback_arg: *mut c_voidOptional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to ::STARPU_CALLBACK_WITH_ARG or ::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function pointer and the argument.
prologue_callback_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>Optional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_PROLOGUE_CALLBACK followed by the function pointer.
prologue_callback_arg: *mut c_voidOptional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument
prologue_callback_pop_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>Optional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer.
prologue_callback_pop_arg: *mut c_voidOptional field, the default value is
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument.
transaction: *mut starpu_transactionTransaction to which the task belongs, if any
trs_epoch: starpu_trs_epoch_tTransaction epoch to which the task belongs, if any
tag_id: starpu_tag_tOptional field. Contain the tag associated to the task if the field starpu_task::use_tag is set, ignored otherwise.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_TAG followed by a starpu_tag_t.
_bitfield_align_1: [u8; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 2]>§mf_skip: c_uchar@private This is only used for tasks that use multiformat handle. This should only be used by StarPU.
failed: c_ucharWhether this task has failed and will thus have to be retried
Set by StarPU.
scheduled: c_ucharWhether the scheduler has pushed the task on some queue
Set by StarPU.
prefetched: c_ucharWhether the scheduler has prefetched the task’s data
Set by StarPU.
workerid: c_uintOptional field. If the field starpu_task::execute_on_a_specific_worker is set, this field indicates the identifier of the worker that should process this task (as returned by starpu_worker_get_id()). This field is ignored if the field starpu_task::execute_on_a_specific_worker is set to 0.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_EXECUTE_ON_WORKER followed by an int.
workerorder: c_uintOptional field. If the field starpu_task::execute_on_a_specific_worker is set, this field indicates the per-worker consecutive order in which tasks should be executed on the worker. Tasks will be executed in consecutive starpu_task::workerorder values, thus ignoring the availability order or task priority. See \ref StaticScheduling for more details. This field is ignored if the field starpu_task::execute_on_a_specific_worker is set to 0.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_WORKER_ORDER followed by an unsigned.
workerids: *mut u32Optional field. If the field starpu_task::workerids_len is different from 0, this field indicates an array of bits (stored as uint32_t values) which indicate the set of workers which are allowed to execute the task. starpu_task::workerid takes precedence over this.
With starpu_task_insert() and alike, this can be specified along the field workerids_len thanks to ::STARPU_TASK_WORKERIDS followed by a number of workers and an array of bits which size is the number of workers.
workerids_len: c_uintOptional field. This provides the number of uint32_t values in the starpu_task::workerids array.
With starpu_task_insert() and alike, this can be specified along the field workerids thanks to ::STARPU_TASK_WORKERIDS followed by a number of workers and an array of bits which size is the number of workers.
priority: c_intOptional field, the default value is ::STARPU_DEFAULT_PRIO. This field indicates a level of priority for the task. This is an integer value that must be set between the return values of the function starpu_sched_get_min_priority() for the least important tasks, and that of the function starpu_sched_get_max_priority() for the most important tasks (included). The ::STARPU_MIN_PRIO and ::STARPU_MAX_PRIO macros are provided for convenience and respectively return the value of starpu_sched_get_min_priority() and starpu_sched_get_max_priority(). Default priority is ::STARPU_DEFAULT_PRIO, which is always defined as 0 in order to allow static task initialization. Scheduling strategies that take priorities into account can use this parameter to take better scheduling decisions, but the scheduling policy may also ignore it.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_PRIORITY followed by an unsigned long long.
status: starpu_task_statusCurrent state of the task.
Call starpu_task_status_get_as_string() to get the status as a string.
Set by StarPU.
magic: c_int@private This field is set when initializing a task. The function starpu_task_submit() will fail if the field does not have the correct value. This will hence avoid submitting tasks which have not been properly initialised.
type_: c_uintAllow to get the type of task, for filtering out tasks in profiling outputs, whether it is really internal to StarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition synchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or a normal task (::STARPU_TASK_TYPE_NORMAL)
Set by StarPU.
color: c_uintcolor of the task to be used in dag.dot.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_TASK_COLOR followed by an int.
sched_ctx: c_uintScheduling context.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_SCHED_CTX followed by an unsigned.
hypervisor_tag: c_intHelp the hypervisor monitor the execution of this task.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_HYPERVISOR_TAG followed by an int.
possibly_parallel: c_uintTODO: related with sched contexts and parallel tasks
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_POSSIBLY_PARALLEL followed by an unsigned.
bundle: starpu_task_bundle_tOptional field. The bundle that includes this task. If no
bundle is used, this should be
profiling_info: *mut starpu_profiling_task_infoOptional field. Profiling information for the task.
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_TASK_PROFILING_INFO followed by a pointer to the appropriate struct.
flops: f64The application can set this to the number of floating points
operations that the task will have to achieve. StarPU will measure
the time that the task takes, and divide the two to get the GFlop/s
achieved by the task. This will allow getting GFlops/s curves
from the tool
With starpu_task_insert() and alike this can be specified thanks to ::STARPU_FLOPS followed by a double.
predicted: f64Output field. Predicted duration of the task in microseconds. This field is only set if the scheduling strategy uses performance models.
Set by StarPU.
predicted_transfer: f64Output field. Predicted data transfer duration for the task in microseconds. This field is only valid if the scheduling strategy uses performance models.
Set by StarPU.
predicted_start: f64§prev: *mut starpu_task@private A pointer to the previous task. This should only be used by StarPU schedulers.
next: *mut starpu_task@private A pointer to the next task. This should only be used by StarPU schedulers.
starpu_private: *mut c_void@private This is private to StarPU, do not modify.
omp_task: *mut starpu_omp_task@private This is private to StarPU, do not modify.
bubble_parent: c_ulongWhen using hierarchical dags, the job identifier of the bubble task which created the current task
bubble_func: starpu_bubble_func_tWhen using hierarchical dags, a pointer to the bubble decision function
bubble_func_arg: *mut c_voidWhen using hierarchical dags, a pointer to an argument to be given when calling the bubble decision function
bubble_gen_dag_func: starpu_bubble_gen_dag_func_tWhen using hierarchical dags, a pointer to the bubble DAG generation function
bubble_gen_dag_func_arg: *mut c_voidWhen using hierarchical dags, a pointer to an argument to be given when calling the bubble DAG generation function
nb_termination_call_required: c_uint@private This is private to StarPU, do not modify.
sched_data: *mut c_voidThis field is managed by the scheduler, is it allowed to do whatever with it. Typically, some area would be allocated on push, and released on pop.
With starpu_task_insert() and alike this is set when using ::STARPU_TASK_SCHED_DATA.
Implementations§
Source§impl starpu_task
impl starpu_task
pub fn cl_arg_free(&self) -> c_uint
pub fn set_cl_arg_free(&mut self, val: c_uint)
pub unsafe fn cl_arg_free_raw(this: *const Self) -> c_uint
pub unsafe fn set_cl_arg_free_raw(this: *mut Self, val: c_uint)
pub fn cl_ret_free(&self) -> c_uint
pub fn set_cl_ret_free(&mut self, val: c_uint)
pub unsafe fn cl_ret_free_raw(this: *const Self) -> c_uint
pub unsafe fn set_cl_ret_free_raw(this: *mut Self, val: c_uint)
pub fn callback_arg_free(&self) -> c_uint
pub fn set_callback_arg_free(&mut self, val: c_uint)
pub unsafe fn callback_arg_free_raw(this: *const Self) -> c_uint
pub unsafe fn set_callback_arg_free_raw(this: *mut Self, val: c_uint)
pub fn epilogue_callback_arg_free(&self) -> c_uint
pub fn set_epilogue_callback_arg_free(&mut self, val: c_uint)
pub unsafe fn epilogue_callback_arg_free_raw(this: *const Self) -> c_uint
pub unsafe fn set_epilogue_callback_arg_free_raw(this: *mut Self, val: c_uint)
pub fn prologue_callback_arg_free(&self) -> c_uint
pub fn set_prologue_callback_arg_free(&mut self, val: c_uint)
pub unsafe fn prologue_callback_arg_free_raw(this: *const Self) -> c_uint
pub unsafe fn set_prologue_callback_arg_free_raw(this: *mut Self, val: c_uint)
pub fn prologue_callback_pop_arg_free(&self) -> c_uint
pub fn set_prologue_callback_pop_arg_free(&mut self, val: c_uint)
pub unsafe fn prologue_callback_pop_arg_free_raw(this: *const Self) -> c_uint
pub unsafe fn set_prologue_callback_pop_arg_free_raw( this: *mut Self, val: c_uint, )
pub fn use_tag(&self) -> c_uint
pub fn set_use_tag(&mut self, val: c_uint)
pub unsafe fn use_tag_raw(this: *const Self) -> c_uint
pub unsafe fn set_use_tag_raw(this: *mut Self, val: c_uint)
pub fn sequential_consistency(&self) -> c_uint
pub fn set_sequential_consistency(&mut self, val: c_uint)
pub unsafe fn sequential_consistency_raw(this: *const Self) -> c_uint
pub unsafe fn set_sequential_consistency_raw(this: *mut Self, val: c_uint)
pub fn synchronous(&self) -> c_uint
pub fn set_synchronous(&mut self, val: c_uint)
pub unsafe fn synchronous_raw(this: *const Self) -> c_uint
pub unsafe fn set_synchronous_raw(this: *mut Self, val: c_uint)
pub fn execute_on_a_specific_worker(&self) -> c_uint
pub fn set_execute_on_a_specific_worker(&mut self, val: c_uint)
pub unsafe fn execute_on_a_specific_worker_raw(this: *const Self) -> c_uint
pub unsafe fn set_execute_on_a_specific_worker_raw(this: *mut Self, val: c_uint)
pub fn detach(&self) -> c_uint
pub fn set_detach(&mut self, val: c_uint)
pub unsafe fn detach_raw(this: *const Self) -> c_uint
pub unsafe fn set_detach_raw(this: *mut Self, val: c_uint)
pub fn destroy(&self) -> c_uint
pub fn set_destroy(&mut self, val: c_uint)
pub unsafe fn destroy_raw(this: *const Self) -> c_uint
pub unsafe fn set_destroy_raw(this: *mut Self, val: c_uint)
pub fn regenerate(&self) -> c_uint
pub fn set_regenerate(&mut self, val: c_uint)
pub unsafe fn regenerate_raw(this: *const Self) -> c_uint
pub unsafe fn set_regenerate_raw(this: *mut Self, val: c_uint)
pub fn no_submitorder(&self) -> c_uint
pub fn set_no_submitorder(&mut self, val: c_uint)
pub unsafe fn no_submitorder_raw(this: *const Self) -> c_uint
pub unsafe fn set_no_submitorder_raw(this: *mut Self, val: c_uint)
pub fn new_bitfield_1( cl_arg_free: c_uint, cl_ret_free: c_uint, callback_arg_free: c_uint, epilogue_callback_arg_free: c_uint, prologue_callback_arg_free: c_uint, prologue_callback_pop_arg_free: c_uint, use_tag: c_uint, sequential_consistency: c_uint, synchronous: c_uint, execute_on_a_specific_worker: c_uint, detach: c_uint, destroy: c_uint, regenerate: c_uint, no_submitorder: c_uint, ) -> __BindgenBitfieldUnit<[u8; 2]>
Trait Implementations§
Source§impl Clone for starpu_task
impl Clone for starpu_task
Source§fn clone(&self) -> starpu_task
fn clone(&self) -> starpu_task
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more