/* * This file is part of the StarPU Handbook. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1 * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique * See the file version.doxy for copying conditions. */ /*! \defgroup Data_Interfaces Data Interfaces \struct starpu_data_interface_ops \brief Per-interface data transfer methods. \ingroup Data_Interfaces \var starpu_data_interface_ops::register_data_handle Register an existing interface into a data handle. \var starpu_data_interface_ops::allocate_data_on_node Allocate data for the interface on a given node. \var starpu_data_interface_ops::free_data_on_node Free data of the interface on a given node. \var starpu_data_interface_ops::copy_methods ram/cuda/opencl synchronous and asynchronous transfer methods. \var starpu_data_interface_ops::handle_to_pointer Return the current pointer (if any) for the handle on the given node. \var starpu_data_interface_ops::get_size Return an estimation of the size of data, for performance models. \var starpu_data_interface_ops::footprint Return a 32bit footprint which characterizes the data size. \var starpu_data_interface_ops::compare Compare the data size of two interfaces. \var starpu_data_interface_ops::display Dump the sizes of a handle to a file. \var starpu_data_interface_ops::interfaceid An identifier that is unique to each interface. \var starpu_data_interface_ops::interface_size The size of the interface data descriptor. \var starpu_data_interface_ops::is_multiformat todo \var starpu_data_interface_ops::get_mf_ops todo \var starpu_data_interface_ops::pack_data Pack the data handle into a contiguous buffer at the address ptr and set the size of the newly created buffer in count. If ptr is NULL, the function should not copy the data in the buffer but just set count to the size of the buffer which would have been allocated. The special value -1 indicates the size is yet unknown. \var starpu_data_interface_ops::unpack_data 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 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. \ingroup Data_Interfaces \var starpu_data_copy_methods::ram_to_ram Define how to copy data from the src_interface interface on the src_node CPU node to the dst_interface interface on the dst_node CPU node. Return 0 on success. \var starpu_data_copy_methods::ram_to_cuda Define how to copy data from the src_interface interface on the src_node CPU node to the dst_interface interface on the dst_node CUDA node. Return 0 on success. \var starpu_data_copy_methods::ram_to_opencl Define how to copy data from the src_interface interface on the src_node CPU node to the dst_interface interface on the dst_node OpenCL node. Return 0 on success. \var starpu_data_copy_methods::cuda_to_ram Define how to copy data from the src_interface interface on the src_node CUDA node to the dst_interface interface on the dst_node CPU node. Return 0 on success. \var starpu_data_copy_methods::cuda_to_cuda Define how to copy data from the src_interface interface on the src_node CUDA node to the dst_interface interface on the dst_node CUDA node. Return 0 on success. \var starpu_data_copy_methods::cuda_to_opencl Define how to copy data from the src_interface interface on the src_node CUDA node to the dst_interface interface on the dst_node OpenCL node. Return 0 on success. \var starpu_data_copy_methods::opencl_to_ram Define how to copy data from the src_interface interface on the src_node OpenCL node to the dst_interface interface on the dst_node CPU node. Return 0 on success. \var starpu_data_copy_methods::opencl_to_cuda Define how to copy data from the src_interface interface on the src_node OpenCL node to the dst_interface interface on the dst_node CUDA node. Return 0 on success. \var starpu_data_copy_methods::opencl_to_opencl Define how to copy data from the src_interface interface on the src_node OpenCL node to the dst_interface interface on the dst_node OpenCL node. Return 0 on success. \var starpu_data_copy_methods::ram_to_cuda_async Define how to copy data from the src_interface interface on the src_node CPU node to the dst_interface interface on the dst_node CUDA node, using the given stream. Must return 0 if the transfer was actually completed completely synchronously, or -EAGAIN if at least some transfers are still ongoing and should be awaited for by the core. \var starpu_data_copy_methods::cuda_to_ram_async Define how to copy data from the src_interface interface on the src_node CUDA node to the dst_interface interface on the dst_node CPU node, using the given stream. Must return 0 if the transfer was actually completed completely synchronously, or -EAGAIN if at least some transfers are still ongoing and should be awaited for by the core. \var starpu_data_copy_methods::cuda_to_cuda_async Define how to copy data from the src_interface interface on the src_node CUDA node to the dst_interface interface on the dst_node CUDA node, using the given stream. Must return 0 if the transfer was actually completed completely synchronously, or -EAGAIN if at least some transfers are still ongoing and should be awaited for by the core. \var starpu_data_copy_methods::ram_to_opencl_async Define how to copy data from the src_interface interface on the src_node CPU node to the dst_interface interface on the dst_node OpenCL node, by recording in event, a pointer to a cl_event, the event of the last submitted transfer. Must return 0 if the transfer was actually completed completely synchronously, or -EAGAIN if at least some transfers are still ongoing and should be awaited for by the core. \var starpu_data_copy_methods::opencl_to_ram_async Define how to copy data from the src_interface interface on the src_node OpenCL node to the dst_interface interface on the dst_node CPU node, by recording in event, a pointer to a cl_event, the event of the last submitted transfer. Must return 0 if the transfer was actually completed completely synchronously, or -EAGAIN if at least some transfers are still ongoing and should be awaited for by the core. \var starpu_data_copy_methods::opencl_to_opencl_async Define how to copy data from the src_interface interface on the src_node OpenCL node to the dst_interface interface on the dst_node OpenCL node, by recording in event, a pointer to a cl_event, the event of the last submitted transfer. Must return 0 if the transfer was actually completed completely synchronously, or -EAGAIN if at least some transfers are still ongoing and should be awaited for by the core. \var starpu_data_copy_methods::any_to_any Define how to copy data from the src_interface interface on the src_node node to the dst_interface interface on the dst_node node. This is meant to be implemented through the starpu_interface_copy() helper, to which async_data should be passed as such, and will be used to manage asynchronicity. This must return -EAGAIN if any of the starpu_interface_copy() calls has returned -EAGAIN (i.e. at least some transfer is still ongoing), and return 0 otherwise. @name Registering Data \ingroup 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. \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 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 concurrent execution of different tasks accessing the same void data 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 typically a scalar, and initialize \p handle to represent this data item. Here an example of how to use the function. \code{.c} float var; starpu_data_handle_t var_handle; starpu_variable_data_register(&var_handle, 0, (uintptr_t)&var, sizeof(var)); \endcode \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. Here an example of how to use the function. \code{.c} float vector[NX]; starpu_data_handle_t vector_handle; starpu_vector_data_register(&vector_handle, 0, (uintptr_t)vector, NX, sizeof(vector[0])); \endcode \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 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. Here an example of how to use the function. \code{.c} float *matrix; starpu_data_handle_t matrix_handle; matrix = (float*)malloc(width * height * sizeof(float)); starpu_matrix_data_register(&matrix_handle, 0, (uintptr_t)matrix, width, width, height, sizeof(float)); \endcode \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 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. Here an example of how to use the function. \code{.c} float *block; starpu_data_handle_t 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)); \endcode \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 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. Blocks have size \p r * \p c. \p nrow is the number of rows (in terms of blocks), \p colind[i] is the block-column index for block i in \p nzval, \p rowptr[i] is the block-index (in \p nzval) of the first block of row i. \p firstentry is the index of the first entry of the given arrays (usually 0 or 1). \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 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 \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. @name Accessing Data Interfaces \ingroup Data_Interfaces Each data interface is provided with a set of field access functions. The ones using a void * parameter aimed to be used in codelet implementations (see for example the code in \ref 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 NULL 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 NULL 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 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. \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 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 will be set to the size of the allocated buffer. If \p ptr is NULL, the function should not copy the data in the buffer but just set \p count to the size of the buffer which would have been allocated. The special 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 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 after calling the data unpacking operation. @name Accessing Variable Data Interfaces \ingroup Data_Interfaces \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. \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. \def STARPU_VARIABLE_GET_PTR(interface) \ingroup Data_Interfaces \brief 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. \def STARPU_VARIABLE_GET_DEV_HANDLE(interface) \ingroup Data_Interfaces \brief 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 be used with the device handle. @name Accessing Vector Data Interfaces \ingroup Data_Interfaces \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. \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. \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. \def STARPU_VECTOR_GET_PTR(void *interface) \ingroup Data_Interfaces \brief 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, 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 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 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 \p interface. @name Accessing Matrix Data Interfaces \ingroup Data_Interfaces \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 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 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 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. \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 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 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, 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 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 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 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 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 designated by \p interface. @name Accessing Block Data Interfaces \ingroup Data_Interfaces \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 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 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 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 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 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. \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 \p handle. \def STARPU_BLOCK_GET_PTR(void *interface) \ingroup Data_Interfaces \brief 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, 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 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 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 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 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 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 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 \p interface. @name Accessing BCSR Data Interfaces \ingroup Data_Interfaces \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 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 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 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 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 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 \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. \fn uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle) \ingroup Data_Interfaces \brief 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 \p handle. \def STARPU_BCSR_GET_NNZ(void *interface) \ingroup Data_Interfaces \brief 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 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 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 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 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 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 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 matrix designated by \p interface, to be used with the device handles. @name Accessing CSR Data Interfaces \ingroup Data_Interfaces \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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 designated by \p interface. @name Accessing COO Data Interfaces \ingroup Data_Interfaces \def STARPU_COO_GET_COLUMNS(void *interface) \ingroup Data_Interfaces \brief 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 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 \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 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 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 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) \ingroup Data_Interfaces \brief 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 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 designated by \p interface. \def STARPU_COO_GET_NVALUES(interface) \ingroup Data_Interfaces \brief 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 designated by \p interface. @name Defining Interface \ingroup Data_Interfaces Applications can provide their own interface as shown in \ref 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 allocation failed, the allocation method should then return -ENOMEM 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. \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 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 -EAGAIN if the 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 current state. The return value should be considered as the new current state 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 current state. The return value should be considered as the new current state 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 current state. The return value should be considered as the new current state 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 (\ref Defining_a_New_Data_Interface). */