vx_kernels.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (c) 2012-2017 The Khronos Group Inc.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef _OPENVX_KERNELS_H_
  17. #define _OPENVX_KERNELS_H_
  18. /*!
  19. * \file
  20. * \brief The list of supported kernels in the OpenVX standard.
  21. */
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /*!
  26. * \brief The standard list of available libraries
  27. * \ingroup group_kernel
  28. */
  29. enum vx_library_e {
  30. /*! \brief The base set of kernels as defined by Khronos. */
  31. VX_LIBRARY_KHR_BASE = 0x0,
  32. };
  33. /*!
  34. * \brief The standard list of available vision kernels.
  35. *
  36. * Each kernel listed here can be used with the <tt>\ref vxGetKernelByEnum</tt> call.
  37. * When programming the parameters, use
  38. * \arg <tt>\ref VX_INPUT</tt> for [in]
  39. * \arg <tt>\ref VX_OUTPUT</tt> for [out]
  40. * \arg <tt>\ref VX_BIDIRECTIONAL</tt> for [in,out]
  41. *
  42. * When programming the parameters, use
  43. * \arg <tt>\ref VX_TYPE_IMAGE</tt> for a <tt>\ref vx_image</tt> in the size field of <tt>\ref vxGetParameterByIndex</tt> or <tt>\ref vxSetParameterByIndex</tt> * \arg <tt>\ref VX_TYPE_ARRAY</tt> for a <tt>\ref vx_array</tt> in the size field of <tt>\ref vxGetParameterByIndex</tt> or <tt>\ref vxSetParameterByIndex</tt> * \arg or other appropriate types in \ref vx_type_e.
  44. * \ingroup group_kernel
  45. */
  46. enum vx_kernel_e {
  47. /*! \brief The tensor multiply Kernel.
  48. * \see group_vision_function_tensor_multiply
  49. */
  50. VX_KERNEL_TENSOR_MULTIPLY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x30,
  51. /*! \brief The tensor add Kernel.
  52. * \see group_vision_function_tensor_add
  53. */
  54. VX_KERNEL_TENSOR_ADD = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x31,
  55. /*! \brief The tensor subtract Kernel.
  56. * \see group_vision_function_tensor_subtract
  57. */
  58. VX_KERNEL_TENSOR_SUBTRACT = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x32,
  59. /*! \brief The tensor table look up Kernel.
  60. * \see group_vision_function_tensor_tablelookup
  61. */
  62. VX_KERNEL_TENSOR_TABLE_LOOKUP = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x33,
  63. /*! \brief The tensor matrix multiply Kernel.
  64. * \see group_vision_function_tensor_matrix_multiply
  65. */
  66. VX_KERNEL_TENSOR_MATRIX_MULTIPLY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x36,
  67. /*! \brief The data object copy kernel.
  68. * \see group_vision_function_copy
  69. */
  70. VX_KERNEL_COPY = VX_KERNEL_BASE(VX_ID_KHRONOS, VX_LIBRARY_KHR_BASE) + 0x37,
  71. };
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* _OPEN_VISION_LIBRARY_KERNELS_H_ */