|
@@ -48,7 +48,9 @@ Unpack the data handle from the contiguous buffer at the address ptr
|
|
|
of size count
|
|
|
|
|
|
\struct starpu_data_copy_methods
|
|
|
-\brief Defines the per-interface methods. If the any_to_any method is
|
|
|
+\brief Defines the per-interface methods.
|
|
|
+
|
|
|
+If the any_to_any method is
|
|
|
provided, it will be used by default if no more specific method is
|
|
|
provided. It can still be useful to provide more specific method in
|
|
|
case of e.g. available particular CUDA or OpenCL support.
|
|
@@ -153,7 +155,7 @@ matrices.
|
|
|
|
|
|
\fn void starpu_void_data_register(starpu_data_handle_t *handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Register a void interface. There is no data really associated
|
|
|
+Register a void interface. There is no data really associated
|
|
|
to that interface, but it may be used as a synchronization mechanism.
|
|
|
It also permits to express an abstract piece of data that is managed
|
|
|
by the application internally: this makes it possible to forbid the
|
|
@@ -162,7 +164,7 @@ in read-write concurrently.
|
|
|
|
|
|
\fn void starpu_variable_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, size_t size)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Register the \p size byte element pointed to by \p ptr, which is
|
|
|
+Register the \p size byte element pointed to by \p ptr, which is
|
|
|
typically a scalar, and initialize \p handle to represent this data item.
|
|
|
|
|
|
Here an example of how to use the function.
|
|
@@ -174,7 +176,7 @@ starpu_variable_data_register(&var_handle, 0, (uintptr_t)&var, sizeof(var));
|
|
|
|
|
|
\fn void starpu_vector_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t nx, size_t elemsize)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Register the \p nx elemsize-byte elements pointed to by \p ptr and initialize \p handle to represent it.
|
|
|
+Register the \p nx elemsize-byte elements pointed to by \p ptr and initialize \p handle to represent it.
|
|
|
|
|
|
Here an example of how to use the function.
|
|
|
\code{.c}
|
|
@@ -185,7 +187,7 @@ starpu_vector_data_register(&vector_handle, 0, (uintptr_t)vector, NX, sizeof(vec
|
|
|
|
|
|
\fn void starpu_matrix_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Register the \p nx x \p ny 2D matrix of \p elemsize-byte elements pointed
|
|
|
+Register the \p nx x \p ny 2D matrix of \p elemsize-byte elements pointed
|
|
|
by \p ptr and initialize \p handle to represent it. \p ld specifies the number
|
|
|
of elements between rows. a value greater than \p nx adds padding, which
|
|
|
can be useful for alignment purposes.
|
|
@@ -200,7 +202,7 @@ starpu_matrix_data_register(&matrix_handle, 0, (uintptr_t)matrix, width, width,
|
|
|
|
|
|
\fn void starpu_block_data_register(starpu_data_handle_t *handle, unsigned home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Register the \p nx x \p ny x \p nz 3D matrix of \p elemsize byte elements
|
|
|
+Register the \p nx x \p ny x \p nz 3D matrix of \p elemsize byte elements
|
|
|
pointed by \p ptr and initialize \p handle to represent it. Again, \p ldy and
|
|
|
\p ldz specify the number of elements between rows and between z planes.
|
|
|
|
|
@@ -214,7 +216,7 @@ starpu_block_data_register(&block_handle, 0, (uintptr_t)block, nx, nx*ny, nx, ny
|
|
|
|
|
|
\fn void starpu_bcsr_data_register(starpu_data_handle_t *handle, unsigned 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)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief This variant of starpu_data_register() uses the BCSR (Blocked
|
|
|
+This variant of starpu_data_register() uses the BCSR (Blocked
|
|
|
Compressed Sparse Row Representation) sparse matrix interface.
|
|
|
Register the sparse matrix made of \p nnz non-zero blocks of elements of
|
|
|
size \p elemsize stored in \p nzval and initializes \p handle to represent it.
|
|
@@ -226,18 +228,18 @@ blocks), \p colind[i] is the block-column index for block i in \p nzval,
|
|
|
|
|
|
\fn void starpu_csr_data_register(starpu_data_handle_t *handle, unsigned home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief This variant of starpu_data_register() uses the CSR (Compressed
|
|
|
+This variant of starpu_data_register() uses the CSR (Compressed
|
|
|
Sparse Row Representation) sparse matrix interface. TODO
|
|
|
|
|
|
\fn void starpu_coo_data_register(starpu_data_handle_t *handleptr, unsigned home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize);
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Register the \p nx x \p ny 2D matrix given in the COO format, using the
|
|
|
+Register the \p nx x \p ny 2D matrix given in the COO format, using the
|
|
|
\p columns, \p rows, \p values arrays, which must have \p n_values elements of
|
|
|
size \p elemsize. Initialize \p handleptr.
|
|
|
|
|
|
\fn void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the interface associated with \p handle on \p memory_node.
|
|
|
+Return the interface associated with \p handle on \p memory_node.
|
|
|
|
|
|
@name Accessing Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
@@ -249,27 +251,27 @@ Vector_Scaling_Using_StarPU_API).
|
|
|
|
|
|
\fn void *starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the pointer associated with \p handle on node \p node or <c>NULL</c>
|
|
|
+Return the pointer associated with \p handle on node \p node or <c>NULL</c>
|
|
|
if handle’s interface does not support this operation or data for this
|
|
|
\p handle is not allocated on that \p node.
|
|
|
|
|
|
\fn void *starpu_data_get_local_ptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the local pointer associated with \p handle or <c>NULL</c> if
|
|
|
+Return the local pointer associated with \p handle or <c>NULL</c> if
|
|
|
\p handle’s interface does not have data allocated locally
|
|
|
|
|
|
\fn enum starpu_data_interface_id starpu_data_get_interface_id(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the unique identifier of the interface associated with
|
|
|
+Return the unique identifier of the interface associated with
|
|
|
the given \p handle.
|
|
|
|
|
|
\fn size_t starpu_data_get_size(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the data associated with \p handle.
|
|
|
+Return the size of the data associated with \p handle.
|
|
|
|
|
|
\fn int starpu_data_pack(starpu_data_handle_t handle, void **ptr, starpu_ssize_t *count)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Execute the packing operation of the interface of the data
|
|
|
+Execute the packing operation of the interface of the data
|
|
|
registered at \p handle (see starpu_data_interface_ops). This
|
|
|
packing operation must allocate a buffer large enough at \p ptr and copy
|
|
|
into the newly allocated buffer the data associated to \p handle. \p count
|
|
@@ -280,7 +282,7 @@ value -1 indicates the size is yet unknown.
|
|
|
|
|
|
\fn int starpu_data_unpack(starpu_data_handle_t handle, void *ptr, size_t count)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Unpack in handle the data located at \p ptr of size \p count as
|
|
|
+Unpack in handle the data located at \p ptr of size \p count as
|
|
|
described by the interface of the data. The interface registered at
|
|
|
\p handle must define a unpacking operation (see
|
|
|
starpu_data_interface_ops). The memory at the address \p ptr is freed
|
|
@@ -289,467 +291,606 @@ after calling the data unpacking operation.
|
|
|
@name Accessing Variable Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_variable_interface
|
|
|
+\brief Variable interface for a single data (not a vector, a matrix, a list, ...)
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\var starpu_variable_interface::id
|
|
|
+Identifier of the interface
|
|
|
+\var starpu_variable_interface::ptr
|
|
|
+local pointer of the variable
|
|
|
+\var starpu_variable_interface::dev_handle
|
|
|
+device handle of the variable.
|
|
|
+\var starpu_variable_interface::offset
|
|
|
+offset in the variable
|
|
|
+\var starpu_variable_interface::elemsize
|
|
|
+size of the variable
|
|
|
+
|
|
|
\fn size_t starpu_variable_get_elemsize(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the variable designated by \p handle.
|
|
|
+Return the size of the variable designated by \p handle.
|
|
|
|
|
|
\fn uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the variable designated by \p handle.
|
|
|
+Return a pointer to the variable designated by \p handle.
|
|
|
|
|
|
\def STARPU_VARIABLE_GET_PTR(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the variable designated by \p interface.
|
|
|
+Return a pointer to the variable designated by \p interface.
|
|
|
|
|
|
\def STARPU_VARIABLE_GET_ELEMSIZE(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the variable designated by \p interface.
|
|
|
+Return the size of the variable designated by \p interface.
|
|
|
|
|
|
\def STARPU_VARIABLE_GET_DEV_HANDLE(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the variable designated by
|
|
|
+Return a device handle for the variable designated by
|
|
|
\p interface, to be used on OpenCL. The offset documented below has to be
|
|
|
used in addition to this.
|
|
|
|
|
|
\def STARPU_VARIABLE_GET_OFFSET()
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the variable designated by \p interface, to
|
|
|
+Return the offset in the variable designated by \p interface, to
|
|
|
be used with the device handle.
|
|
|
|
|
|
@name Accessing Vector Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_vector_interface
|
|
|
+\brief Vector interface
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\var starpu_vector_interface::id
|
|
|
+Identifier of the interface
|
|
|
+\var starpu_vector_interface::ptr
|
|
|
+local pointer of the vector
|
|
|
+\var starpu_vector_interface::dev_handle
|
|
|
+device handle of the vector.
|
|
|
+\var starpu_vector_interface::offset
|
|
|
+offset in the vector
|
|
|
+\var starpu_vector_interface::nx
|
|
|
+number of elements on the x-axis of the vector
|
|
|
+\var starpu_vector_interface::elemsize
|
|
|
+size of the elements of the vector
|
|
|
+
|
|
|
\fn uint32_t starpu_vector_get_nx(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements registered into the array designated by \p handle.
|
|
|
+Return the number of elements registered into the array designated by \p handle.
|
|
|
|
|
|
\fn size_t starpu_vector_get_elemsize(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of each element of the array designated by \p handle.
|
|
|
+Return the size of each element of the array designated by \p handle.
|
|
|
|
|
|
\fn uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the local pointer associated with \p handle.
|
|
|
+Return the local pointer associated with \p handle.
|
|
|
|
|
|
\def STARPU_VECTOR_GET_PTR(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the array designated by \p interface, valid on
|
|
|
+Return a pointer to the array designated by \p interface, valid on
|
|
|
CPUs and CUDA only. For OpenCL, the device handle and offset need to
|
|
|
be used instead.
|
|
|
|
|
|
\def STARPU_VECTOR_GET_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the array designated by \p interface,
|
|
|
+Return a device handle for the array designated by \p interface,
|
|
|
to be used on OpenCL. the offset documented below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_VECTOR_GET_OFFSET(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the array designated by \p interface, to be
|
|
|
+Return the offset in the array designated by \p interface, to be
|
|
|
used with the device handle.
|
|
|
|
|
|
\def STARPU_VECTOR_GET_NX(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements registered into the array
|
|
|
+Return the number of elements registered into the array
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_VECTOR_GET_ELEMSIZE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of each element of the array designated by
|
|
|
+Return the size of each element of the array designated by
|
|
|
\p interface.
|
|
|
|
|
|
@name Accessing Matrix Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_matrix_interface
|
|
|
+\brief Matrix interface for dense matrices
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\var starpu_matrix_interface::id
|
|
|
+Identifier of the interface
|
|
|
+\var starpu_matrix_interface::ptr
|
|
|
+local pointer of the matrix
|
|
|
+\var starpu_matrix_interface::dev_handle
|
|
|
+device handle of the matrix.
|
|
|
+\var starpu_matrix_interface::offset
|
|
|
+offset in the matrix
|
|
|
+\var starpu_matrix_interface::nx
|
|
|
+number of elements on the x-axis of the matrix
|
|
|
+\var starpu_matrix_interface::ny
|
|
|
+number of elements on the y-axis of the matrix
|
|
|
+\var starpu_matrix_interface::ld
|
|
|
+number of elements between each row of the matrix. Maybe be equal to
|
|
|
+starpu_matrix_interface::nx when there is no padding.
|
|
|
+\var starpu_matrix_interface::elemsize
|
|
|
+size of the elements of the matrix
|
|
|
+
|
|
|
\fn uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the x-axis of the matrix
|
|
|
+Return the number of elements on the x-axis of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the y-axis of the matrix
|
|
|
+Return the number of elements on the y-axis of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements between each row of the matrix
|
|
|
+Return the number of elements between each row of the matrix
|
|
|
designated by \p handle. Maybe be equal to nx when there is no padding.
|
|
|
|
|
|
\fn uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the local pointer associated with \p handle.
|
|
|
+Return the local pointer associated with \p handle.
|
|
|
|
|
|
\fn size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements registered into the matrix
|
|
|
+Return the size of the elements registered into the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_PTR(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the matrix designated by \p interface, valid
|
|
|
+Return a pointer to the matrix designated by \p interface, valid
|
|
|
on CPUs and CUDA devices only. For OpenCL devices, the device handle
|
|
|
and offset need to be used instead.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the matrix designated by \p interface,
|
|
|
+Return a device handle for the matrix designated by \p interface,
|
|
|
to be used on OpenCL. The offset documented below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_OFFSET(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the matrix designated by \p interface, to be
|
|
|
+Return the offset in the matrix designated by \p interface, to be
|
|
|
used with the device handle.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_NX(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the x-axis of the matrix
|
|
|
+Return the number of elements on the x-axis of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_NY(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the y-axis of the matrix
|
|
|
+Return the number of elements on the y-axis of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_LD(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements between each row of the matrix
|
|
|
+Return the number of elements between each row of the matrix
|
|
|
designated by \p interface. May be equal to nx when there is no padding.
|
|
|
|
|
|
\def STARPU_MATRIX_GET_ELEMSIZE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements registered into the matrix
|
|
|
+Return the size of the elements registered into the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
@name Accessing Block Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_block_interface
|
|
|
+\brief Block interface for 3D dense blocks
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\struct starpu_block_interface::id
|
|
|
+identifier of the interface
|
|
|
+\var starpu_block_interface::ptr
|
|
|
+local pointer of the block
|
|
|
+\var starpu_block_interface::dev_handle
|
|
|
+device handle of the block.
|
|
|
+\var starpu_block_interface::offset
|
|
|
+offset in the block.
|
|
|
+\var starpu_block_interface::nx
|
|
|
+number of elements on the x-axis of the block.
|
|
|
+\var starpu_block_interface::ny
|
|
|
+number of elements on the y-axis of the block.
|
|
|
+\var starpu_block_interface::nz
|
|
|
+number of elements on the z-axis of the block.
|
|
|
+\var starpu_block_interface::ldy
|
|
|
+number of elements between two lines
|
|
|
+\var starpu_block_interface::ldz
|
|
|
+number of elements between two planes
|
|
|
+\var starpu_block_interface::elemsize
|
|
|
+size of the elements of the block.
|
|
|
+
|
|
|
\fn uint32_t starpu_block_get_nx(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the x-axis of the block
|
|
|
+Return the number of elements on the x-axis of the block
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_block_get_ny(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the y-axis of the block
|
|
|
+Return the number of elements on the y-axis of the block
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_block_get_nz(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the z-axis of the block
|
|
|
+Return the number of elements on the z-axis of the block
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_block_get_local_ldy(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements between each row of the block
|
|
|
+Return the number of elements between each row of the block
|
|
|
designated by \p handle, in the format of the current memory node.
|
|
|
|
|
|
\fn uint32_t starpu_block_get_local_ldz(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements between each z plane of the block
|
|
|
+Return the number of elements between each z plane of the block
|
|
|
designated by \p handle, in the format of the current memory node.
|
|
|
|
|
|
\fn uintptr_t starpu_block_get_local_ptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the local pointer associated with \p handle.
|
|
|
+Return the local pointer associated with \p handle.
|
|
|
|
|
|
\fn size_t starpu_block_get_elemsize(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements of the block designated by
|
|
|
+Return the size of the elements of the block designated by
|
|
|
\p handle.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_PTR(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the block designated by \p interface.
|
|
|
+Return a pointer to the block designated by \p interface.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the block designated by \p interface,
|
|
|
+Return a device handle for the block designated by \p interface,
|
|
|
to be used on OpenCL. The offset document below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_OFFSET(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the block designated by \p interface, to be
|
|
|
+Return the offset in the block designated by \p interface, to be
|
|
|
used with the device handle.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_NX(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the x-axis of the block
|
|
|
+Return the number of elements on the x-axis of the block
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_NY(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the y-axis of the block
|
|
|
+Return the number of elements on the y-axis of the block
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_NZ(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the z-axis of the block
|
|
|
+Return the number of elements on the z-axis of the block
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_LDY(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements between each row of the block
|
|
|
+Return the number of elements between each row of the block
|
|
|
designated by \p interface. May be equal to nx when there is no padding.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_LDZ(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements between each z plane of the block
|
|
|
+Return the number of elements between each z plane of the block
|
|
|
designated by \p interface. May be equal to nx*ny when there is no
|
|
|
padding.
|
|
|
|
|
|
\def STARPU_BLOCK_GET_ELEMSIZE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements of the block designated by
|
|
|
+Return the size of the elements of the block designated by
|
|
|
\p interface.
|
|
|
|
|
|
@name Accessing BCSR Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_bcsr_interface
|
|
|
+\brief BCSR interface for sparse matrices (blocked compressed sparse
|
|
|
+row representation)
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\var starpu_bcsr_interface::id
|
|
|
+Identifier of the interface
|
|
|
+\var starpu_bcsr_interface::nnz
|
|
|
+number of non-zero BLOCKS
|
|
|
+\var starpu_bcsr_interface::nrow
|
|
|
+number of rows (in terms of BLOCKS)
|
|
|
+\var starpu_bcsr_interface::nzval
|
|
|
+non-zero values
|
|
|
+\var starpu_bcsr_interface::colind
|
|
|
+position of non-zero entried on the row
|
|
|
+\var starpu_bcsr_interface::rowptr
|
|
|
+index (in nzval) of the first entry of the row
|
|
|
+\var starpu_bcsr_interface::firstentry
|
|
|
+k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix.
|
|
|
+\var starpu_bcsr_interface::r
|
|
|
+size of the blocks
|
|
|
+\var starpu_bcsr_interface::c
|
|
|
+size of the blocks
|
|
|
+\var starpu_bcsr_interface::elemsize;
|
|
|
+size of the elements of the matrix
|
|
|
+
|
|
|
\fn uint32_t starpu_bcsr_get_nnz(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of non-zero elements in the matrix designated
|
|
|
+Return the number of non-zero elements in the matrix designated
|
|
|
by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_bcsr_get_nrow(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of rows (in terms of blocks of size r*c) in
|
|
|
+Return the number of rows (in terms of blocks of size r*c) in
|
|
|
the matrix designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_bcsr_get_firstentry(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the index at which all arrays (the column indexes, the
|
|
|
+Return the index at which all arrays (the column indexes, the
|
|
|
row pointers...) of the matrix desginated by \p handle.
|
|
|
|
|
|
\fn uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the non-zero values of the matrix
|
|
|
+Return a pointer to the non-zero values of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t * starpu_bcsr_get_local_colind(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the column index, which holds the positions
|
|
|
+Return a pointer to the column index, which holds the positions
|
|
|
of the non-zero entries in the matrix designated by \p handle.
|
|
|
|
|
|
\fn uint32_t * starpu_bcsr_get_local_rowptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the row pointer array of the matrix designated by
|
|
|
+Return the row pointer array of the matrix designated by
|
|
|
\p handle.
|
|
|
|
|
|
\fn uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of rows in a block.
|
|
|
+Return the number of rows in a block.
|
|
|
|
|
|
\fn uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the numberof columns in a block.
|
|
|
+Return the numberof columns in a block.
|
|
|
|
|
|
\fn size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements in the matrix designated by
|
|
|
+Return the size of the elements in the matrix designated by
|
|
|
\p handle.
|
|
|
|
|
|
\def STARPU_BCSR_GET_NNZ(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of non-zero values in the matrix designated
|
|
|
+Return the number of non-zero values in the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_BCSR_GET_NZVAL(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the non-zero values of the matrix
|
|
|
+Return a pointer to the non-zero values of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_BCSR_GET_NZVAL_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the array of non-zero values in the
|
|
|
+Return a device handle for the array of non-zero values in the
|
|
|
matrix designated by \p interface. The offset documented below has to be
|
|
|
used in addition to this.
|
|
|
|
|
|
\def STARPU_BCSR_GET_COLIND(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the column index of the matrix designated
|
|
|
+Return a pointer to the column index of the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_BCSR_GET_COLIND_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the column index of the matrix
|
|
|
+Return a device handle for the column index of the matrix
|
|
|
designated by \p interface. The offset documented below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_BCSR_GET_ROWPTR(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the row pointer array of the matrix
|
|
|
+Return a pointer to the row pointer array of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_CSR_GET_ROWPTR_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the row pointer array of the matrix
|
|
|
+Return a device handle for the row pointer array of the matrix
|
|
|
designated by \p interface. The offset documented below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_BCSR_GET_OFFSET(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the arrays (coling, rowptr, nzval) of the
|
|
|
+Return the offset in the arrays (coling, rowptr, nzval) of the
|
|
|
matrix designated by \p interface, to be used with the device handles.
|
|
|
|
|
|
-
|
|
|
@name Accessing CSR Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_csr_interface
|
|
|
+\brief CSR interface for sparse matrices (compressed sparse row representation)
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\var starpu_csr_interface::id
|
|
|
+Identifier of the interface
|
|
|
+\var starpu_csr_interface::nnz
|
|
|
+number of non-zero entries
|
|
|
+\var starpu_csr_interface::nrow
|
|
|
+number of rows
|
|
|
+\var starpu_csr_interface::nzval
|
|
|
+non-zero values
|
|
|
+\var starpu_csr_interface::colind
|
|
|
+position of non-zero entries on the row
|
|
|
+\var starpu_csr_interface::rowptr
|
|
|
+index (in nzval) of the first entry of the row
|
|
|
+\var starpu_csr_interface::firstentry
|
|
|
+k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix.
|
|
|
+\var starpu_csr_interface::elemsize
|
|
|
+size of the elements of the matrix
|
|
|
+
|
|
|
\fn uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of non-zero values in the matrix designated
|
|
|
+Return the number of non-zero values in the matrix designated
|
|
|
by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the row pointer array of the matrix
|
|
|
+Return the size of the row pointer array of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the index at which all arrays (the column indexes, the
|
|
|
+Return the index at which all arrays (the column indexes, the
|
|
|
row pointers...) of the matrix designated by \p handle.
|
|
|
|
|
|
\fn uintptr_t starpu_csr_get_local_nzval(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a local pointer to the non-zero values of the matrix
|
|
|
+Return a local pointer to the non-zero values of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t * starpu_csr_get_local_colind(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a local pointer to the column index of the matrix
|
|
|
+Return a local pointer to the column index of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn uint32_t * starpu_csr_get_local_rowptr(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a local pointer to the row pointer array of the matrix
|
|
|
+Return a local pointer to the row pointer array of the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\fn size_t starpu_csr_get_elemsize(starpu_data_handle_t handle)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements registered into the matrix
|
|
|
+Return the size of the elements registered into the matrix
|
|
|
designated by \p handle.
|
|
|
|
|
|
\def STARPU_CSR_GET_NNZ(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of non-zero values in the matrix designated
|
|
|
+Return the number of non-zero values in the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_CSR_GET_NROW(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the row pointer array of the matrix
|
|
|
+Return the size of the row pointer array of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_CSR_GET_NZVAL(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the non-zero values of the matrix
|
|
|
+Return a pointer to the non-zero values of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_CSR_GET_NZVAL_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the array of non-zero values in the
|
|
|
+Return a device handle for the array of non-zero values in the
|
|
|
matrix designated by \p interface. The offset documented below has to be
|
|
|
used in addition to this.
|
|
|
|
|
|
\def STARPU_CSR_GET_COLIND(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the column index of the matrix designated
|
|
|
+Return a pointer to the column index of the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_CSR_GET_COLIND_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the column index of the matrix
|
|
|
+Return a device handle for the column index of the matrix
|
|
|
designated by \p interface. The offset documented below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_CSR_GET_ROWPTR(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the row pointer array of the matrix
|
|
|
+Return a pointer to the row pointer array of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_CSR_GET_ROWPTR_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the row pointer array of the matrix
|
|
|
+Return a device handle for the row pointer array of the matrix
|
|
|
designated by \p interface. The offset documented below has to be used in
|
|
|
addition to this.
|
|
|
|
|
|
\def STARPU_CSR_GET_OFFSET(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the arrays (colind, rowptr, nzval) of the
|
|
|
+Return the offset in the arrays (colind, rowptr, nzval) of the
|
|
|
matrix designated by \p interface, to be used with the device handles.
|
|
|
|
|
|
\def STARPU_CSR_GET_FIRSTENTRY(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the index at which all arrays (the column indexes, the
|
|
|
+Return the index at which all arrays (the column indexes, the
|
|
|
row pointers...) of the \p interface start.
|
|
|
|
|
|
\def STARPU_CSR_GET_ELEMSIZE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements registered into the matrix
|
|
|
+Return the size of the elements registered into the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
@name Accessing COO Data Interfaces
|
|
|
\ingroup Data_Interfaces
|
|
|
|
|
|
+\struct starpu_coo_interface
|
|
|
+\brief COO Matrices
|
|
|
+\ingroup Data_Interfaces
|
|
|
+\var starpu_coo_interface::id
|
|
|
+identifier of the interface
|
|
|
+\var starpu_coo_interface::columns
|
|
|
+column array of the matrix
|
|
|
+\var starpu_coo_interface::rows
|
|
|
+row array of the matrix
|
|
|
+\var starpu_coo_interface::values
|
|
|
+values of the matrix
|
|
|
+\var starpu_coo_interface::nx
|
|
|
+number of elements on the x-axis of the matrix
|
|
|
+\var starpu_coo_interface::ny
|
|
|
+number of elements on the y-axis of the matrix
|
|
|
+\var starpu_coo_interface::n_values
|
|
|
+number of values registered in the matrix
|
|
|
+\var starpu_coo_interface::elemsize
|
|
|
+size of the elements of the matrix
|
|
|
+
|
|
|
\def STARPU_COO_GET_COLUMNS(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the column array of the matrix designated
|
|
|
+Return a pointer to the column array of the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_COLUMNS_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the column array of the matrix
|
|
|
+Return a device handle for the column array of the matrix
|
|
|
designated by \p interface, to be used on OpenCL. The offset documented
|
|
|
below has to be used in addition to this.
|
|
|
|
|
|
\def STARPU_COO_GET_ROWS(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the rows array of the matrix designated by
|
|
|
+Return a pointer to the rows array of the matrix designated by
|
|
|
\p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_ROWS_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the row array of the matrix
|
|
|
+Return a device handle for the row array of the matrix
|
|
|
designated by \p interface, to be used on OpenCL. The offset documented
|
|
|
below has to be used in addition to this.
|
|
|
|
|
|
\def STARPU_COO_GET_VALUES(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a pointer to the values array of the matrix designated
|
|
|
+Return a pointer to the values array of the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_VALUES_DEV_HANDLE(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return a device handle for the value array of the matrix
|
|
|
+Return a device handle for the value array of the matrix
|
|
|
designated by \p interface, to be used on OpenCL. The offset documented
|
|
|
below has to be used in addition to this.
|
|
|
|
|
|
-\def STARPU_COO_GET_OFFSET(void *itnerface)
|
|
|
+\def STARPU_COO_GET_OFFSET(void *interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the offset in the arrays of the COO matrix designated by
|
|
|
+Return the offset in the arrays of the COO matrix designated by
|
|
|
\p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_NX(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the x-axis of the matrix
|
|
|
+Return the number of elements on the x-axis of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_NY(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of elements on the y-axis of the matrix
|
|
|
+Return the number of elements on the y-axis of the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_NVALUES(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the number of values registered in the matrix designated
|
|
|
+Return the number of values registered in the matrix designated
|
|
|
by \p interface.
|
|
|
|
|
|
\def STARPU_COO_GET_ELEMSIZE(interface)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the size of the elements registered into the matrix
|
|
|
+Return the size of the elements registered into the matrix
|
|
|
designated by \p interface.
|
|
|
|
|
|
@name Defining Interface
|
|
@@ -760,17 +901,17 @@ Defining_a_New_Data_Interface.
|
|
|
|
|
|
\fn uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Allocate \p size bytes on node \p dst_node. This returns 0 if
|
|
|
+Allocate \p size bytes on node \p dst_node. This returns 0 if
|
|
|
allocation failed, the allocation method should then return <c>-ENOMEM</c> as
|
|
|
allocated size.
|
|
|
|
|
|
\fn void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Free \p addr of \p size bytes on node \p dst_node.
|
|
|
+Free \p addr of \p size bytes on node \p dst_node.
|
|
|
|
|
|
\fn int starpu_interface_copy(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size, void *async_data)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Copy \p size bytes from byte offset \p src_offset of \p src on \p src_node
|
|
|
+Copy \p size bytes from byte offset \p src_offset of \p src on \p src_node
|
|
|
to byte offset \p dst_offset of \p dst on \p dst_node. This is to be used in
|
|
|
the any_to_any() copy method, which is provided with the async_data to
|
|
|
be passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the
|
|
@@ -778,28 +919,28 @@ transfer is still ongoing, or 0 if the transfer is already completed.
|
|
|
|
|
|
\fn uint32_t starpu_hash_crc32c_be_n(const void *input, size_t n, uint32_t inputcrc)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Compute the CRC of a byte buffer seeded by the \p inputcrc
|
|
|
+Compute the CRC of a byte buffer seeded by the \p inputcrc
|
|
|
<em>current state</em>. The return value should be considered as the new
|
|
|
<em>current state</em> for future CRC computation. This is used for computing
|
|
|
data size footprint.
|
|
|
|
|
|
\fn uint32_t starpu_hash_crc32c_be(uint32_t input, uint32_t inputcrc)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Compute the CRC of a 32bit number seeded by the \p inputcrc
|
|
|
+Compute the CRC of a 32bit number seeded by the \p inputcrc
|
|
|
<em>current state</em>. The return value should be considered as the new
|
|
|
<em>current state</em> for future CRC computation. This is used for computing
|
|
|
data size footprint.
|
|
|
|
|
|
\fn uint32_t starpu_hash_crc32c_string(const char *str, uint32_t inputcrc)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Compute the CRC of a string seeded by the \p inputcrc <em>current
|
|
|
+Compute the CRC of a string seeded by the \p inputcrc <em>current
|
|
|
state</em>. The return value should be considered as the new <em>current
|
|
|
state</em> for future CRC computation. This is used for computing data
|
|
|
size footprint.
|
|
|
|
|
|
\fn int starpu_data_interface_get_next_id(void)
|
|
|
\ingroup Data_Interfaces
|
|
|
-\brief Return the next available id for a newly created data interface
|
|
|
+Return the next available id for a newly created data interface
|
|
|
(\ref Defining_a_New_Data_Interface).
|
|
|
|
|
|
*/
|