/*
 * 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 API_Multiformat_Data_Interface Multiformat Data Interface

\struct starpu_multiformat_data_interface_ops
\ingroup API_Multiformat_Data_Interface
The different fields are:
\var starpu_multiformat_data_interface_ops::cpu_elemsize
        the size of each element on CPUs
\var starpu_multiformat_data_interface_ops::opencl_elemsize
        the size of each element on OpenCL devices
\var starpu_multiformat_data_interface_ops::cpu_to_opencl_cl
        pointer to a codelet which converts from CPU to OpenCL
\var starpu_multiformat_data_interface_ops::opencl_to_cpu_cl
        pointer to a codelet which converts from OpenCL to CPU
\var starpu_multiformat_data_interface_ops::cuda_elemsize
        the size of each element on CUDA devices
\var starpu_multiformat_data_interface_ops::cpu_to_cuda_cl
        pointer to a codelet which converts from CPU to CUDA
\var starpu_multiformat_data_interface_ops::cuda_to_cpu_cl
        pointer to a codelet which converts from CUDA to CPU

\struct starpu_multiformat_interface
todo
\ingroup API_Multiformat_Data_Interface
\var starpu_multiformat_interface::cpu_ptr
\var starpu_multiformat_interface::cuda_ptr
\var starpu_multiformat_interface::opencl_ptr
\var starpu_multiformat_interface::nx
\var 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_NX(interface)
\ingroup API_Multiformat_Data_Interface
returns the number of elements in the data.

*/
