Преглед изворни кода

document STARPU_VARIABLE_NBUFFERS

Samuel Thibault пре 10 година
родитељ
комит
22791ad1de
2 измењених фајлова са 21 додато и 12 уклоњено
  1. 11 2
      doc/doxygen/chapters/06tasks.doxy
  2. 10 10
      doc/doxygen/chapters/api/codelet_and_tasks.doxy

+ 11 - 2
doc/doxygen/chapters/06tasks.doxy

@@ -45,9 +45,9 @@ other tasks and may thus be a bottleneck if not executed early
 enough), the field starpu_task::priority should be set to transmit the
 enough), the field starpu_task::priority should be set to transmit the
 priority information to StarPU.
 priority information to StarPU.
 
 
-\section SettingTheDataHandlesForATask Setting The Data Handles For A Task
+\section SettingManyDataHandlesForATask Setting Many Data Handles For a Task
 
 
-The number of data a task can manage is fixed by the environment variable
+The maximum number of data a task can manage is fixed by the environment variable
 \ref STARPU_NMAXBUFS which has a default value which can be changed
 \ref STARPU_NMAXBUFS which has a default value which can be changed
 through the configure option \ref enable-maxbuffers "--enable-maxbuffers".
 through the configure option \ref enable-maxbuffers "--enable-maxbuffers".
 
 
@@ -95,6 +95,15 @@ starpu_task_insert(&dummy_big_cl,
 The whole code for this complex data interface is available in the
 The whole code for this complex data interface is available in the
 directory <c>examples/basic_examples/dynamic_handles.c</c>.
 directory <c>examples/basic_examples/dynamic_handles.c</c>.
 
 
+\section SettingVariableDataHandlesForATask Setting a Variable number Data Handles For a Task
+
+Normally, the number of data handles given to a task is fixed in the
+starpu_codelet::nbuffers codelet field. This field can however be set to
+STARPU_VARIABLE_NBUFFERS, in which case the starpu_task::nbuffers task field
+must be set, and the starpu_task::modes field (or starpu_task_dyn_modes field,
+see \ref SettingManyDataHandlesForATask) should be used to specify the modes for
+the handles.
+
 \section UsingMultipleImplementationsOfACodelet Using Multiple Implementations Of A Codelet
 \section UsingMultipleImplementationsOfACodelet Using Multiple Implementations Of A Codelet
 
 
 One may want to write multiple implementations of a codelet for a single type of
 One may want to write multiple implementations of a codelet for a single type of

+ 10 - 10
doc/doxygen/chapters/api/codelet_and_tasks.doxy

@@ -310,7 +310,7 @@ 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
 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
 starpu_codelet::nbuffers. This field should be used for codelets having a
 number of datas greater than \ref STARPU_NMAXBUFS (see \ref
 number of datas greater than \ref STARPU_NMAXBUFS (see \ref
-SettingTheDataHandlesForATask). When defining a codelet, one
+SettingManyDataHandlesForATask). When defining a codelet, one
 should either define this field or the field starpu_codelet::modes defined above.
 should either define this field or the field starpu_codelet::modes defined above.
 
 
 \var unsigned starpu_codelet::specific_nodes
 \var unsigned starpu_codelet::specific_nodes
@@ -332,7 +332,7 @@ the memory nodes where each data should be sent to for task execution.
 The number of entries in this array is starpu_codelet::nbuffers.
 The number of entries in this array is starpu_codelet::nbuffers.
 This field should be used for codelets having a
 This field should be used for codelets having a
 number of datas greater than \ref STARPU_NMAXBUFS (see \ref
 number of datas greater than \ref STARPU_NMAXBUFS (see \ref
-SettingTheDataHandlesForATask). When defining a codelet, one
+SettingManyDataHandlesForATask). When defining a codelet, one
 should either define this field or the field starpu_codelet::nodes defined
 should either define this field or the field starpu_codelet::nodes defined
 above.
 above.
 
 
@@ -414,7 +414,7 @@ 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.
 This field should be used for tasks having a number of datas greater
 This field should be used for tasks having a number of datas greater
-than \ref STARPU_NMAXBUFS (see \ref SettingTheDataHandlesForATask).
+than \ref STARPU_NMAXBUFS (see \ref SettingManyDataHandlesForATask).
 When defining a task, one should either define this field or the field
 When defining a task, one should either define this field or the field
 starpu_task::handles defined above.
 starpu_task::handles defined above.
 
 
@@ -443,7 +443,7 @@ 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
 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
 starpu_codelet::nbuffers. This field should be used for codelets having a
 number of datas greater than \ref STARPU_NMAXBUFS (see \ref
 number of datas greater than \ref STARPU_NMAXBUFS (see \ref
-SettingTheDataHandlesForATask). When defining a codelet, one
+SettingManyDataHandlesForATask). When defining a codelet, one
 should either define this field or the field starpu_task::modes defined above.
 should either define this field or the field starpu_task::modes defined above.
 
 
 \var void *starpu_task::cl_arg
 \var void *starpu_task::cl_arg
@@ -677,7 +677,7 @@ Return 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
 is defined with a static or dynamic number of handles, will either
 return the \p i th element of the field starpu_task::handles or the \p
 return the \p i th element of the field starpu_task::handles or the \p
 i th element of the field starpu_task::dyn_handles (see \ref
 i th element of the field starpu_task::dyn_handles (see \ref
-SettingTheDataHandlesForATask)
+SettingManyDataHandlesForATask)
 
 
 \def STARPU_TASK_SET_HANDLE(task, handle, i)
 \def STARPU_TASK_SET_HANDLE(task, handle, i)
 \ingroup API_Codelet_And_Tasks
 \ingroup API_Codelet_And_Tasks
@@ -686,7 +686,7 @@ dat handle. If the task is defined with a static or dynamic number of
 handles, will either set the \p i th element of the field
 handles, will either set the \p i th element of the field
 starpu_task::handles or the \p i th element of the field
 starpu_task::handles or the \p i th element of the field
 starpu_task::dyn_handles (see \ref
 starpu_task::dyn_handles (see \ref
-SettingTheDataHandlesForATask)
+SettingManyDataHandlesForATask)
 
 
 \def STARPU_CODELET_GET_MODE(codelet, i)
 \def STARPU_CODELET_GET_MODE(codelet, i)
 \ingroup API_Codelet_And_Tasks
 \ingroup API_Codelet_And_Tasks
@@ -695,7 +695,7 @@ codelet. If the codelet is defined with a static or dynamic number of
 handles, will either return the \p i th element of the field
 handles, will either return the \p i th element of the field
 starpu_codelet::modes or the \p i th element of the field
 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)
