multiformat_data_interface.doxy 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup Multiformat_Data_Interface Multiformat Data Interface
  9. \struct starpu_multiformat_data_interface_ops
  10. \ingroup Multiformat_Data_Interface
  11. \brief The different fields are:
  12. \var starpu_multiformat_data_interface_ops::cpu_elemsize
  13. the size of each element on CPUs
  14. \var starpu_multiformat_data_interface_ops::opencl_elemsize
  15. the size of each element on OpenCL devices
  16. \var starpu_multiformat_data_interface_ops::cpu_to_opencl_cl
  17. pointer to a codelet which converts from CPU to OpenCL
  18. \var starpu_multiformat_data_interface_ops::opencl_to_cpu_cl
  19. pointer to a codelet which converts from OpenCL to CPU
  20. \var starpu_multiformat_data_interface_ops::cuda_elemsize
  21. the size of each element on CUDA devices
  22. \var starpu_multiformat_data_interface_ops::cpu_to_cuda_cl
  23. pointer to a codelet which converts from CPU to CUDA
  24. \var starpu_multiformat_data_interface_ops::cuda_to_cpu_cl
  25. pointer to a codelet which converts from CUDA to CPU
  26. \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)
  27. \ingroup Multiformat_Data_Interface
  28. \brief Register a piece of data that can be represented in different
  29. ways, depending upon the processing unit that manipulates it. It
  30. allows the programmer, for instance, to use an array of structures
  31. when working on a CPU, and a structure of arrays when working on a
  32. GPU. \p nobjects is the number of elements in the data. \p format_ops
  33. describes the format.
  34. \def STARPU_MULTIFORMAT_GET_CPU_PTR(void *interface)
  35. \ingroup Multiformat_Data_Interface
  36. \brief returns the local pointer to the data with CPU format.
  37. \def STARPU_MULTIFORMAT_GET_CUDA_PTR(void *interface)
  38. \ingroup Multiformat_Data_Interface
  39. \brief returns the local pointer to the data with CUDA format.
  40. \def STARPU_MULTIFORMAT_GET_OPENCL_PTR(void *interface)
  41. \ingroup Multiformat_Data_Interface
  42. \brief returns the local pointer to the data with OpenCL format.
  43. \def STARPU_MULTIFORMAT_GET_NX (void *interface)
  44. \ingroup Multiformat_Data_Interface
  45. \brief returns the number of elements in the data.
  46. */