From abd742f3aef2d441c08026d28b363edb9e760acb Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Sat, 1 Jul 2023 17:14:50 +0300 Subject: [PATCH] --- xml/cl.xml | 81 ++++++++++++++++++++++++++++++++++++++++-------- xml/registry.rnc | 18 +++++++++-- 2 files changed, 84 insertions(+), 15 deletions(-) diff --git a/xml/cl.xml b/xml/cl.xml index 219e2c5f1..0d9d5e41f 100644 --- a/xml/cl.xml +++ b/xml/cl.xml @@ -372,6 +372,61 @@ server's OpenCL/api-docs repository. cl_uint num_mutable_dispatch const cl_mutable_dispatch_config_khr* mutable_dispatch_list + + + void + cl_command_queue queue + cl_uint num_svm_pointers + void* svm_pointers[] + void* user_data + + + + void + const char* errinfo + const void* private_info + size_t cb + void* user_data + + + + void + cl_context context + void* user_data + + + + void + cl_mem memobj + void* user_data + + + + void + cl_program program + void* user_data + + + + void + cl_event event + cl_int event_command_status + void* user_data + + + + void + void* user_data + + + + void + const char* buffer + size_t len + size_t complete + void* user_data + + @@ -2720,7 +2775,7 @@ server's OpenCL/api-docs repository. cl_command_queue command_queue cl_uint num_svm_pointers void* svm_pointers[] - void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void * svm_pointers[], void *user_data) + cl_enqueue_svm_free_callback pfn_free_func void* user_data cl_uint num_events_in_wait_list const cl_event* event_wait_list @@ -3297,7 +3352,7 @@ server's OpenCL/api-docs repository. const cl_context_properties* properties cl_uint num_devices const cl_device_id* devices - void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data) + cl_create_context_callback pfn_notify void* user_data cl_int* errcode_ret @@ -3305,7 +3360,7 @@ server's OpenCL/api-docs repository. cl_context clCreateContextFromType const cl_context_properties* properties cl_device_type device_type - void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data) + cl_create_context_callback pfn_notify void* user_data cl_int* errcode_ret @@ -3328,7 +3383,7 @@ server's OpenCL/api-docs repository. cl_int clSetContextDestructorCallback cl_context context - void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data) + cl_context_destructor_callback pfn_notify void* user_data @@ -3451,13 +3506,13 @@ server's OpenCL/api-docs repository. cl_int clSetMemObjectDestructorCallback cl_mem memobj - void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data) + cl_mem_object_destructor_callback pfn_notify void* user_data cl_int clSetMemObjectDestructorAPPLE cl_mem memobj - void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data) + cl_mem_object_destructor_callback pfn_notify void* user_data @@ -3541,7 +3596,7 @@ server's OpenCL/api-docs repository. cl_uint num_devices const cl_device_id* device_list const char* options - void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data) + cl_program_callback pfn_notify void* user_data @@ -3553,7 +3608,7 @@ server's OpenCL/api-docs repository. cl_uint num_input_headers const cl_program* input_headers const char** header_include_names - void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data) + cl_program_callback pfn_notify void* user_data @@ -3564,14 +3619,14 @@ server's OpenCL/api-docs repository. const char* options cl_uint num_input_programs const cl_program* input_programs - void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data) + cl_program_callback pfn_notify void* user_data cl_int* errcode_ret cl_int clSetProgramReleaseCallback cl_program program - void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data) + cl_program_callback pfn_notify void* user_data @@ -3720,7 +3775,7 @@ server's OpenCL/api-docs repository. cl_int clSetEventCallback cl_event event cl_int command_exec_callback_type - void (CL_CALLBACK* pfn_notify)(cl_event event, cl_int event_command_status, void *user_data) + cl_event_callback pfn_notify void* user_data @@ -3974,7 +4029,7 @@ server's OpenCL/api-docs repository. cl_int clEnqueueNativeKernel cl_command_queue command_queue - void (CL_CALLBACK* user_func)(void*) + cl_enqueue_native_kernel_callback user_func void* args size_t cb_args cl_uint num_mem_objects @@ -4003,7 +4058,7 @@ server's OpenCL/api-docs repository. cl_command_queue command_queue cl_uint num_svm_pointers void* svm_pointers[] - void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data) + cl_enqueue_svm_free_callback pfn_free_func void* user_data cl_uint num_events_in_wait_list const cl_event* event_wait_list diff --git a/xml/registry.rnc b/xml/registry.rnc index d2055e79f..fd79e8dd4 100644 --- a/xml/registry.rnc +++ b/xml/registry.rnc @@ -82,7 +82,7 @@ Types = element types { # api - matches a api attribute, if present # requires - name of another type definition required by this one # category - if present, 'enum' indicates a matching -# block to generate an enumerated type for, and 'struct' +# block to generate an enumerated type for, and 'struct'/'function' # causes special interpretation of the contents of the type # tag including ... TBD ... # Other allowed values are 'include', 'define', 'handle' and 'bitmask', @@ -122,6 +122,9 @@ Types = element types { # noautovalidity - tag stating that no automatic validity language should be generated # values - comma-separated list of legal values, usually used only for sType enums # - containing arbitrary text (unused) +# For types with category 'function', contents should be one and zero or more +# - contains a single tag, indicating return value of function pointer +# - like tag in # # *** There's a problem here: I'm not sure how to represent the # syntax where it may contain arbitrarily interleaved text, , and @@ -169,7 +172,18 @@ Type = element type { } } | element comment { text } - ) * + ) * | + ( + element proto { + element type { TypeName } + } , + element param { + mixed { + element type { TypeName } ? , + element name { text } ? + } + } * + ) ) }