+SettingManyDataHandlesForATask)
 
 
 \def STARPU_CODELET_SET_MODE(codelet, mode, i)
 \def STARPU_CODELET_SET_MODE(codelet, mode, i)
 \ingroup API_Codelet_And_Tasks
 \ingroup API_Codelet_And_Tasks
@@ -704,7 +704,7 @@ codelet. If the codelet is defined with a static or dynamic number of
 handles, will either set the \p i th element of the field
 handles, will either set the \p i th element of the field
 starpu_codelet::modes or the \p i th element of the field
 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)
+SettingManyDataHandlesForATask)
 
 
 \def STARPU_TASK_GET_MODE(task, i)
 \def STARPU_TASK_GET_MODE(task, i)
 \ingroup API_Codelet_And_Tasks
 \ingroup API_Codelet_And_Tasks
@@ -713,7 +713,7 @@ 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
 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::modes or the \p i th element of the field
 starpu_task::dyn_modes (see \ref
 starpu_task::dyn_modes (see \ref
-SettingTheDataHandlesForATask)
+SettingManyDataHandlesForATask)
 
 
 \def STARPU_TASK_SET_MODE(task, mode, i)
 \def STARPU_TASK_SET_MODE(task, mode, i)
 \ingroup API_Codelet_And_Tasks
 \ingroup API_Codelet_And_Tasks
@@ -722,7 +722,7 @@ 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
 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::modes or the \p i th element of the field
 starpu_task::dyn_modes (see \ref
 starpu_task::dyn_modes (see \ref
-SettingTheDataHandlesForATask)
+SettingManyDataHandlesForATask)
 
 
 \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