cl_img_semaphore.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #ifndef __OPENCL_CL_SEMAPHORE_H
  2. #define __OPENCL_CL_SEMAPHORE_H
  3. #include <CL/cl.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define CL_DEVICE_HANDLE_LIST_IMG 0x2051
  8. #define CL_DEVICE_HANDLE_LIST_END_IMG 0
  9. typedef struct _cl_semaphore* cl_semaphore;
  10. /* type cl_semaphore_img */
  11. typedef cl_properties cl_semaphore_properties_img;
  12. typedef cl_uint cl_semaphore_info_img;
  13. typedef cl_uint cl_semaphore_type_img;
  14. typedef cl_ulong cl_semaphore_payload_img;
  15. /* legacy to support already shipping headers */
  16. typedef cl_uint cl_semaphore_type;
  17. /* cl_semaphore_type */
  18. #define CL_SEMAPHORE_TYPE_BINARY_IMG 1
  19. /* cl_platform_info */
  20. #define CL_PLATFORM_SEMAPHORE_TYPES_IMG 0x2036
  21. /* cl_device_info */
  22. #define CL_DEVICE_SEMAPHORE_TYPES_IMG 0x204C
  23. /* cl_semaphore_info_img */
  24. #define CL_SEMAPHORE_CONTEXT_IMG 0x2039
  25. #define CL_SEMAPHORE_REFERENCE_COUNT_IMG 0x203A
  26. #define CL_SEMAPHORE_PROPERTIES_IMG 0x203B
  27. #define CL_SEMAPHORE_PAYLOAD_IMG 0x203C
  28. /* cl_semaphore_info_img or cl_semaphore_properties_img */
  29. #define CL_SEMAPHORE_TYPE_IMG 0x203D
  30. /* enum CL_DEVICE_HANDLE_LIST_IMG */
  31. /* enum CL_DEVICE_HANDLE_LIST_END_IMG */
  32. /* cl_command_type */
  33. #define CL_COMMAND_SEMAPHORE_WAIT_IMG 0x2042
  34. #define CL_COMMAND_SEMAPHORE_SIGNAL_IMG 0x2043
  35. /* Error codes */
  36. #define CL_INVALID_SEMAPHORE_IMG -1138
  37. typedef CL_API_ENTRY cl_semaphore
  38. (CL_API_CALL *clCreateSemaphoreWithPropertiesIMG_fn)(cl_context psContext,
  39. cl_semaphore_properties_img* sema_props,
  40. cl_int* pui32ErrorCodeRet);
  41. typedef CL_API_ENTRY cl_int
  42. (CL_API_CALL *clEnqueueWaitSemaphoresIMG_fn)(cl_command_queue psCommandQueue,
  43. cl_uint uiNumSemaphoresInList,
  44. const cl_semaphore* ppsSemaphoreList,
  45. const cl_semaphore_payload_img* ppsSemaphorePayloadList,
  46. cl_uint uiNumEventsInWaitList,
  47. const cl_event* ppsEventWaitList,
  48. cl_event* ppsEvent);
  49. typedef CL_API_ENTRY cl_int
  50. (CL_API_CALL *clEnqueueSignalSemaphoresIMG_fn)(cl_command_queue psCommandQueue,
  51. cl_uint uiNumSemaphoresInList,
  52. const cl_semaphore* ppsSemaphoreList,
  53. const cl_semaphore_payload_img* ppsSemaphorePayloadList,
  54. cl_uint uiNumEventsInWaitList,
  55. const cl_event* ppsEventWaitList,
  56. cl_event* ppsEvent);
  57. typedef CL_API_ENTRY cl_int
  58. (CL_API_CALL *clGetSemaphoreInfoIMG_fn)(cl_semaphore psSemaphore,
  59. cl_semaphore_info_img param_name,
  60. size_t param_size,
  61. void* param_value,
  62. size_t* param_size_ret);
  63. typedef CL_API_ENTRY cl_int
  64. (CL_API_CALL *clReleaseSemaphoreIMG_fn)(cl_semaphore psSemaphore);
  65. typedef CL_API_ENTRY cl_int
  66. (CL_API_CALL *clRetainSemaphoreIMG_fn)(cl_semaphore psSemaphore);
  67. extern CL_API_ENTRY cl_semaphore CL_API_CALL
  68. clCreateSemaphoreWithPropertiesIMG(cl_context psContext,
  69. cl_semaphore_properties_img* sema_props,
  70. cl_int* pui32ErrorCodeRet) CL_API_SUFFIX__VERSION_1_2;
  71. extern CL_API_ENTRY cl_int CL_API_CALL
  72. clEnqueueWaitSemaphoresIMG (cl_command_queue command_queue,
  73. cl_uint num_sema_descs,
  74. const cl_semaphore *sema_list,
  75. const cl_semaphore_payload_img *sema_payload_list,
  76. cl_uint num_events_in_wait_list,
  77. const cl_event *event_wait_list,
  78. cl_event *event) CL_API_SUFFIX__VERSION_1_2;
  79. extern CL_API_ENTRY cl_int CL_API_CALL
  80. clEnqueueSignalSemaphoresIMG (cl_command_queue command_queue,
  81. cl_uint num_sema_descs,
  82. const cl_semaphore *sema_list,
  83. const cl_semaphore_payload_img *sema_payload_list,
  84. cl_uint num_events_in_wait_list,
  85. const cl_event *event_wait_list,
  86. cl_event *event) CL_API_SUFFIX__VERSION_1_2;
  87. extern CL_API_ENTRY cl_int CL_API_CALL
  88. clGetSemaphoreInfoIMG(const cl_semaphore semaphore,
  89. cl_semaphore_info_img param_name,
  90. size_t param_value_size,
  91. void *param_value,
  92. size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
  93. extern CL_API_ENTRY cl_int CL_API_CALL
  94. clReleaseSemaphoreIMG (cl_semaphore sema_object) CL_API_SUFFIX__VERSION_1_2;
  95. extern CL_API_ENTRY cl_int CL_API_CALL
  96. clRetainSemaphoreIMG (cl_semaphore sema_object) CL_API_SUFFIX__VERSION_1_2;
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100. #endif /*__OPENCL_CL_SEMAPHORE_H*/