/*******************************************************************************
* Copyright (c) 2008-2023 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
#ifndef OPENCL_CL_EXT_H_
#define OPENCL_CL_EXT_H_
/*
** This header is generated from the Khronos OpenCL XML API Registry.
*/
#include <CL/cl.h>
/* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
#define CL_NO_EXTENSION_PROTOTYPES
#endif
/* CL_NO_EXTENSION_PROTOTYPES implies
CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \
!defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
#define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
#endif
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \
!defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
#define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
#endif
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************
* cl_khr_command_buffer
***************************************************************/
#define cl_khr_command_buffer 1
#define CL_KHR_COMMAND_BUFFER_EXTENSION_NAME \
"cl_khr_command_buffer"
typedef cl_bitfield cl_device_command_buffer_capabilities_khr;
typedef struct _cl_command_buffer_khr* cl_command_buffer_khr;
typedef cl_uint cl_sync_point_khr;
typedef cl_uint cl_command_buffer_info_khr;
typedef cl_uint cl_command_buffer_state_khr;
typedef cl_properties cl_command_buffer_properties_khr;
typedef cl_bitfield cl_command_buffer_flags_khr;
typedef cl_properties cl_ndrange_kernel_command_properties_khr;
typedef struct _cl_mutable_command_khr* cl_mutable_command_khr;
/* cl_device_info */
#define CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR 0x12A9
#define CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR 0x12AA
/* cl_device_command_buffer_capabilities_khr - bitfield */
#define CL_COMMAND_BUFFER_CAPABILITY_KERNEL_PRINTF_KHR (1 << 0)
#define CL_COMMAND_BUFFER_CAPABILITY_DEVICE_SIDE_ENQUEUE_KHR (1 << 1)
#define CL_COMMAND_BUFFER_CAPABILITY_SIMULTANEOUS_USE_KHR (1 << 2)
#define CL_COMMAND_BUFFER_CAPABILITY_OUT_OF_ORDER_KHR (1 << 3)
/* cl_command_buffer_properties_khr */
#define CL_COMMAND_BUFFER_FLAGS_KHR 0x1293
/* cl_command_buffer_flags_khr - bitfield */
#define CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR (1 << 0)
/* Error codes */
#define CL_INVALID_COMMAND_BUFFER_KHR -1138
#define CL_INVALID_SYNC_POINT_WAIT_LIST_KHR -1139
#define CL_INCOMPATIBLE_COMMAND_QUEUE_KHR -1140
/* cl_command_buffer_info_khr */
#define CL_COMMAND_BUFFER_QUEUES_KHR 0x1294
#define CL_COMMAND_BUFFER_NUM_QUEUES_KHR 0x1295
#define CL_COMMAND_BUFFER_REFERENCE_COUNT_KHR 0x1296
#define CL_COMMAND_BUFFER_STATE_KHR 0x1297
#define CL_COMMAND_BUFFER_PROPERTIES_ARRAY_KHR 0x1298
#define CL_COMMAND_BUFFER_CONTEXT_KHR 0x1299
/* cl_command_buffer_state_khr */
#define CL_COMMAND_BUFFER_STATE_RECORDING_KHR 0
#define CL_COMMAND_BUFFER_STATE_EXECUTABLE_KHR 1
#define CL_COMMAND_BUFFER_STATE_PENDING_KHR 2
#define CL_COMMAND_BUFFER_STATE_INVALID_KHR 3
/* cl_command_type */
#define CL_COMMAND_COMMAND_BUFFER_KHR 0x12A8
typedef cl_command_buffer_khr (CL_API_CALL *
clCreateCommandBufferKHR_fn)(
cl_uint num_queues,
const cl_command_queue* queues,
const cl_command_buffer_properties_khr* properties,
cl_int* errcode_ret) ;
typedef cl_int (CL_API_CALL *
clFinalizeCommandBufferKHR_fn)(
cl_command_buffer_khr command_buffer) ;
typedef cl_int (CL_API_CALL *
clRetainCommandBufferKHR_fn)(
cl_command_buffer_khr command_buffer) ;
typedef cl_int (CL_API_CALL *
clReleaseCommandBufferKHR_fn)(
cl_command_buffer_khr command_buffer) ;
typedef cl_int (CL_API_CALL *
clEnqueueCommandBufferKHR_fn)(
cl_uint num_queues,
cl_command_queue* queues,
cl_command_buffer_khr command_buffer,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) ;
typedef cl_int (CL_API_CALL *
clCommandBarrierWithWaitListKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
cl_mutable_command_khr* mutable_handle) ;
typedef cl_int (CL_API_CALL *
clCommandCopyBufferKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
size_t src_offset,
size_t dst_offset,
size_t size,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
cl_mutable_command_khr* mutable_handle) ;
typedef cl_int (CL_API_CALL *
clCommandCopyBufferRectKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t* src_origin,
const size_t* dst_origin,
const size_t* region,
size_t src_row_pitch,
size_t src_slice_pitch,
size_t dst_row_pitch,
size_t dst_slice_pitch,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
cl_mutable_command_khr* mutable_handle) ;
typedef cl_int (CL_API_CALL *
clCommandCopyBufferToImageKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_image,
size_t src_offset,
const size_t* dst_origin,
const size_t* region,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
cl_mutable_command_khr* mutable_handle) ;
typedef cl_int (CL_API_CALL *
clCommandCopyImageKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_image,
const size_t* src_origin,
const size_t* dst_origin,
const size_t* region,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
cl_mutable_command_khr* mutable_handle) ;
typedef cl_int (CL_API_CALL *
clCommandCopyImageToBufferKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_buffer,
const size_t* src_origin,
const size_t* region,
size_t dst_offset,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
cl_mutable_command_khr* mutable_handle) ;
typedef cl_int (CL_API_CALL *
clCommandFillBufferKHR_fn)(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
cl_mem buffer,
const void* pattern,
size_t pattern_size,
size_t offset,
size