|
@@ -764,6 +764,7 @@ This variable specify in which file the debugging output should be saved to.
|
|
|
* Initialization and Termination:: Initialization and Termination methods
|
|
|
* Workers' Properties:: Methods to enumerate workers' properties
|
|
|
* Data Library:: Methods to manipulate data
|
|
|
+* Data Interfaces::
|
|
|
* Codelets and Tasks:: Methods to construct tasks
|
|
|
* Explicit Dependencies:: Explicit Dependencies
|
|
|
* Implicit Data Dependencies:: Implicit Data Dependencies
|
|
@@ -1049,7 +1050,7 @@ worker identified by @code{workerid}.
|
|
|
|
|
|
This section describes the data management facilities provided by StarPU.
|
|
|
|
|
|
-TODO: We show how to use existing data interfaces in [ref], but developers can
|
|
|
+We show how to use existing data interfaces in @ref{Data Interfaces}, but developers can
|
|
|
design their own data interfaces if required.
|
|
|
|
|
|
@menu
|
|
@@ -1113,7 +1114,8 @@ contiguous data array on a spefic memory node. This interface is a simple
|
|
|
structure containing the number of elements in the array, the size of the
|
|
|
elements, and the address of the array in the appropriate address space (this
|
|
|
address may be invalid if there is no valid copy of the array in the memory
|
|
|
-node).
|
|
|
+node). More informations on the data interfaces provided by StarPU are
|
|
|
+given in @ref{Data Interfaces}.
|
|
|
|
|
|
When a piece of data managed by StarPU is used by a task, the task
|
|
|
implementation is given a pointer to an interface describing a valid copy of
|
|
@@ -1163,6 +1165,128 @@ undefined behaviour.
|
|
|
@c void starpu_notify_data_modification(struct starpu_data_state_t *state, uint32_t modifying_node);
|
|
|
@c struct starpu_data_interface_ops_t *ops
|
|
|
|
|
|
+@node Data Interfaces
|
|
|
+@section Data Interfaces
|
|
|
+
|
|
|
+@menu
|
|
|
+* Variable Interface::
|
|
|
+* Vector Interface::
|
|
|
+* Matrix Interface::
|
|
|
+* BCSR Interface for Sparse Matrices (Blocked Compressed Sparse Row Representation)::
|
|
|
+* CSR Interface for Sparse Matrices (Compressed Sparse Row Representation)::
|
|
|
+* Block Interface::
|
|
|
+@end menu
|
|
|
+
|
|
|
+@node Variable Interface
|
|
|
+@subsection Variable Interface
|
|
|
+
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_variable_data_register(starpu_data_handle *handle,
|
|
|
+ uint32_t home_node,
|
|
|
+ uintptr_t ptr, size_t elemsize);}
|
|
|
+@item @emph{Example}:
|
|
|
+@cartouche
|
|
|
+@smallexample
|
|
|
+float var;
|
|
|
+starpu_data_handle var_handle;
|
|
|
+starpu_variable_data_register(&var_handle, 0, (uintptr_t)&var, sizeof(var));
|
|
|
+@end smallexample
|
|
|
+@end cartouche
|
|
|
+@end table
|
|
|
+
|
|
|
+@node Vector Interface
|
|
|
+@subsection Vector Interface
|
|
|
+
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_vector_data_register(starpu_data_handle *handle, uint32_t home_node,
|
|
|
+ uintptr_t ptr, uint32_t nx, size_t elemsize);}
|
|
|
+@item @emph{Example}:
|
|
|
+@cartouche
|
|
|
+@smallexample
|
|
|
+float vector[NX];
|
|
|
+starpu_data_handle vector_handle;
|
|
|
+starpu_vector_data_register(&vector_handle, 0, (uintptr_t)vector, NX,
|
|
|
+ sizeof(vector[0]));
|
|
|
+@end smallexample
|
|
|
+@end cartouche
|
|
|
+@end table
|
|
|
+
|
|
|
+@node Matrix Interface
|
|
|
+@subsection Matrix Interface
|
|
|
+
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_matrix_data_register(starpu_data_handle *handle, uint32_t home_node,
|
|
|
+ uintptr_t ptr, uint32_t ld, uint32_t nx,
|
|
|
+ uint32_t ny, size_t elemsize);}
|
|
|
+@item @emph{Example}:
|
|
|
+@cartouche
|
|
|
+@smallexample
|
|
|
+float *matrix;
|
|
|
+starpu_data_handle matrix_handle;
|
|
|
+matrix = (float*)malloc(width * height * sizeof(float));
|
|
|
+starpu_matrix_data_register(&matrix_handle, 0, (uintptr_t)matrix,
|
|
|
+ width, width, height, sizeof(float));
|
|
|
+@end smallexample
|
|
|
+@end cartouche
|
|
|
+@end table
|
|
|
+
|
|
|
+@node BCSR Interface for Sparse Matrices (Blocked Compressed Sparse Row Representation)
|
|
|
+@subsection BCSR Interface for Sparse Matrices (Blocked Compressed Sparse Row Representation)
|
|
|
+
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_bcsr_data_register(starpu_data_handle *handle, uint32_t home_node, uint32_t nnz, uint32_t nrow,
|
|
|
+ uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, uint32_t r, uint32_t c, size_t elemsize);}
|
|
|
+@item @emph{Example}:
|
|
|
+@cartouche
|
|
|
+@smallexample
|
|
|
+@end smallexample
|
|
|
+@end cartouche
|
|
|
+@end table
|
|
|
+
|
|
|
+@node CSR Interface for Sparse Matrices (Compressed Sparse Row Representation)
|
|
|
+@subsection CSR Interface for Sparse Matrices (Compressed Sparse Row Representation)
|
|
|
+
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_csr_data_register(starpu_data_handle *handle, uint32_t home_node, uint32_t nnz, uint32_t nrow,
|
|
|
+ uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize);}
|
|
|
+@item @emph{Example}:
|
|
|
+@cartouche
|
|
|
+@smallexample
|
|
|
+@end smallexample
|
|
|
+@end cartouche
|
|
|
+@end table
|
|
|
+
|
|
|
+@node Block Interface
|
|
|
+@subsection Block Interface
|
|
|
+
|
|
|
+@table @asis
|
|
|
+@item @emph{Description}:
|
|
|
+@item @emph{Prototype}:
|
|
|
+@code{void starpu_block_data_register(starpu_data_handle *handle, uint32_t home_node,
|
|
|
+ uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx,
|
|
|
+ uint32_t ny, uint32_t nz, size_t elemsize);}
|
|
|
+@item @emph{Example}:
|
|
|
+@cartouche
|
|
|
+@smallexample
|
|
|
+float *block;
|
|
|
+starpu_data_handle block_handle;
|
|
|
+block = (float*)malloc(nx*ny*nz*sizeof(float));
|
|
|
+starpu_block_data_register(&block_handle, 0, (uintptr_t)block,
|
|
|
+ nx, nx*ny, nx, ny, nz, sizeof(float));
|
|
|
+@end smallexample
|
|
|
+@end cartouche
|
|
|
+@end table
|
|
|
+
|
|
|
@node Codelets and Tasks
|
|
|
@section Codelets and Tasks
|
|
|
|