multiformat_data_interface.doxy 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 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 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. \struct starpu_multiformat_interface
  27. todo
  28. \ingroup API_Multiformat_Data_Interface
  29. \var starpu_multiformat_interface::id
  30. \var starpu_multiformat_interface::cpu_ptr
  31. \var starpu_multiformat_interface::cuda_ptr
  32. \var starpu_multiformat_interface::opencl_ptr
  33. \var starpu_multiformat_interface::mic_ptr
  34. \var starpu_multiformat_interface::nx
  35. \var starpu_multiformat_interface::ops
  36. \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)
  37. \ingroup API_Multiformat_Data_Interface
  38. Register a piece of data that can be represented in different
  39. ways, depending upon the processing unit that manipulates it. It
  40. allows the programmer, for instance, to use an array of structures
  41. when working on a CPU, and a structure of arrays when working on a
  42. GPU. \p nobjects is the number of elements in the data. \p format_ops
  43. describes the format.
  44. \def STARPU_MULTIFORMAT_GET_CPU_PTR(void *interface)
  45. \ingroup API_Multiformat_Data_Interface
  46. returns the local pointer to the data with CPU format.
  47. \def STARPU_MULTIFORMAT_GET_CUDA_PTR(void *interface)
  48. \ingroup API_Multiformat_Data_Interface
  49. returns the local pointer to the data with CUDA format.
  50. \def STARPU_MULTIFORMAT_GET_OPENCL_PTR(void *interface)
  51. \ingroup API_Multiformat_Data_Interface
  52. returns the local pointer to the data with OpenCL format.
  53. \def STARPU_MULTIFORMAT_GET_NX (void *interface)
  54. \ingroup API_Multiformat_Data_Interface
  55. returns the number of elements in the data.
  56. */