multiformat_data_interface.doxy 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2015,2017 CNRS
  4. * Copyright (C) 2009-2011,2014,2016 Université de Bordeaux
  5. * Copyright (C) 2011-2012 Inria
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. /*! \defgroup API_Multiformat_Data_Interface Multiformat Data Interface
  19. \struct starpu_multiformat_data_interface_ops
  20. \ingroup API_Multiformat_Data_Interface
  21. The different fields are:
  22. \var size_t starpu_multiformat_data_interface_ops::cpu_elemsize
  23. the size of each element on CPUs
  24. \var size_t starpu_multiformat_data_interface_ops::opencl_elemsize
  25. the size of each element on OpenCL devices
  26. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_opencl_cl
  27. pointer to a codelet which converts from CPU to OpenCL
  28. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::opencl_to_cpu_cl
  29. pointer to a codelet which converts from OpenCL to CPU
  30. \var size_t starpu_multiformat_data_interface_ops::cuda_elemsize
  31. the size of each element on CUDA devices
  32. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_cuda_cl
  33. pointer to a codelet which converts from CPU to CUDA
  34. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cuda_to_cpu_cl
  35. pointer to a codelet which converts from CUDA to CPU
  36. \var size_t starpu_multiformat_data_interface_ops::mic_elemsize
  37. the size of each element on MIC devices
  38. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::cpu_to_mic_cl
  39. pointer to a codelet which converts from CPU to MIC
  40. \var struct starpu_codelet *starpu_multiformat_data_interface_ops::mic_to_cpu_cl
  41. pointer to a codelet which converts from MIC to CPU
  42. \struct starpu_multiformat_interface
  43. todo
  44. \ingroup API_Multiformat_Data_Interface
  45. \var enum starpu_data_interface_id starpu_multiformat_interface::id
  46. todo
  47. \var void *starpu_multiformat_interface::cpu_ptr
  48. todo
  49. \var void *starpu_multiformat_interface::cuda_ptr
  50. todo
  51. \var void *starpu_multiformat_interface::opencl_ptr
  52. todo
  53. \var void *starpu_multiformat_interface::mic_ptr
  54. todo
  55. \var uint32_t starpu_multiformat_interface::nx
  56. todo
  57. \var struct starpu_multiformat_data_interface_ops *starpu_multiformat_interface::ops
  58. todo
  59. \fn 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)
  60. \ingroup API_Multiformat_Data_Interface
  61. Register a piece of data that can be represented in different
  62. ways, depending upon the processing unit that manipulates it. It
  63. allows the programmer, for instance, to use an array of structures
  64. when working on a CPU, and a structure of arrays when working on a
  65. GPU. \p nobjects is the number of elements in the data. \p format_ops
  66. describes the format.
  67. \def STARPU_MULTIFORMAT_GET_CPU_PTR(interface)
  68. \ingroup API_Multiformat_Data_Interface
  69. Return the local pointer to the data with CPU format.
  70. \def STARPU_MULTIFORMAT_GET_CUDA_PTR(interface)
  71. \ingroup API_Multiformat_Data_Interface
  72. Return the local pointer to the data with CUDA format.
  73. \def STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface)
  74. \ingroup API_Multiformat_Data_Interface
  75. Return the local pointer to the data with OpenCL format.
  76. \def STARPU_MULTIFORMAT_GET_MIC_PTR(interface)
  77. \ingroup API_Multiformat_Data_Interface
  78. Return the local pointer to the data with MIC format.
  79. \def STARPU_MULTIFORMAT_GET_NX(interface)
  80. \ingroup API_Multiformat_Data_Interface
  81. Return the number of elements in the data.
  82. */