multiformat_data_interface.doxy 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2014 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 API_Multiformat_Data_Interface Multiformat Data Interface
  9. \struct starpu_multiformat_data_interface_ops
  10. \ingroup API_Multiformat_Data_Interface
  11. The different fields are:
  12. \var size_t starpu_multiformat_data_interface_ops::cpu_elemsize
  13. the size of each element on CPUs
  14. \var size_t starpu_multiformat_data_interface_ops::opencl_elemsize
  15. the size of each element on OpenCL devices
  16. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_opencl_cl
  17. pointer to a codelet which converts from CPU to OpenCL
  18. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::opencl_to_cpu_cl
  19. pointer to a codelet which converts from OpenCL to CPU
  20. \var size_t starpu_multiformat_data_interface_ops::cuda_elemsize
  21. the size of each element on CUDA devices
  22. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_cuda_cl
  23. pointer to a codelet which converts from CPU to CUDA
  24. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cuda_to_cpu_cl
  25. pointer to a codelet which converts from CUDA to CPU
  26. \var size_t starpu_multiformat_data_interface_ops::mic_elemsize
  27. the size of each element on MIC devices
  28. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_mic_cl
  29. pointer to a codelet which converts from CPU to MIC
  30. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::mic_to_cpu_cl
  31. pointer to a codelet which converts from MIC to CPU
  32. \struct starpu_multiformat_interface
  33. todo
  34. \ingroup API_Multiformat_Data_Interface
  35. \var enum starpu_data_interface_id starpu_multiformat_interface::id
  36. \var void *starpu_multiformat_interface::cpu_ptr
  37. \var void *starpu_multiformat_interface::cuda_ptr
  38. \var void *starpu_multiformat_interface::opencl_ptr
  39. \var void *starpu_multiformat_interface::mic_ptr
  40. \var uint32_t starpu_multiformat_interface::nx
  41. \var struct starpu_multiformat_data_interface_ops *starpu_multiformat_interface::ops
  42. \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)
  43. \ingroup API_Multiformat_Data_Interface
  44. Register a piece of data that can be represented in different
  45. ways, depending upon the processing unit that manipulates it. It
  46. allows the programmer, for instance, to use an array of structures
  47. when working on a CPU, and a structure of arrays when working on a
  48. GPU. \p nobjects is the number of elements in the data. \p format_ops
  49. describes the format.
  50. \def STARPU_MULTIFORMAT_GET_CPU_PTR(interface)
  51. \ingroup API_Multiformat_Data_Interface
  52. returns the local pointer to the data with CPU format.
  53. \def STARPU_MULTIFORMAT_GET_CUDA_PTR(interface)
  54. \ingroup API_Multiformat_Data_Interface
  55. returns the local pointer to the data with CUDA format.
  56. \def STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface)
  57. \ingroup API_Multiformat_Data_Interface
  58. returns the local pointer to the data with OpenCL format.
  59. \def STARPU_MULTIFORMAT_GET_MIC_PTR(interface)
  60. \ingroup API_Multiformat_Data_Interface
  61. returns the local pointer to the data with MIC format.
  62. \def STARPU_MULTIFORMAT_GET_NX(interface)
  63. \ingroup API_Multiformat_Data_Interface
  64. returns the number of elements in the data.
  65. */