Skip to content

Commit 7258b9e

Browse files
authored
Use array for clUpdateMutableCommandsKHR (#245)
Proposal to pass the update configs to `clUpdateMutableCommandsKHR` as an array, rather than pointer changed linked list. See KhronosGroup/OpenCL-Docs#1041 for motivation and KhronosGroup/OpenCL-Docs#1045 for OpenCL-Docs PR.
1 parent 1e19333 commit 7258b9e

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

CL/cl_ext.h

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,9 @@ clRemapCommandBufferKHR(
603603
"cl_khr_command_buffer_mutable_dispatch"
604604

605605

606-
#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1)
606+
#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 2)
607607

608-
typedef cl_uint cl_command_buffer_structure_type_khr;
608+
typedef cl_uint cl_command_buffer_update_type_khr;
609609
typedef cl_bitfield cl_mutable_dispatch_fields_khr;
610610
typedef cl_uint cl_mutable_command_info_khr;
611611
typedef struct _cl_mutable_dispatch_arg_khr {
@@ -619,8 +619,6 @@ typedef struct _cl_mutable_dispatch_exec_info_khr {
619619
const void* param_value;
620620
} cl_mutable_dispatch_exec_info_khr;
621621
typedef struct _cl_mutable_dispatch_config_khr {
622-
cl_command_buffer_structure_type_khr type;
623-
const void* next;
624622
cl_mutable_command_khr command;
625623
cl_uint num_args;
626624
cl_uint num_svm_args;
@@ -633,12 +631,6 @@ typedef struct _cl_mutable_dispatch_config_khr {
633631
const size_t* global_work_size;
634632
const size_t* local_work_size;
635633
} cl_mutable_dispatch_config_khr;
636-
typedef struct _cl_mutable_base_config_khr {
637-
cl_command_buffer_structure_type_khr type;
638-
const void* next;
639-
cl_uint num_mutable_dispatch;
640-
const cl_mutable_dispatch_config_khr* mutable_dispatch_list;
641-
} cl_mutable_base_config_khr;
642634
typedef cl_bitfield cl_mutable_dispatch_asserts_khr;
643635

644636
/* cl_command_buffer_flags_khr - bitfield */
@@ -671,9 +663,8 @@ typedef cl_bitfield cl_mutable_dispatch_asserts_khr;
671663
#define CL_MUTABLE_DISPATCH_GLOBAL_WORK_SIZE_KHR 0x12A6
672664
#define CL_MUTABLE_DISPATCH_LOCAL_WORK_SIZE_KHR 0x12A7
673665

674-
/* cl_command_buffer_structure_type_khr */
675-
#define CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR 0
676-
#define CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR 1
666+
/* cl_command_buffer_update_type_khr */
667+
#define CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR 0
677668

678669
/* cl_command_buffer_properties_khr */
679670
#define CL_COMMAND_BUFFER_MUTABLE_DISPATCH_ASSERTS_KHR 0x12B7
@@ -688,7 +679,9 @@ typedef cl_bitfield cl_mutable_dispatch_asserts_khr;
688679
typedef cl_int CL_API_CALL
689680
clUpdateMutableCommandsKHR_t(
690681
cl_command_buffer_khr command_buffer,
691-
const cl_mutable_base_config_khr* mutable_config);
682+
cl_uint num_configs,
683+
const cl_command_buffer_update_type_khr* config_types,
684+
const void** configs);
692685

693686
typedef clUpdateMutableCommandsKHR_t *
694687
clUpdateMutableCommandsKHR_fn ;
@@ -709,7 +702,9 @@ clGetMutableCommandInfoKHR_fn ;
709702
extern CL_API_ENTRY cl_int CL_API_CALL
710703
clUpdateMutableCommandsKHR(
711704
cl_command_buffer_khr command_buffer,
712-
const cl_mutable_base_config_khr* mutable_config) ;
705+
cl_uint num_configs,
706+
const cl_command_buffer_update_type_khr* config_types,
707+
const void** configs) ;
713708

714709
extern CL_API_ENTRY cl_int CL_API_CALL
715710
clGetMutableCommandInfoKHR(

0 commit comments

Comments
 (0)