|
@@ -115,6 +115,11 @@ Defines the maximum number of buffers that tasks will be able to take
|
|
as parameters. The default value is 8, it can be changed by using the
|
|
as parameters. The default value is 8, it can be changed by using the
|
|
configure option \ref enable-maxbuffers "--enable-maxbuffers".
|
|
configure option \ref enable-maxbuffers "--enable-maxbuffers".
|
|
|
|
|
|
|
|
+\def STARPU_VARIABLE_NBUFFERS
|
|
|
|
+\ingroup API_Codelet_And_Tasks
|
|
|
|
+Value to set in starpu_codelet::nbuffers to specify that the codelet can accept
|
|
|
|
+a variable number of buffers, specified in starpu_task::nbuffers.
|
|
|
|
+
|
|
\typedef starpu_cpu_func_t
|
|
\typedef starpu_cpu_func_t
|
|
\ingroup API_Codelet_And_Tasks
|
|
\ingroup API_Codelet_And_Tasks
|
|
CPU implementation of a codelet.
|
|
CPU implementation of a codelet.
|
|
@@ -270,11 +275,14 @@ starpu_codelet::cpu_funcs_name is non-NULL, in which case StarPU will
|
|
simply make a symbol lookup to get the implementation.
|
|
simply make a symbol lookup to get the implementation.
|
|
|
|
|
|
\var starpu_codelet::nbuffers
|
|
\var starpu_codelet::nbuffers
|
|
-Specify the number of arguments taken by the codelet. These arguments
|
|
|
|
-are managed by the DSM and are accessed from the <c>void *buffers[]</c>
|
|
|
|
-array. The constant argument passed with the field starpu_task::cl_arg
|
|
|
|
-is not counted in this number. This value should not be above
|
|
|
|
-\ref STARPU_NMAXBUFS.
|
|
|
|
|
|
+Specify the number of arguments taken by the codelet. These arguments are
|
|
|
|
+managed by the DSM and are accessed from the <c>void *buffers[]</c> array. The
|
|
|
|
+constant argument passed with the field starpu_task::cl_arg is not counted in
|
|
|
|
+this number. This value should not be above \ref STARPU_NMAXBUFS. It may be set
|
|
|
|
+to STARPU_VARIABLE_NBUFFERS to specify that the number of buffers and their
|
|
|
|
+access modes will be set in starpu_task::nbuffers and starpu_task::modes or
|
|
|
|
+starpu_task::dyn_modes, which thus permits to define codelets with a varying
|
|
|
|
+number of data.
|
|
|
|
|
|
\var starpu_codelet::modes
|
|
\var starpu_codelet::modes
|
|
Is an array of ::starpu_data_access_mode. It describes the required
|
|
Is an array of ::starpu_data_access_mode. It describes the required
|
|
@@ -362,27 +370,33 @@ starpu_task_create(), or declared statically. In the latter case, the
|
|
programmer has to zero the structure starpu_task and to fill the
|
|
programmer has to zero the structure starpu_task and to fill the
|
|
different fields properly. The indicated default values correspond to
|
|
different fields properly. The indicated default values correspond to
|
|
the configuration of a task allocated with starpu_task_create().
|
|
the configuration of a task allocated with starpu_task_create().
|
|
|
|
+
|
|
\var starpu_task::name
|
|
\var starpu_task::name
|
|
Optional name of the task. This can be useful for debugging
|
|
Optional name of the task. This can be useful for debugging
|
|
purposes.
|
|
purposes.
|
|
|
|
+
|
|
\var starpu_task::cl
|
|
\var starpu_task::cl
|
|
Is a pointer to the corresponding structure starpu_codelet. This
|
|
Is a pointer to the corresponding structure starpu_codelet. This
|
|
describes where the kernel should be executed, and supplies the
|
|
describes where the kernel should be executed, and supplies the
|
|
appropriate implementations. When set to NULL, no code is executed
|
|
appropriate implementations. When set to NULL, no code is executed
|
|
during the tasks, such empty tasks can be useful for synchronization
|
|
during the tasks, such empty tasks can be useful for synchronization
|
|
purposes.
|
|
purposes.
|
|
-\var starpu_task::buffers
|
|
|
|
-\deprecated
|
|
|
|
This field has been made deprecated. One should use instead the
|
|
This field has been made deprecated. One should use instead the
|
|
field starpu_task::handles to specify the data handles accessed
|
|
field starpu_task::handles to specify the data handles accessed
|
|
by the task. The access modes are now defined in the field
|
|
by the task. The access modes are now defined in the field
|
|
starpu_codelet::modes.
|
|
starpu_codelet::modes.
|
|
|
|
+
|
|
|
|
+\var starpu_task::nbuffers
|
|
|
|
+Specifies the number of buffers. This is only used when starpu_codelet::nbuffers
|
|
|
|
+is STARPU_VARIABLE_NBUFFERS.
|
|
|
|
+
|
|
\var starpu_task::handles
|
|
\var starpu_task::handles
|
|
Is an array of ::starpu_data_handle_t. It specifies the handles to the
|
|
Is an array of ::starpu_data_handle_t. It specifies the handles to the
|
|
different pieces of data accessed by the task. The number of entries
|
|
different pieces of data accessed by the task. The number of entries
|
|
in this array must be specified in the field starpu_codelet::nbuffers,
|
|
in this array must be specified in the field starpu_codelet::nbuffers,
|
|
and should not exceed \ref STARPU_NMAXBUFS. If unsufficient, this value can
|
|
and should not exceed \ref STARPU_NMAXBUFS. If unsufficient, this value can
|
|
be set with the configure option \ref enable-maxbuffers "--enable-maxbuffers".
|
|
be set with the configure option \ref enable-maxbuffers "--enable-maxbuffers".
|
|
|
|
+
|
|
\var starpu_task::dyn_handles
|
|
\var starpu_task::dyn_handles
|
|
Is an array of ::starpu_data_handle_t. It specifies the handles to the
|
|
Is an array of ::starpu_data_handle_t. It specifies the handles to the
|
|
different pieces of data accessed by the task. The number of entries
|
|
different pieces of data accessed by the task. The number of entries
|
|
@@ -401,6 +415,25 @@ The actual data pointers to the memory node where execution will
|
|
happen, managed by the DSM. Is used when the field
|
|
happen, managed by the DSM. Is used when the field
|
|
starpu_task::dyn_handles is defined.
|
|
starpu_task::dyn_handles is defined.
|
|
|
|
|
|
|
|
+\var starpu_task::modes
|
|
|
|
+Is used only when starpu_codelet::nbuffers is STARPU_VARIABLE_NBUFFERS.
|
|
|
|
+It is an array of ::starpu_data_access_mode. It describes the required
|
|
|
|
+access modes to the data neeeded 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
|
|
|
|
+unsufficient, this value can be set with the configure option
|
|
|
|
+\ref enable-maxbuffers "--enable-maxbuffers".
|
|
|
|
+
|
|
|
|
+\var starpu_task::dyn_modes
|
|
|
|
+Is used only when starpu_codelet::nbuffers is STARPU_VARIABLE_NBUFFERS.
|
|
|
|
+It is an array of ::starpu_data_access_mode. It 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 datas greater than \ref STARPU_NMAXBUFS (see \ref
|
|
|
|
+SettingTheDataHandlesForATask). When defining a codelet, one
|
|
|
|
+should either define this field or the field starpu_task::modes defined above.
|
|
|
|
+
|
|
\var starpu_task::cl_arg
|
|
\var starpu_task::cl_arg
|
|
Optional pointer which is passed to the codelet through the second
|
|
Optional pointer which is passed to the codelet through the second
|
|
argument of the codelet implementation (e.g. starpu_codelet::cpu_func
|
|
argument of the codelet implementation (e.g. starpu_codelet::cpu_func
|
|
@@ -612,6 +645,11 @@ It is possible to initialize statically allocated tasks with
|
|
this value. This is equivalent to initializing a structure starpu_task
|
|
this value. This is equivalent to initializing a structure starpu_task
|
|
with the function starpu_task_init() function.
|
|
with the function starpu_task_init() function.
|
|
|
|
|
|
|
|
+\def STARPU_TASK_GET_NBUFFERS(task)
|
|
|
|
+\ingroup API_Codelet_And_Tasks
|
|
|
|
+Return the number of buffers for this task, i.e. starpu_codelet::nbuffers, or
|
|
|
|
+starpu_task::nbuffers if the former is STARPU_VARIABLE_BUFFERS.
|
|
|
|
+
|
|
\def STARPU_TASK_GET_HANDLE(task, i)
|
|
\def STARPU_TASK_GET_HANDLE(task, i)
|
|
\ingroup API_Codelet_And_Tasks
|
|
\ingroup API_Codelet_And_Tasks
|
|
Return the \p i th data handle of the given task. If the task
|
|
Return the \p i th data handle of the given task. If the task
|
|
@@ -647,6 +685,24 @@ starpu_codelet::modes or the \p i th element of the field
|
|
starpu_codelet::dyn_modes (see \ref
|
|
starpu_codelet::dyn_modes (see \ref
|
|
SettingTheDataHandlesForATask)
|
|
SettingTheDataHandlesForATask)
|
|
|
|
|
|
|
|
+\def STARPU_TASK_GET_MODE(codelet, i)
|
|
|
|
+\ingroup API_Codelet_And_Tasks
|
|
|
|
+Return the access mode of the \p i th data handle of the given
|
|
|
|
+task. If the task is defined with a static or dynamic number of
|
|
|
|
+handles, will either return the \p i th element of the field
|
|
|
|
+starpu_task::modes or the \p i th element of the field
|
|
|
|
+starpu_task::dyn_modes (see \ref
|
|
|
|
+SettingTheDataHandlesForATask)
|
|
|
|
+
|
|
|
|
+\def STARPU_TASK_SET_MODE(task, mode, i)
|
|
|
|
+\ingroup API_Codelet_And_Tasks
|
|
|
|
+Set the access mode of the \p i th data handle of the given
|
|
|
|
+task. If the task is defined with a static or dynamic number of
|
|
|
|
+handles, will either set the \p i th element of the field
|
|
|
|
+starpu_task::modes or the \p i th element of the field
|
|
|
|
+starpu_task::dyn_modes (see \ref
|
|
|
|
+SettingTheDataHandlesForATask)
|
|
|
|
+
|
|
\fn struct starpu_task *starpu_task_create(void)
|
|
\fn struct starpu_task *starpu_task_create(void)
|
|
\ingroup API_Codelet_And_Tasks
|
|
\ingroup API_Codelet_And_Tasks
|
|
Allocate a task structure and initialize it with default
|
|
Allocate a task structure and initialize it with default
|