Browse Source

doc: add anchors for missing functions

Nathalie Furmento 14 years ago
parent
commit
9afab316c2
2 changed files with 355 additions and 2 deletions
  1. 84 2
      doc/chapters/advanced-api.texi
  2. 271 0
      doc/chapters/basic-api.texi

+ 84 - 2
doc/chapters/advanced-api.texi

@@ -10,11 +10,64 @@
 @chapter StarPU Advanced API
 
 @menu
+* Task Bundles::                
 * Defining a new data interface::  
 * Multiformat Data Interface::  
 * Defining a new scheduling policy::  
 @end menu
 
+@node Task Bundles
+@section Task Bundles
+
+@deftp {DataType} {struct starpu_task_bundle}
+The task bundle structure describes a list of tasks that should be
+scheduled together whenever possible. The different fields are:
+@table @asis
+@item @code{mutex} Mutex protecting the bundle
+@item @code{int previous_workerid} last worker previously assigned a task from the bundle (-1 if none)
+@item @code{struct starpu_task_bundle_entry *list} list of tasks
+@item @code{int destroy} If this flag is set, the bundle structure is automatically free'd when the bundle is deinitialized.
+@item @code{int closed} Is the bundle closed ?
+@end table
+@end deftp
+
+@deftypefun void starpu_task_bundle_init ({struct starpu_task_bundle *}@var{bundle})
+Initialize a task bundle
+@end deftypefun
+
+@deftypefun void starpu_task_bundle_deinit ({struct starpu_task_bundle *}@var{bundle})
+Deinitialize a bundle. In case the destroy flag is set, the bundle
+structure is freed too.
+@end deftypefun
+
+@deftypefun int starpu_task_bundle_insert ({struct starpu_task_bundle *}@var{bundle}, {struct starpu_task *}@var{task})
+Insert a task into a bundle.
+@end deftypefun
+
+@deftypefun int starpu_task_bundle_remove ({struct starpu_task_bundle *}@var{bundle}, {struct starpu_task *}@var{task})
+Remove a task from a bundle. This method must be called with
+bundle->mutex hold. This function returns 0 if the task was found,
+-ENOENT if the element was not found, 1 if the element is found and if
+the list was deinitialized because it became empty.
+@end deftypefun
+
+@deftypefun void starpu_task_bundle_close ({struct starpu_task_bundle *}@var{bundle});
+Close a bundle. No task can be added to a closed bundle. A closed
+bundle automatically gets deinitialized when it becomes empty.
+@end deftypefun
+
+@deftypefun double starpu_task_bundle_expected_length ({struct starpu_task_bundle *}@var{bundle}, {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
+Return the expected duration of the entire task bundle in µs.
+@end deftypefun
+
+@deftypefun double starpu_task_bundle_expected_data_transfer_time ({struct starpu_task_bundle *}@var{bundle}, unsigned {memory_node})
+Return the time (in µs) expected to transfer all data used within the bundle
+@end deftypefun
+
+@deftypefun double starpu_task_bundle_expected_power ({struct starpu_task_bundle *}@var{bundle},  {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
+Return the expected power consumption of the entire task bundle in J.
+@end deftypefun
+
 @node Defining a new data interface
 @section Defining a new data interface
 
@@ -118,7 +171,7 @@ the StarPU sources in the directory @code{examples/scheduler/}.
 
 @menu
 * Scheduling Policy API:: Scheduling Policy API
-* Source code::                 
+* Source code::
 @end menu
 
 @node Scheduling Policy API
@@ -152,7 +205,7 @@ assign tasks to the different workers.
 @item @code{pop_every_task}
 Remove all available tasks from the scheduler (tasks are chained by the means
 of the prev and next fields of the starpu_task structure). The mutex associated
-to the worker is already taken when this method is called. 
+to the worker is already taken when this method is called.
 @item @code{post_exec_hook} (optional)
 This method is called every time a task has been executed.
 @item @code{policy_name}
@@ -199,8 +252,37 @@ where the worker will pop tasks first. Setting "back" to 0 therefore ensures
 a FIFO ordering.
 @end deftypefun
 
+@deftypefun int starpu_worker_may_execute_task (unsigned @var{workerid}, {struct starpu_task *}@var{task}, unsigned {nimpl})
+Check if the worker specified by workerid can execute the codelet.
+@end deftypefun
 
+@deftypefun double starpu_timing_now (void)
+Return the current date
+@end deftypefun
+
+@deftypefun double starpu_task_expected_length ({struct starpu_task *}@var{task}, {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
+Returns expected task duration in µs
+@end deftypefun
 
+@deftypefun double starpu_worker_get_relative_speedup ({enum starpu_perf_archtype} @var{perf_archtype})
+Returns an estimated speedup factor relative to CPU speed
+@end deftypefun
+
+@deftypefun double starpu_task_expected_data_transfer_time (uint32_t @var{memory_node}, {struct starpu_task *}@var{task})
+Returns expected data transfer time in µs
+@end deftypefun
+
+@deftypefun double starpu_data_expected_transfer_time (starpu_data_handle @var{handle}, unsigned @var{memory_node}, starpu_access_mode @var{mode})
+Predict the transfer time (in µs) to move a handle to a memory node
+@end deftypefun
+
+@deftypefun double starpu_task_expected_power ({struct starpu_task *}@var{task}, {enum starpu_perf_archtype} @var{arch}, unsigned @var{nimpl})
+Returns expected power consumption in J
+@end deftypefun
+
+@deftypefun double starpu_task_expected_conversion_time ({struct starpu_task *}@var{task}, {enum starpu_perf_archtype} @var{arch}, unsigned {nimpl})
+Returns expected conversion time in ms (multiformat interface only)
+@end deftypefun
 
 @node Source code
 @subsection Source code

+ 271 - 0
doc/chapters/basic-api.texi

@@ -425,6 +425,7 @@ This function releases the piece of data acquired by the application either by
 @node Data Interfaces
 @section Data Interfaces
 
+
 There are several ways to register a memory region so that it can be managed by
 StarPU.  The functions below allow the registration of vectors, 2D matrices, 3D
 matrices as well as  BCSR and CSR sparse matrices.
@@ -509,6 +510,273 @@ TODO
 todo
 @end deftypefun
 
+@menu
+* Accessing Data Interfaces::   
+@end menu
+
+@node Accessing Data Interfaces
+@subsection Accessing Data Interfaces
+
+Each data interface is provided with a set of field access functions.
+The ones using a @code{void *} parameter aimed to be used in codelet
+implementations (see for example the code in @ref{Source code of Vector Scaling}).
+
+@menu
+* Accessing Variable Data Interfaces::  
+* Accessing Vector Data Interfaces::  
+* Accessing Matrix Data Interfaces::  
+* Accessing Block Data Interfaces::  
+* Accessing BCSR Data Interfaces::  
+* Accessing CSR Data Interfaces::  
+@end menu
+
+@node Accessing Variable Data Interfaces
+@subsubsection Accessing Variable Data Interfaces
+
+@deftypefun size_t starpu_variable_get_elemsize (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t starpu_variable_get_local_ptr (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t STARPU_VARIABLE_GET_PTR ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun size_t STARPU_VARIABLE_GET_ELEMSIZE ({void *}@var{interface})
+todo
+@end deftypefun
+
+@node Accessing Vector Data Interfaces
+@subsubsection Vector Data Interfaces
+
+@deftypefun uint32_t starpu_vector_get_nx (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun size_t starpu_vector_get_elemsize (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t starpu_vector_get_local_ptr (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t STARPU_VECTOR_GET_PTR ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_VECTOR_GET_NX ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun size_t STARPU_VECTOR_GET_ELEMSIZE ({void *}@var{interface})
+todo
+@end deftypefun
+
+@node Accessing Matrix Data Interfaces
+@subsubsection Matrix Data Interfaces
+
+@deftypefun uint32_t starpu_matrix_get_nx (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_matrix_get_ny (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_matrix_get_local_ld (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t starpu_matrix_get_local_ptr (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun size_t starpu_matrix_get_elemsize (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t STARPU_MATRIX_GET_PTR ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_MATRIX_GET_NX ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_MATRIX_GET_NY ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_MATRIX_GET_LD ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun size_t STARPU_MATRIX_GET_ELEMSIZE ({void *}@var{interface})
+todo
+@end deftypefun
+
+@node Accessing Block Data Interfaces
+@subsubsection Block Data Interfaces
+
+@deftypefun uint32_t starpu_block_get_nx (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_block_get_ny (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_block_get_nz (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_block_get_local_ldy (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_block_get_local_ldz (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t starpu_block_get_local_ptr (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun size_t starpu_block_get_elemsize (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t STARPU_BLOCK_GET_PTR ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_BLOCK_GET_NX ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_BLOCK_GET_NY ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_BLOCK_GET_NZ ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_BLOCK_GET_LDY ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_BLOCK_GET_LDZ ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun size_t STARPU_BLOCK_GET_ELEMSIZE ({void *}@var{interface})
+todo
+@end deftypefun
+
+@node Accessing BCSR Data Interfaces
+@subsubsection BCSR Data Interfaces
+
+@deftypefun uint32_t starpu_bcsr_get_nnz (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_bcsr_get_nrow (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_bcsr_get_firstentry (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t starpu_bcsr_get_local_nzval (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun {uint32_t *} starpu_bcsr_get_local_colind (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun {uint32_t *} starpu_bcsr_get_local_rowptr (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_bcsr_get_r (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_bcsr_get_c (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun size_t starpu_bcsr_get_elemsize (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+
+@node Accessing CSR Data Interfaces
+@subsubsection CSR Data Interfaces
+
+@deftypefun uint32_t starpu_csr_get_nnz (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_csr_get_nrow (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t starpu_csr_get_firstentry (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t starpu_csr_get_local_nzval (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun {uint32_t *} starpu_csr_get_local_colind (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun {uint32_t *} starpu_csr_get_local_rowptr (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun size_t starpu_csr_get_elemsize (starpu_data_handle @var{handle})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_CSR_GET_NNZ ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_CSR_GET_NROW ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uintptr_t STARPU_CSR_GET_NZVAL ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun {uint32_t *} STARPU_CSR_GET_COLIND ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun {uint32_t *} STARPU_CSR_GET_ROWPTR ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun uint32_t STARPU_CSR_GET_FIRSTENTRY ({void *}@var{interface})
+todo
+@end deftypefun
+
+@deftypefun size_t STARPU_CSR_GET_ELEMSIZE ({void *}@var{interface})
+todo
+@end deftypefun
+
 @node Data Partition
 @section Data Partition
 
@@ -1112,6 +1380,9 @@ TODO
 This forces sampling the bus performance model again.
 @end deftypefun
 
+@deftypefun {enum starpu_perf_archtype} starpu_worker_get_perf_archtype (int @var{workerid})
+todo
+@end deftypefun
 
 @node Profiling API
 @section Profiling API