Loading...
Searching...
No Matches
starpu_data_interfaces.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __STARPU_DATA_INTERFACES_H__
#define __STARPU_DATA_INTERFACES_H__
#include <starpu.h>
#ifdef STARPU_USE_CUDA
/* to use CUDA streams */
# ifdef STARPU_DONT_INCLUDE_CUDA_HEADERS
typedef void *starpu_cudaStream_t;
# else
# include <cuda_runtime.h>
typedef cudaStream_t starpu_cudaStream_t;
# endif
#endif
#ifdef __cplusplus
extern "C"
{
#endif
struct starpu_data_copy_methods
{
int (*can_copy)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, unsigned handling_node);
int (*ram_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*ram_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*ram_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*ram_to_mic)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*cuda_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*cuda_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*cuda_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*opencl_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*opencl_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*opencl_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*mic_to_ram)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node);
int (*ram_to_mpi_ms)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*mpi_ms_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*mpi_ms_to_mpi_ms)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
#ifdef STARPU_USE_CUDA
int (*ram_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, starpu_cudaStream_t stream);
int (*cuda_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, starpu_cudaStream_t stream);
int (*cuda_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, starpu_cudaStream_t stream);
#else
int (*ram_to_cuda_async)();
int (*cuda_to_ram_async)();
int (*cuda_to_cuda_async)();
#endif
#if defined(STARPU_USE_OPENCL) && !defined(__CUDACC__)
int (*ram_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
int (*opencl_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
int (*opencl_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event);
#else
int (*ram_to_opencl_async)();
int (*opencl_to_ram_async)();
int (*opencl_to_opencl_async)();
#endif
int (*ram_to_mpi_ms_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void * event);
int (*mpi_ms_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void * event);
int (*mpi_ms_to_mpi_ms_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void * event);
int (*ram_to_mic_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node);
int (*mic_to_ram_async)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node);
int (*any_to_any)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data);
};
enum starpu_data_interface_id
{
STARPU_UNKNOWN_INTERFACE_ID = -1,
STARPU_MATRIX_INTERFACE_ID=0,
STARPU_BLOCK_INTERFACE_ID=1,
STARPU_VECTOR_INTERFACE_ID=2,
STARPU_CSR_INTERFACE_ID=3,
STARPU_BCSR_INTERFACE_ID=4,
STARPU_VARIABLE_INTERFACE_ID=5,
STARPU_VOID_INTERFACE_ID=6,
STARPU_MULTIFORMAT_INTERFACE_ID=7,
STARPU_COO_INTERFACE_ID=8,
STARPU_MAX_INTERFACE_ID=9
};
struct starpu_data_interface_ops
{
void (*register_data_handle) (starpu_data_handle_t handle, unsigned home_node, void *data_interface);
void (*unregister_data_handle) (starpu_data_handle_t handle);
starpu_ssize_t (*allocate_data_on_node) (void *data_interface, unsigned node);
void (*free_data_on_node) (void *data_interface, unsigned node);
void (*init) (void *data_interface);
const struct starpu_data_copy_methods *copy_methods;
void * (*handle_to_pointer) (starpu_data_handle_t handle, unsigned node);
void * (*to_pointer) (void *data_interface, unsigned node);
int (*pointer_is_inside) (void *data_interface, unsigned node, void *ptr);
size_t (*get_size) (starpu_data_handle_t handle);
size_t (*get_alloc_size) (starpu_data_handle_t handle);
uint32_t (*footprint) (starpu_data_handle_t handle);
uint32_t (*alloc_footprint) (starpu_data_handle_t handle);
int (*compare) (void *data_interface_a, void *data_interface_b);
int (*alloc_compare) (void *data_interface_a, void *data_interface_b);
void (*display) (starpu_data_handle_t handle, FILE *f);
starpu_ssize_t (*describe) (void *data_interface, char *buf, size_t size);
enum starpu_data_interface_id interfaceid;
size_t interface_size;
char is_multiformat;
char dontcache;
struct starpu_multiformat_data_interface_ops* (*get_mf_ops)(void *data_interface);
int (*pack_data) (starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count);
int (*unpack_data) (starpu_data_handle_t handle, unsigned node, void *ptr, size_t count);
char *name;
};
void starpu_data_register(starpu_data_handle_t *handleptr, int home_node, void *data_interface, struct starpu_data_interface_ops *ops);
void starpu_data_ptr_register(starpu_data_handle_t handle, unsigned node);
void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_handle_t handlesrc);
void *starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node);
int starpu_data_pointer_is_inside(starpu_data_handle_t handle, unsigned node, void *ptr);
void *starpu_data_get_local_ptr(starpu_data_handle_t handle);
void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node);
enum starpu_data_interface_id starpu_data_get_interface_id(starpu_data_handle_t handle);
int starpu_data_pack(starpu_data_handle_t handle, void **ptr, starpu_ssize_t *count);
int starpu_data_unpack(starpu_data_handle_t handle, void *ptr, size_t count);
size_t starpu_data_get_size(starpu_data_handle_t handle);
size_t starpu_data_get_alloc_size(starpu_data_handle_t handle);
starpu_data_handle_t starpu_data_lookup(const void *ptr);
int starpu_data_get_home_node(starpu_data_handle_t handle);
int starpu_data_interface_get_next_id(void);
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);
int starpu_interface_copy2d(uintptr_t src, size_t src_offset, unsigned src_node,
uintptr_t dst, size_t dst_offset, unsigned dst_node,
size_t blocksize,
size_t numblocks, size_t ld_src, size_t ld_dst,
void *async_data);
int starpu_interface_copy3d(uintptr_t src, size_t src_offset, unsigned src_node,
uintptr_t dst, size_t dst_offset, unsigned dst_node,
size_t blocksize,
size_t numblocks1, size_t ld1_src, size_t ld1_dst,
size_t numblocks2, size_t ld2_src, size_t ld2_dst,
void *async_data);
int starpu_interface_copy4d(uintptr_t src, size_t src_offset, unsigned src_node,
uintptr_t dst, size_t dst_offset, unsigned dst_node,
size_t blocksize,
size_t numblocks1, size_t ld1_src, size_t ld1_dst,
size_t numblocks2, size_t ld2_src, size_t ld2_dst,
size_t numblocks3, size_t ld3_src, size_t ld3_dst,
void *async_data);
void starpu_interface_start_driver_copy_async(unsigned src_node, unsigned dst_node, double *start);
void starpu_interface_end_driver_copy_async(unsigned src_node, unsigned dst_node, double start);
void starpu_interface_data_copy(unsigned src_node, unsigned dst_node, size_t size);
uintptr_t starpu_malloc_on_node_flags(unsigned dst_node, size_t size, int flags);
uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size);
void starpu_free_on_node_flags(unsigned dst_node, uintptr_t addr, size_t size, int flags);
void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size);
void starpu_malloc_on_node_set_default_flags(unsigned node, int flags);
extern struct starpu_data_interface_ops starpu_interface_matrix_ops;
struct starpu_matrix_interface
{
enum starpu_data_interface_id id;
uintptr_t ptr;
uintptr_t dev_handle;
size_t offset;
uint32_t nx;
uint32_t ny;
uint32_t ld;
size_t elemsize;
size_t allocsize;
};
void starpu_matrix_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize);
void starpu_matrix_data_register_allocsize(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize, size_t allocsize);
void starpu_matrix_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ld);
uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle);
uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle);
uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle);
uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle_t handle);
size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle);
size_t starpu_matrix_get_allocsize(starpu_data_handle_t handle);
#if defined(STARPU_HAVE_STATEMENT_EXPRESSIONS) && defined(STARPU_DEBUG)
#define STARPU_MATRIX_CHECK(interface) STARPU_ASSERT_MSG((((struct starpu_matrix_interface *)(interface))->id) == STARPU_MATRIX_INTERFACE_ID, "Error. The given data is not a matrix.")
#define STARPU_MATRIX_GET_PTR(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->ptr) ; })
#define STARPU_MATRIX_GET_DEV_HANDLE(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->dev_handle) ; })
#define STARPU_MATRIX_GET_OFFSET(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->offset) ; })
#define STARPU_MATRIX_GET_NX(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->nx) ; })
#define STARPU_MATRIX_GET_NY(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->ny) ; })
#define STARPU_MATRIX_GET_LD(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->ld) ; })
#define STARPU_MATRIX_GET_ELEMSIZE(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->elemsize) ; })
#define STARPU_MATRIX_GET_ALLOCSIZE(interface) ({ STARPU_MATRIX_CHECK(interface); (((struct starpu_matrix_interface *)(interface))->allocsize) ; })
#else
#define STARPU_MATRIX_GET_PTR(interface) (((struct starpu_matrix_interface *)(interface))->ptr)
#define STARPU_MATRIX_GET_DEV_HANDLE(interface) (((struct starpu_matrix_interface *)(interface))->dev_handle)
#define STARPU_MATRIX_GET_OFFSET(interface) (((struct starpu_matrix_interface *)(interface))->offset)
#define STARPU_MATRIX_GET_NX(interface) (((struct starpu_matrix_interface *)(interface))->nx)
#define STARPU_MATRIX_GET_NY(interface) (((struct starpu_matrix_interface *)(interface))->ny)
#define STARPU_MATRIX_GET_LD(interface) (((struct starpu_matrix_interface *)(interface))->ld)
#define STARPU_MATRIX_GET_ELEMSIZE(interface) (((struct starpu_matrix_interface *)(interface))->elemsize)
#define STARPU_MATRIX_GET_ALLOCSIZE(interface) (((struct starpu_matrix_interface *)(interface))->allocsize)
#endif
#define STARPU_MATRIX_SET_NX(interface, newnx) do { \
STARPU_MATRIX_CHECK(interface); \
(((struct starpu_matrix_interface *)(interface))->nx) = (newnx); \
} while (0)
#define STARPU_MATRIX_SET_NY(interface, newny) do { \
STARPU_MATRIX_CHECK(interface); \
(((struct starpu_matrix_interface *)(interface))->ny) = (newny); \
} while(0)
#define STARPU_MATRIX_SET_LD(interface, newld) do { \
STARPU_MATRIX_CHECK(interface); \
(((struct starpu_matrix_interface *)(interface))->ld) = (newld); \
} while(0)
extern struct starpu_data_interface_ops starpu_interface_coo_ops;
struct starpu_coo_interface
{
enum starpu_data_interface_id id;
uint32_t *columns;
uint32_t *rows;
uintptr_t values;
uint32_t nx;
uint32_t ny;
uint32_t n_values;
size_t elemsize;
};
void starpu_coo_data_register(starpu_data_handle_t *handleptr, int home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize);
#define STARPU_COO_GET_COLUMNS(interface) (((struct starpu_coo_interface *)(interface))->columns)
#define STARPU_COO_GET_COLUMNS_DEV_HANDLE(interface) (((struct starpu_coo_interface *)(interface))->columns)
#define STARPU_COO_GET_ROWS(interface) (((struct starpu_coo_interface *)(interface))->rows)
#define STARPU_COO_GET_ROWS_DEV_HANDLE(interface) (((struct starpu_coo_interface *)(interface))->rows)
#define STARPU_COO_GET_VALUES(interface) (((struct starpu_coo_interface *)(interface))->values)
#define STARPU_COO_GET_VALUES_DEV_HANDLE(interface) (((struct starpu_coo_interface *)(interface))->values)
#define STARPU_COO_GET_OFFSET 0
#define STARPU_COO_GET_NX(interface) (((struct starpu_coo_interface *)(interface))->nx)
#define STARPU_COO_GET_NY(interface) (((struct starpu_coo_interface *)(interface))->ny)
#define STARPU_COO_GET_NVALUES(interface) (((struct starpu_coo_interface *)(interface))->n_values)
#define STARPU_COO_GET_ELEMSIZE(interface) (((struct starpu_coo_interface *)(interface))->elemsize)
extern struct starpu_data_interface_ops starpu_interface_block_ops;
/* TODO: rename to 3dmatrix? */
/* TODO: add allocsize support */
struct starpu_block_interface
{
enum starpu_data_interface_id id;
uintptr_t ptr;
uintptr_t dev_handle;
size_t offset;
uint32_t nx;
uint32_t ny;
uint32_t nz;
uint32_t ldy;
uint32_t ldz;
size_t elemsize;
};
void starpu_block_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize);
void starpu_block_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ldy, uint32_t ldz);
uint32_t starpu_block_get_nx(starpu_data_handle_t handle);
uint32_t starpu_block_get_ny(starpu_data_handle_t handle);
uint32_t starpu_block_get_nz(starpu_data_handle_t handle);
uint32_t starpu_block_get_local_ldy(starpu_data_handle_t handle);
uint32_t starpu_block_get_local_ldz(starpu_data_handle_t handle);
uintptr_t starpu_block_get_local_ptr(starpu_data_handle_t handle);
size_t starpu_block_get_elemsize(starpu_data_handle_t handle);
#if defined(STARPU_HAVE_STATEMENT_EXPRESSIONS) && defined(STARPU_DEBUG)
#define STARPU_BLOCK_CHECK(interface) STARPU_ASSERT_MSG((((struct starpu_block_interface *)(interface))->id) == STARPU_BLOCK_INTERFACE_ID, "Error. The given data is not a block.")
#define STARPU_BLOCK_GET_PTR(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->ptr) ; })
#define STARPU_BLOCK_GET_DEV_HANDLE(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->dev_handle) ; })
#define STARPU_BLOCK_GET_OFFSET(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->offset) ; })
#define STARPU_BLOCK_GET_NX(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->nx) ; })
#define STARPU_BLOCK_GET_NY(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->ny) ; })
#define STARPU_BLOCK_GET_NZ(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->nz) ; })
#define STARPU_BLOCK_GET_LDY(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->ldy) ; })
#define STARPU_BLOCK_GET_LDZ(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->ldz) ; })
#define STARPU_BLOCK_GET_ELEMSIZE(interface) ({ STARPU_BLOCK_CHECK(interface); (((struct starpu_block_interface *)(interface))->elemsize) ; })
#else
#define STARPU_BLOCK_GET_PTR(interface) (((struct starpu_block_interface *)(interface))->ptr)
#define STARPU_BLOCK_GET_DEV_HANDLE(interface) (((struct starpu_block_interface *)(interface))->dev_handle)
#define STARPU_BLOCK_GET_OFFSET(interface) (((struct starpu_block_interface *)(interface))->offset)
#define STARPU_BLOCK_GET_NX(interface) (((struct starpu_block_interface *)(interface))->nx)
#define STARPU_BLOCK_GET_NY(interface) (((struct starpu_block_interface *)(interface))->ny)
#define STARPU_BLOCK_GET_NZ(interface) (((struct starpu_block_interface *)(interface))->nz)
#define STARPU_BLOCK_GET_LDY(interface) (((struct starpu_block_interface *)(interface))->ldy)
#define STARPU_BLOCK_GET_LDZ(interface) (((struct starpu_block_interface *)(interface))->ldz)
#define STARPU_BLOCK_GET_ELEMSIZE(interface) (((struct starpu_block_interface *)(interface))->elemsize)
#endif
extern struct starpu_data_interface_ops starpu_interface_vector_ops;
struct starpu_vector_interface
{
enum starpu_data_interface_id id;
uintptr_t ptr;
uintptr_t dev_handle;
size_t offset;
uint32_t nx;
size_t elemsize;
uint32_t slice_base;
size_t allocsize;
};
void starpu_vector_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t nx, size_t elemsize);
void starpu_vector_data_register_allocsize(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t nx, size_t elemsize, size_t allocsize);
void starpu_vector_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset);
uint32_t starpu_vector_get_nx(starpu_data_handle_t handle);
size_t starpu_vector_get_elemsize(starpu_data_handle_t handle);
size_t starpu_vector_get_allocsize(starpu_data_handle_t handle);
uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle);
#if defined(STARPU_HAVE_STATEMENT_EXPRESSIONS) && defined(STARPU_DEBUG)
#define STARPU_VECTOR_CHECK(interface) STARPU_ASSERT_MSG((((struct starpu_vector_interface *)(interface))->id) == STARPU_VECTOR_INTERFACE_ID, "Error. The given data is not a vector.")
#define STARPU_VECTOR_GET_PTR(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->ptr); })
#define STARPU_VECTOR_GET_DEV_HANDLE(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->dev_handle); })
#define STARPU_VECTOR_GET_OFFSET(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->offset); })
#define STARPU_VECTOR_GET_NX(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->nx); })
#define STARPU_VECTOR_GET_ELEMSIZE(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->elemsize); })
#define STARPU_VECTOR_GET_ALLOCSIZE(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->allocsize); })
#define STARPU_VECTOR_GET_SLICE_BASE(interface) ({ STARPU_VECTOR_CHECK(interface); (((struct starpu_vector_interface *)(interface))->slice_base); })
#else
#define STARPU_VECTOR_GET_PTR(interface) (((struct starpu_vector_interface *)(interface))->ptr)
#define STARPU_VECTOR_GET_DEV_HANDLE(interface) (((struct starpu_vector_interface *)(interface))->dev_handle)
#define STARPU_VECTOR_GET_OFFSET(interface) (((struct starpu_vector_interface *)(interface))->offset)
#define STARPU_VECTOR_GET_NX(interface) (((struct starpu_vector_interface *)(interface))->nx)
#define STARPU_VECTOR_GET_ELEMSIZE(interface) (((struct starpu_vector_interface *)(interface))->elemsize)
#define STARPU_VECTOR_GET_ALLOCSIZE(interface) (((struct starpu_vector_interface *)(interface))->allocsize)
#define STARPU_VECTOR_GET_SLICE_BASE(interface) (((struct starpu_vector_interface *)(interface))->slice_base)
#endif
#define STARPU_VECTOR_SET_NX(interface, newnx) do { \
STARPU_VECTOR_CHECK(interface); \
(((struct starpu_vector_interface *)(interface))->nx) = (newnx); \
} while(0)
extern struct starpu_data_interface_ops starpu_interface_variable_ops;
struct starpu_variable_interface
{
enum starpu_data_interface_id id;
uintptr_t ptr;
uintptr_t dev_handle;
size_t offset;
size_t elemsize;
};
void starpu_variable_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, size_t size);
void starpu_variable_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset);
size_t starpu_variable_get_elemsize(starpu_data_handle_t handle);
uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle);
#if defined(STARPU_HAVE_STATEMENT_EXPRESSIONS) && defined(STARPU_DEBUG)
#define STARPU_VARIABLE_CHECK(interface) STARPU_ASSERT_MSG((((struct starpu_variable_interface *)(interface))->id) == STARPU_VARIABLE_INTERFACE_ID, "Error. The given data is not a variable.")
#define STARPU_VARIABLE_GET_PTR(interface) ({ STARPU_VARIABLE_CHECK(interface); (((struct starpu_variable_interface *)(interface))->ptr) ; })
#define STARPU_VARIABLE_GET_OFFSET(interface) ({ STARPU_VARIABLE_CHECK(interface); (((struct starpu_variable_interface *)(interface))->offset) ; })
#define STARPU_VARIABLE_GET_ELEMSIZE(interface) ({ STARPU_VARIABLE_CHECK(interface); (((struct starpu_variable_interface *)(interface))->elemsize) ; })
#define STARPU_VARIABLE_GET_DEV_HANDLE(interface) ({ STARPU_VARIABLE_CHECK(interface); (((struct starpu_variable_interface *)(interface))->ptr) ; })
#else
#define STARPU_VARIABLE_GET_PTR(interface) (((struct starpu_variable_interface *)(interface))->ptr)
#define STARPU_VARIABLE_GET_OFFSET(interface) (((struct starpu_variable_interface *)(interface))->offset)
#define STARPU_VARIABLE_GET_ELEMSIZE(interface) (((struct starpu_variable_interface *)(interface))->elemsize)
#define STARPU_VARIABLE_GET_DEV_HANDLE(interface) (((struct starpu_variable_interface *)(interface))->ptr)
#endif
extern struct starpu_data_interface_ops starpu_interface_void_ops;
void starpu_void_data_register(starpu_data_handle_t *handle);
extern struct starpu_data_interface_ops starpu_interface_csr_ops;
struct starpu_csr_interface
{
enum starpu_data_interface_id id;
uint32_t nnz;
uint32_t nrow;
uintptr_t nzval;
uint32_t *colind;
uint32_t *rowptr;
uint32_t firstentry;
size_t elemsize;
};
void starpu_csr_data_register(starpu_data_handle_t *handle, int home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize);
uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle);
uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle);
uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle);
uintptr_t starpu_csr_get_local_nzval(starpu_data_handle_t handle);
uint32_t *starpu_csr_get_local_colind(starpu_data_handle_t handle);
uint32_t *starpu_csr_get_local_rowptr(starpu_data_handle_t handle);
size_t starpu_csr_get_elemsize(starpu_data_handle_t handle);
#define STARPU_CSR_GET_NNZ(interface) (((struct starpu_csr_interface *)(interface))->nnz)
#define STARPU_CSR_GET_NROW(interface) (((struct starpu_csr_interface *)(interface))->nrow)
#define STARPU_CSR_GET_NZVAL(interface) (((struct starpu_csr_interface *)(interface))->nzval)
#define STARPU_CSR_GET_NZVAL_DEV_HANDLE(interface) (((struct starpu_csr_interface *)(interface))->nnz)
#define STARPU_CSR_GET_COLIND(interface) (((struct starpu_csr_interface *)(interface))->colind)
#define STARPU_CSR_GET_COLIND_DEV_HANDLE(interface) (((struct starpu_csr_interface *)(interface))->colind)
#define STARPU_CSR_GET_ROWPTR(interface) (((struct starpu_csr_interface *)(interface))->rowptr)
#define STARPU_CSR_GET_ROWPTR_DEV_HANDLE(interface) (((struct starpu_csr_interface *)(interface))->rowptr)
#define STARPU_CSR_GET_OFFSET 0
#define STARPU_CSR_GET_FIRSTENTRY(interface) (((struct starpu_csr_interface *)(interface))->firstentry)
#define STARPU_CSR_GET_ELEMSIZE(interface) (((struct starpu_csr_interface *)(interface))->elemsize)
extern struct starpu_data_interface_ops starpu_interface_bcsr_ops;
struct starpu_bcsr_interface
{
enum starpu_data_interface_id id;
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;
};
void starpu_bcsr_data_register(starpu_data_handle_t *handle, int 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);
uint32_t starpu_bcsr_get_nnz(starpu_data_handle_t handle);
uint32_t starpu_bcsr_get_nrow(starpu_data_handle_t handle);
uint32_t starpu_bcsr_get_firstentry(starpu_data_handle_t handle);
uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle_t handle);
uint32_t *starpu_bcsr_get_local_colind(starpu_data_handle_t handle);
uint32_t *starpu_bcsr_get_local_rowptr(starpu_data_handle_t handle);
uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle);
uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle);
size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle);
#define STARPU_BCSR_GET_NNZ(interface) (((struct starpu_bcsr_interface *)(interface))->nnz)
#define STARPU_BCSR_GET_NROW(interface) (((struct starpu_bcsr_interface *)(interface))->nrow)
#define STARPU_BCSR_GET_NZVAL(interface) (((struct starpu_bcsr_interface *)(interface))->nzval)
#define STARPU_BCSR_GET_NZVAL_DEV_HANDLE(interface) (((struct starpu_bcsr_interface *)(interface))->nnz)
#define STARPU_BCSR_GET_COLIND(interface) (((struct starpu_bcsr_interface *)(interface))->colind)
#define STARPU_BCSR_GET_COLIND_DEV_HANDLE(interface) (((struct starpu_bcsr_interface *)(interface))->colind)
#define STARPU_BCSR_GET_ROWPTR(interface) (((struct starpu_bcsr_interface *)(interface))->rowptr)
#define STARPU_BCSR_GET_ROWPTR_DEV_HANDLE(interface) (((struct starpu_bcsr_interface *)(interface))->rowptr)
#define STARPU_BCSR_GET_FIRSTENTRY(interface) (((struct starpu_bcsr_interface *)(interface))->firstentry)
#define STARPU_BCSR_GET_R(interface) (((struct starpu_bcsr_interface *)(interface))->r)
#define STARPU_BCSR_GET_C(interface) (((struct starpu_bcsr_interface *)(interface))->c)
#define STARPU_BCSR_GET_ELEMSIZE(interface) (((struct starpu_bcsr_interface *)(interface))->elemsize)
#define STARPU_BCSR_GET_OFFSET 0
struct starpu_multiformat_data_interface_ops
{
size_t cpu_elemsize;
size_t opencl_elemsize;
struct starpu_codelet *cpu_to_opencl_cl;
struct starpu_codelet *opencl_to_cpu_cl;
size_t cuda_elemsize;
struct starpu_codelet *cpu_to_cuda_cl;
struct starpu_codelet *cuda_to_cpu_cl;
size_t mic_elemsize;
struct starpu_codelet *cpu_to_mic_cl;
struct starpu_codelet *mic_to_cpu_cl;
};
struct starpu_multiformat_interface
{
enum starpu_data_interface_id id;
void *cpu_ptr;
void *cuda_ptr;
void *opencl_ptr;
void *mic_ptr;
uint32_t nx;
struct starpu_multiformat_data_interface_ops *ops;
};
void starpu_multiformat_data_register(starpu_data_handle_t *handle, int home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops);
#define STARPU_MULTIFORMAT_GET_CPU_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cpu_ptr)
#define STARPU_MULTIFORMAT_GET_CUDA_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->cuda_ptr)
#define STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->opencl_ptr)
#define STARPU_MULTIFORMAT_GET_MIC_PTR(interface) (((struct starpu_multiformat_interface *)(interface))->mic_ptr)
#define STARPU_MULTIFORMAT_GET_NX(interface) (((struct starpu_multiformat_interface *)(interface))->nx)
#ifdef __cplusplus
}
#endif
#endif /* __STARPU_DATA_INTERFACES_H__ */
starpu_codelet
Definition starpu_task.h:250
starpu_multiformat_data_interface_ops::cuda_elemsize
size_t cuda_elemsize
Definition starpu_data_interfaces.h:1857
starpu_variable_interface::dev_handle
uintptr_t dev_handle
Definition starpu_data_interfaces.h:1390
starpu_data_interface_ops::footprint
uint32_t(* footprint)(starpu_data_handle_t handle)
Definition starpu_data_interfaces.h:472
starpu_block_interface::offset
size_t offset
Definition starpu_data_interfaces.h:1111
starpu_variable_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:1387
starpu_data_copy_methods::mpi_ms_to_mpi_ms_async
int(* mpi_ms_to_mpi_ms_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *event)
Definition starpu_data_interfaces.h:302
starpu_data_interface_ops::unregister_data_handle
void(* unregister_data_handle)(starpu_data_handle_t handle)
Definition starpu_data_interfaces.h:389
starpu_data_copy_methods::mpi_ms_to_ram_async
int(* mpi_ms_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *event)
Definition starpu_data_interfaces.h:292
starpu_data_interface_ops::get_size
size_t(* get_size)(starpu_data_handle_t handle)
Definition starpu_data_interfaces.h:457
starpu_data_copy_methods::can_copy
int(* can_copy)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, unsigned handling_node)
Definition starpu_data_interfaces.h:101
starpu_bcsr_interface::nrow
uint32_t nrow
Definition starpu_data_interfaces.h:1630
starpu_bcsr_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:1650
starpu_bcsr_interface::nnz
uint32_t nnz
Definition starpu_data_interfaces.h:1629
starpu_data_copy_methods::cuda_to_ram
int(* cuda_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:136
starpu_data_interface_ops::alloc_compare
int(* alloc_compare)(void *data_interface_a, void *data_interface_b)
Definition starpu_data_interfaces.h:497
starpu_variable_interface::ptr
uintptr_t ptr
Definition starpu_data_interfaces.h:1389
starpu_data_copy_methods::mic_to_ram
int(* mic_to_ram)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:178
starpu_data_interface_ops::dontcache
char dontcache
Definition starpu_data_interfaces.h:534
starpu_data_copy_methods::ram_to_mpi_ms_async
int(* ram_to_mpi_ms_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *event)
Definition starpu_data_interfaces.h:282
starpu_multiformat_data_interface_ops::mic_elemsize
size_t mic_elemsize
Definition starpu_data_interfaces.h:1860
starpu_matrix_interface::allocsize
size_t allocsize
Definition starpu_data_interfaces.h:852
starpu_coo_interface::values
uintptr_t values
Definition starpu_data_interfaces.h:1017
starpu_data_copy_methods::ram_to_ram
int(* ram_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:108
starpu_data_copy_methods::cuda_to_opencl
int(* cuda_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:150
starpu_csr_interface::colind
uint32_t * colind
Definition starpu_data_interfaces.h:1493
starpu_csr_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:1498
starpu_matrix_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:851
starpu_csr_interface::firstentry
uint32_t firstentry
Definition starpu_data_interfaces.h:1496
starpu_matrix_interface::ptr
uintptr_t ptr
Definition starpu_data_interfaces.h:842
starpu_vector_interface::dev_handle
uintptr_t dev_handle
Definition starpu_data_interfaces.h:1261
starpu_block_interface::ldy
uint32_t ldy
Definition starpu_data_interfaces.h:1115
starpu_block_interface::nz
uint32_t nz
Definition starpu_data_interfaces.h:1114
starpu_data_copy_methods::mpi_ms_to_ram
int(* mpi_ms_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:192
starpu_data_copy_methods::ram_to_mic
int(* ram_to_mic)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:129
starpu_data_copy_methods::ram_to_mic_async
int(* ram_to_mic_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:312
starpu_data_copy_methods::ram_to_cuda_async
int(* ram_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, starpu_cudaStream_t stream)
Definition starpu_data_interfaces.h:210
starpu_bcsr_interface::colind
uint32_t * colind
Definition starpu_data_interfaces.h:1633
starpu_variable_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:1392
starpu_matrix_interface::ld
uint32_t ld
Definition starpu_data_interfaces.h:847
starpu_coo_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:1013
starpu_coo_interface::rows
uint32_t * rows
Definition starpu_data_interfaces.h:1016
starpu_data_interface_ops::pack_data
int(* pack_data)(starpu_data_handle_t handle, unsigned node, void **ptr, starpu_ssize_t *count)
Definition starpu_data_interfaces.h:556
starpu_data_copy_methods::ram_to_cuda
int(* ram_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:115
starpu_data_copy_methods::opencl_to_cuda
int(* opencl_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:164
starpu_multiformat_data_interface_ops::cpu_elemsize
size_t cpu_elemsize
Definition starpu_data_interfaces.h:1853
starpu_data_copy_methods::mic_to_ram_async
int(* mic_to_ram_async)(void *src_interface, unsigned srd_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:322
starpu_csr_interface::nzval
uintptr_t nzval
Definition starpu_data_interfaces.h:1492
starpu_data_interface_ops::interfaceid
enum starpu_data_interface_id interfaceid
Definition starpu_data_interfaces.h:516
starpu_vector_interface::ptr
uintptr_t ptr
Definition starpu_data_interfaces.h:1260
starpu_data_interface_ops::compare
int(* compare)(void *data_interface_a, void *data_interface_b)
Definition starpu_data_interfaces.h:488
starpu_multiformat_data_interface_ops::opencl_elemsize
size_t opencl_elemsize
Definition starpu_data_interfaces.h:1854
starpu_block_interface::ptr
uintptr_t ptr
Definition starpu_data_interfaces.h:1109
starpu_coo_interface::n_values
uint32_t n_values
Definition starpu_data_interfaces.h:1020
starpu_data_copy_methods::ram_to_mpi_ms
int(* ram_to_mpi_ms)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:185
starpu_block_interface::dev_handle
uintptr_t dev_handle
Definition starpu_data_interfaces.h:1110
starpu_bcsr_interface::rowptr
uint32_t * rowptr
Definition starpu_data_interfaces.h:1634
starpu_data_interface_ops::interface_size
size_t interface_size
Definition starpu_data_interfaces.h:521
starpu_csr_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:1488
starpu_vector_interface::slice_base
uint32_t slice_base
Definition starpu_data_interfaces.h:1265
starpu_csr_interface::nrow
uint32_t nrow
Definition starpu_data_interfaces.h:1491
starpu_data_copy_methods::opencl_to_ram
int(* opencl_to_ram)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:157
starpu_block_interface::ny
uint32_t ny
Definition starpu_data_interfaces.h:1113
starpu_data_copy_methods::opencl_to_opencl
int(* opencl_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:171
starpu_vector_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:1264
starpu_data_interface_ops::name
char * name
Definition starpu_data_interfaces.h:568
starpu_data_interface_ops::get_alloc_size
size_t(* get_alloc_size)(starpu_data_handle_t handle)
Definition starpu_data_interfaces.h:465
starpu_bcsr_interface::firstentry
uint32_t firstentry
Definition starpu_data_interfaces.h:1645
starpu_data_copy_methods::cuda_to_cuda
int(* cuda_to_cuda)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:143
starpu_block_interface::ldz
uint32_t ldz
Definition starpu_data_interfaces.h:1116
starpu_bcsr_interface::r
uint32_t r
Definition starpu_data_interfaces.h:1647
starpu_multiformat_data_interface_ops::cpu_to_cuda_cl
struct starpu_codelet * cpu_to_cuda_cl
Definition starpu_data_interfaces.h:1858
starpu_data_copy_methods::cuda_to_cuda_async
int(* cuda_to_cuda_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, starpu_cudaStream_t stream)
Definition starpu_data_interfaces.h:230
starpu_csr_interface::nnz
uint32_t nnz
Definition starpu_data_interfaces.h:1490
starpu_matrix_interface::offset
size_t offset
Definition starpu_data_interfaces.h:844
starpu_matrix_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:841
starpu_vector_interface::offset
size_t offset
Definition starpu_data_interfaces.h:1262
starpu_data_interface_ops::display
void(* display)(starpu_data_handle_t handle, FILE *f)
Definition starpu_data_interfaces.h:503
starpu_multiformat_data_interface_ops::mic_to_cpu_cl
struct starpu_codelet * mic_to_cpu_cl
Definition starpu_data_interfaces.h:1862
starpu_data_interface_ops::register_data_handle
void(* register_data_handle)(starpu_data_handle_t handle, unsigned home_node, void *data_interface)
Definition starpu_data_interfaces.h:378
starpu_data_interface_ops::unpack_data
int(* unpack_data)(starpu_data_handle_t handle, unsigned node, void *ptr, size_t count)
Definition starpu_data_interfaces.h:563
starpu_data_interface_ops::alloc_footprint
uint32_t(* alloc_footprint)(starpu_data_handle_t handle)
Definition starpu_data_interfaces.h:480
starpu_vector_interface::allocsize
size_t allocsize
Definition starpu_data_interfaces.h:1266
starpu_vector_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:1258
starpu_coo_interface::columns
uint32_t * columns
Definition starpu_data_interfaces.h:1015
starpu_multiformat_data_interface_ops::cpu_to_opencl_cl
struct starpu_codelet * cpu_to_opencl_cl
Definition starpu_data_interfaces.h:1855
starpu_matrix_interface::dev_handle
uintptr_t dev_handle
Definition starpu_data_interfaces.h:843
starpu_data_interface_ops::pointer_is_inside
int(* pointer_is_inside)(void *data_interface, unsigned node, void *ptr)
Definition starpu_data_interfaces.h:452
starpu_data_copy_methods::cuda_to_ram_async
int(* cuda_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, starpu_cudaStream_t stream)
Definition starpu_data_interfaces.h:220
starpu_data_interface_ops::init
void(* init)(void *data_interface)
Definition starpu_data_interfaces.h:418
starpu_data_interface_ops::free_data_on_node
void(* free_data_on_node)(void *data_interface, unsigned node)
Definition starpu_data_interfaces.h:411
starpu_coo_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:1021
starpu_data_copy_methods::opencl_to_opencl_async
int(* opencl_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event)
Definition starpu_data_interfaces.h:267
starpu_bcsr_interface::c
uint32_t c
Definition starpu_data_interfaces.h:1648
starpu_data_interface_ops::describe
starpu_ssize_t(* describe)(void *data_interface, char *buf, size_t size)
Definition starpu_data_interfaces.h:511
starpu_multiformat_data_interface_ops::cuda_to_cpu_cl
struct starpu_codelet * cuda_to_cpu_cl
Definition starpu_data_interfaces.h:1859
starpu_multiformat_data_interface_ops::opencl_to_cpu_cl
struct starpu_codelet * opencl_to_cpu_cl
Definition starpu_data_interfaces.h:1856
starpu_matrix_interface::ny
uint32_t ny
Definition starpu_data_interfaces.h:846
starpu_vector_interface::nx
uint32_t nx
Definition starpu_data_interfaces.h:1263
starpu_multiformat_data_interface_ops::cpu_to_mic_cl
struct starpu_codelet * cpu_to_mic_cl
Definition starpu_data_interfaces.h:1861
starpu_data_copy_methods::any_to_any
int(* any_to_any)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, void *async_data)
Definition starpu_data_interfaces.h:341
starpu_data_copy_methods::opencl_to_ram_async
int(* opencl_to_ram_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event)
Definition starpu_data_interfaces.h:257
starpu_block_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:1107
starpu_block_interface::elemsize
size_t elemsize
Definition starpu_data_interfaces.h:1117
starpu_coo_interface::ny
uint32_t ny
Definition starpu_data_interfaces.h:1019
starpu_data_copy_methods::mpi_ms_to_mpi_ms
int(* mpi_ms_to_mpi_ms)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:199
starpu_bcsr_interface::id
enum starpu_data_interface_id id
Definition starpu_data_interfaces.h:1627
starpu_csr_interface::rowptr
uint32_t * rowptr
Definition starpu_data_interfaces.h:1494
starpu_variable_interface::offset
size_t offset
Definition starpu_data_interfaces.h:1391
starpu_data_copy_methods::ram_to_opencl
int(* ram_to_opencl)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node)
Definition starpu_data_interfaces.h:122
starpu_matrix_interface::nx
uint32_t nx
Definition starpu_data_interfaces.h:845
starpu_bcsr_interface::nzval
uintptr_t nzval
Definition starpu_data_interfaces.h:1632
starpu_block_interface::nx
uint32_t nx
Definition starpu_data_interfaces.h:1112
starpu_coo_interface::nx
uint32_t nx
Definition starpu_data_interfaces.h:1018
starpu_data_interface_ops::allocate_data_on_node
starpu_ssize_t(* allocate_data_on_node)(void *data_interface, unsigned node)
Definition starpu_data_interfaces.h:404
starpu_data_copy_methods::ram_to_opencl_async
int(* ram_to_opencl_async)(void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, cl_event *event)
Definition starpu_data_interfaces.h:247
starpu_data_interface_ops::copy_methods
const struct starpu_data_copy_methods * copy_methods
Definition starpu_data_interfaces.h:428
starpu_data_handle_to_pointer
void * starpu_data_handle_to_pointer(starpu_data_handle_t handle, unsigned node)
starpu_free_on_node_flags
void starpu_free_on_node_flags(unsigned dst_node, uintptr_t addr, size_t size, int flags)
starpu_vector_data_register_allocsize
void starpu_vector_data_register_allocsize(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t nx, size_t elemsize, size_t allocsize)
starpu_vector_get_nx
uint32_t starpu_vector_get_nx(starpu_data_handle_t handle)
starpu_data_register_same
void starpu_data_register_same(starpu_data_handle_t *handledst, starpu_data_handle_t handlesrc)
starpu_data_ptr_register
void starpu_data_ptr_register(starpu_data_handle_t handle, unsigned node)
starpu_matrix_ptr_register
void starpu_matrix_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ld)
starpu_malloc_on_node_set_default_flags
void starpu_malloc_on_node_set_default_flags(unsigned node, int flags)
starpu_bcsr_data_register
void starpu_bcsr_data_register(starpu_data_handle_t *handle, int 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)
starpu_matrix_data_register_allocsize
void starpu_matrix_data_register_allocsize(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize, size_t allocsize)
starpu_multiformat_data_register
void starpu_multiformat_data_register(starpu_data_handle_t *handle, int home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops)
starpu_vector_get_allocsize
size_t starpu_vector_get_allocsize(starpu_data_handle_t handle)
starpu_data_pointer_is_inside
int starpu_data_pointer_is_inside(starpu_data_handle_t handle, unsigned node, void *ptr)
starpu_csr_get_firstentry
uint32_t starpu_csr_get_firstentry(starpu_data_handle_t handle)
starpu_bcsr_get_elemsize
size_t starpu_bcsr_get_elemsize(starpu_data_handle_t handle)
starpu_vector_data_register
void starpu_vector_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t nx, size_t elemsize)
starpu_matrix_get_nx
uint32_t starpu_matrix_get_nx(starpu_data_handle_t handle)
starpu_block_get_elemsize
size_t starpu_block_get_elemsize(starpu_data_handle_t handle)
starpu_interface_copy3d
int starpu_interface_copy3d(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks1, size_t ld1_src, size_t ld1_dst, size_t numblocks2, size_t ld2_src, size_t ld2_dst, void *async_data)
starpu_csr_get_local_nzval
uintptr_t starpu_csr_get_local_nzval(starpu_data_handle_t handle)
starpu_interface_start_driver_copy_async
void starpu_interface_start_driver_copy_async(unsigned src_node, unsigned dst_node, double *start)
starpu_variable_get_local_ptr
uintptr_t starpu_variable_get_local_ptr(starpu_data_handle_t handle)
starpu_bcsr_get_local_colind
uint32_t * starpu_bcsr_get_local_colind(starpu_data_handle_t handle)
starpu_matrix_get_local_ld
uint32_t starpu_matrix_get_local_ld(starpu_data_handle_t handle)
starpu_interface_end_driver_copy_async
void starpu_interface_end_driver_copy_async(unsigned src_node, unsigned dst_node, double start)
starpu_csr_get_nnz
uint32_t starpu_csr_get_nnz(starpu_data_handle_t handle)
starpu_block_get_local_ldz
uint32_t starpu_block_get_local_ldz(starpu_data_handle_t handle)
starpu_block_get_local_ptr
uintptr_t starpu_block_get_local_ptr(starpu_data_handle_t handle)
starpu_bcsr_get_c
uint32_t starpu_bcsr_get_c(starpu_data_handle_t handle)
starpu_interface_copy4d
int starpu_interface_copy4d(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks1, size_t ld1_src, size_t ld1_dst, size_t numblocks2, size_t ld2_src, size_t ld2_dst, size_t numblocks3, size_t ld3_src, size_t ld3_dst, void *async_data)
starpu_matrix_get_ny
uint32_t starpu_matrix_get_ny(starpu_data_handle_t handle)
starpu_csr_get_nrow
uint32_t starpu_csr_get_nrow(starpu_data_handle_t handle)
starpu_data_lookup
starpu_data_handle_t starpu_data_lookup(const void *ptr)
starpu_csr_get_local_rowptr
uint32_t * starpu_csr_get_local_rowptr(starpu_data_handle_t handle)
starpu_interface_copy
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)
starpu_free_on_node
void starpu_free_on_node(unsigned dst_node, uintptr_t addr, size_t size)
starpu_data_register
void starpu_data_register(starpu_data_handle_t *handleptr, int home_node, void *data_interface, struct starpu_data_interface_ops *ops)
starpu_block_get_ny
uint32_t starpu_block_get_ny(starpu_data_handle_t handle)
starpu_matrix_data_register
void starpu_matrix_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t ld, uint32_t nx, uint32_t ny, size_t elemsize)
starpu_block_get_nx
uint32_t starpu_block_get_nx(starpu_data_handle_t handle)
starpu_bcsr_get_nnz
uint32_t starpu_bcsr_get_nnz(starpu_data_handle_t handle)
starpu_block_ptr_register
void starpu_block_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset, uint32_t ldy, uint32_t ldz)
starpu_bcsr_get_firstentry
uint32_t starpu_bcsr_get_firstentry(starpu_data_handle_t handle)
starpu_coo_data_register
void starpu_coo_data_register(starpu_data_handle_t *handleptr, int home_node, uint32_t nx, uint32_t ny, uint32_t n_values, uint32_t *columns, uint32_t *rows, uintptr_t values, size_t elemsize)
starpu_bcsr_get_local_rowptr
uint32_t * starpu_bcsr_get_local_rowptr(starpu_data_handle_t handle)
starpu_data_unpack
int starpu_data_unpack(starpu_data_handle_t handle, void *ptr, size_t count)
starpu_variable_get_elemsize
size_t starpu_variable_get_elemsize(starpu_data_handle_t handle)
starpu_matrix_get_allocsize
size_t starpu_matrix_get_allocsize(starpu_data_handle_t handle)
starpu_matrix_get_local_ptr
uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle_t handle)
starpu_block_data_register
void starpu_block_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, uint32_t ldy, uint32_t ldz, uint32_t nx, uint32_t ny, uint32_t nz, size_t elemsize)
starpu_data_interface_id
starpu_data_interface_id
Definition starpu_data_interfaces.h:348
starpu_interface_data_copy
void starpu_interface_data_copy(unsigned src_node, unsigned dst_node, size_t size)
starpu_malloc_on_node_flags
uintptr_t starpu_malloc_on_node_flags(unsigned dst_node, size_t size, int flags)
starpu_csr_get_elemsize
size_t starpu_csr_get_elemsize(starpu_data_handle_t handle)
starpu_bcsr_get_nrow
uint32_t starpu_bcsr_get_nrow(starpu_data_handle_t handle)
starpu_data_get_interface_on_node
void * starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned memory_node)
starpu_void_data_register
void starpu_void_data_register(starpu_data_handle_t *handle)
starpu_malloc_on_node
uintptr_t starpu_malloc_on_node(unsigned dst_node, size_t size)
starpu_csr_data_register
void starpu_csr_data_register(starpu_data_handle_t *handle, int home_node, uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry, size_t elemsize)
starpu_data_get_local_ptr
void * starpu_data_get_local_ptr(starpu_data_handle_t handle)
starpu_data_get_size
size_t starpu_data_get_size(starpu_data_handle_t handle)
starpu_data_get_alloc_size
size_t starpu_data_get_alloc_size(starpu_data_handle_t handle)
starpu_block_get_nz
uint32_t starpu_block_get_nz(starpu_data_handle_t handle)
starpu_vector_ptr_register
void starpu_vector_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset)
starpu_vector_get_elemsize
size_t starpu_vector_get_elemsize(starpu_data_handle_t handle)
starpu_vector_get_local_ptr
uintptr_t starpu_vector_get_local_ptr(starpu_data_handle_t handle)
starpu_interface_copy2d
int starpu_interface_copy2d(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks, size_t ld_src, size_t ld_dst, void *async_data)
starpu_csr_get_local_colind
uint32_t * starpu_csr_get_local_colind(starpu_data_handle_t handle)
starpu_data_get_interface_id
enum starpu_data_interface_id starpu_data_get_interface_id(starpu_data_handle_t handle)
starpu_data_pack
int starpu_data_pack(starpu_data_handle_t handle, void **ptr, starpu_ssize_t *count)
starpu_bcsr_get_r
uint32_t starpu_bcsr_get_r(starpu_data_handle_t handle)
starpu_bcsr_get_local_nzval
uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle_t handle)
starpu_matrix_get_elemsize
size_t starpu_matrix_get_elemsize(starpu_data_handle_t handle)
starpu_block_get_local_ldy
uint32_t starpu_block_get_local_ldy(starpu_data_handle_t handle)
starpu_data_interface_get_next_id
int starpu_data_interface_get_next_id(void)
starpu_variable_ptr_register
void starpu_variable_ptr_register(starpu_data_handle_t handle, unsigned node, uintptr_t ptr, uintptr_t dev_handle, size_t offset)
starpu_variable_data_register
void starpu_variable_data_register(starpu_data_handle_t *handle, int home_node, uintptr_t ptr, size_t size)
STARPU_BCSR_INTERFACE_ID
@ STARPU_BCSR_INTERFACE_ID
Definition starpu_data_interfaces.h:354
STARPU_MATRIX_INTERFACE_ID
@ STARPU_MATRIX_INTERFACE_ID
Definition starpu_data_interfaces.h:350
STARPU_VARIABLE_INTERFACE_ID
@ STARPU_VARIABLE_INTERFACE_ID
Definition starpu_data_interfaces.h:355
STARPU_VECTOR_INTERFACE_ID
@ STARPU_VECTOR_INTERFACE_ID
Definition starpu_data_interfaces.h:352
STARPU_CSR_INTERFACE_ID
@ STARPU_CSR_INTERFACE_ID
Definition starpu_data_interfaces.h:353
STARPU_UNKNOWN_INTERFACE_ID
@ STARPU_UNKNOWN_INTERFACE_ID
Definition starpu_data_interfaces.h:349
STARPU_COO_INTERFACE_ID
@ STARPU_COO_INTERFACE_ID
Definition starpu_data_interfaces.h:358
STARPU_MAX_INTERFACE_ID
@ STARPU_MAX_INTERFACE_ID
Definition starpu_data_interfaces.h:359
STARPU_MULTIFORMAT_INTERFACE_ID
@ STARPU_MULTIFORMAT_INTERFACE_ID
Definition starpu_data_interfaces.h:357
STARPU_VOID_INTERFACE_ID
@ STARPU_VOID_INTERFACE_ID
Definition starpu_data_interfaces.h:356
STARPU_BLOCK_INTERFACE_ID
@ STARPU_BLOCK_INTERFACE_ID
Definition starpu_data_interfaces.h:351
starpu_bcsr_interface
Definition starpu_data_interfaces.h:1626
starpu_block_interface
Definition starpu_data_interfaces.h:1106
starpu_coo_interface
Definition starpu_data_interfaces.h:1012
starpu_csr_interface
Definition starpu_data_interfaces.h:1487
starpu_data_copy_methods
Definition starpu_data_interfaces.h:93
starpu_data_interface_ops
Definition starpu_data_interfaces.h:366
starpu_matrix_interface
Definition starpu_data_interfaces.h:840
starpu_multiformat_data_interface_ops
Definition starpu_data_interfaces.h:1852
starpu_multiformat_interface
Definition starpu_data_interfaces.h:1866
starpu_variable_interface
Definition starpu_data_interfaces.h:1386
starpu_vector_interface
Definition starpu_data_interfaces.h:1257
starpu_data_handle_t
struct _starpu_data_state * starpu_data_handle_t
Definition starpu_data.h:44
starpu.h