/* * This file is part of the StarPU Handbook. * Copyright (C) 2009--2011 Universit@'e de Bordeaux * Copyright (C) 2010, 2011, 2012, 2013, 2014 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 API_Multiformat_Data_Interface Multiformat Data Interface \struct starpu_multiformat_data_interface_ops \ingroup API_Multiformat_Data_Interface The different fields are: \var size_t starpu_multiformat_data_interface_ops::cpu_elemsize the size of each element on CPUs \var size_t starpu_multiformat_data_interface_ops::opencl_elemsize the size of each element on OpenCL devices \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_opencl_cl pointer to a codelet which converts from CPU to OpenCL \var struct starpu_codelet *starpu_multiformat_data_interface_ops::opencl_to_cpu_cl pointer to a codelet which converts from OpenCL to CPU \var size_t starpu_multiformat_data_interface_ops::cuda_elemsize the size of each element on CUDA devices \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_cuda_cl pointer to a codelet which converts from CPU to CUDA \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cuda_to_cpu_cl pointer to a codelet which converts from CUDA to CPU \var size_t starpu_multiformat_data_interface_ops::mic_elemsize the size of each element on MIC devices \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_mic_cl pointer to a codelet which converts from CPU to MIC \var struct starpu_codelet *starpu_multiformat_data_interface_ops::mic_to_cpu_cl pointer to a codelet which converts from MIC to CPU \struct starpu_multiformat_interface todo \ingroup API_Multiformat_Data_Interface \var enum starpu_data_interface_id starpu_multiformat_interface::id \var void *starpu_multiformat_interface::cpu_ptr \var void *starpu_multiformat_interface::cuda_ptr \var void *starpu_multiformat_interface::opencl_ptr \var void *starpu_multiformat_interface::mic_ptr \var uint32_t starpu_multiformat_interface::nx \var struct starpu_multiformat_data_interface_ops *starpu_multiformat_interface::ops \fn void starpu_multiformat_data_register(starpu_data_handle_t *handle, unsigned home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops) \ingroup API_Multiformat_Data_Interface Register a piece of data that can be represented in different ways, depending upon the processing unit that manipulates it. It allows the programmer, for instance, to use an array of structures when working on a CPU, and a structure of arrays when working on a GPU. \p nobjects is the number of elements in the data. \p format_ops describes the format. \def STARPU_MULTIFORMAT_GET_CPU_PTR(interface) \ingroup API_Multiformat_Data_Interface returns the local pointer to the data with CPU format. \def STARPU_MULTIFORMAT_GET_CUDA_PTR(interface) \ingroup API_Multiformat_Data_Interface returns the local pointer to the data with CUDA format. \def STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface) \ingroup API_Multiformat_Data_Interface returns the local pointer to the data with OpenCL format. \def STARPU_MULTIFORMAT_GET_MIC_PTR(interface) \ingroup API_Multiformat_Data_Interface returns the local pointer to the data with MIC format. \def STARPU_MULTIFORMAT_GET_NX(interface) \ingroup API_Multiformat_Data_Interface returns the number of elements in the data. */