@@ -13308,8 +13308,6 @@ The following behavior is undefined:
1330813308[[enqueuing-kernels]]
1330913309=== Enqueuing Kernels
1331013310
13311- [open,refpage='enqueue_kernel',desc='Enqueuing Kernels',type='freeform',spec='clang',anchor='enqueuing-kernels',xrefs='enqueue_marker']
13312- --
1331313311NOTE: The functionality described in this section <<unified-spec, requires>>
1331413312support for OpenCL C 2.0, or OpenCL C 3.0 or newer and the
1331513313{opencl_c_device_enqueue} feature.
@@ -13319,11 +13317,19 @@ enqueue additional work to the same device, without host interaction.
1331913317A kernel may enqueue code represented by Block syntax, and control execution
1332013318order with event dependencies including user events and markers.
1332113319There are several advantages to using the Block syntax: it is more compact;
13322- it does not require a cl_kernel object; and enqueuing can be done as a
13320+ it does not require a {cl_kernel_TYPE} object; and enqueuing can be done as a
1332313321single semantic step.
1332413322
13323+ The macro `CLK_NULL_EVENT` refers to an invalid device event.
13324+ The macro `CLK_NULL_QUEUE` refers to an invalid device queue.
13325+
13326+ [[built-in-functions-enqueuing-a-kernel]]
13327+ ==== Built-in Functions - Enqueuing a Kernel
13328+
13329+ [open,refpage='enqueue_kernel',desc='Built-in Functions - Enqueuing Kernels',type='freeform',spec='clang',anchor='enqueuing-kernels',xrefs='enqueue_marker']
13330+ --
1332513331The following table describes the list of built-in functions that can be
13326- used to enqueue a kernel(s) .
13332+ used to enqueue a kernel.
1332713333
1332813334ifdef::cl_khr_device_enqueue_local_arg_types[]
1332913335When the {cl_khr_device_enqueue_local_arg_types_EXT} extension macro is
@@ -13338,22 +13344,8 @@ signatures.
1333813344
1333913345When the {cl_khr_device_enqueue_local_arg_types_EXT} extension macro is
1334013346not supported, the pointee type of these functions must be `void`.
13341-
13342- :localArgType: gentype
13343- endif::cl_khr_device_enqueue_local_arg_types[]
13344-
13345- ifndef::cl_khr_device_enqueue_local_arg_types[]
13346- :localArgType: void
1334713347endif::cl_khr_device_enqueue_local_arg_types[]
1334813348
13349- The macro `CLK_NULL_EVENT` refers to an invalid device event.
13350- The macro `CLK_NULL_QUEUE` refers to an invalid device queue.
13351- --
13352-
13353-
13354- [[built-in-functions-enqueuing-a-kernel]]
13355- ==== Built-in Functions - Enqueuing a Kernel
13356-
1335713349[[table-builtin-kernel-enqueue]]
1335813350.Built-in Kernel Enqueue Functions
1335913351[cols=",",options="header",]
@@ -13367,12 +13359,25 @@ The macro `CLK_NULL_QUEUE` refers to an invalid device queue.
1336713359 const clk_event_t *_event_wait_list_, clk_event_t *_event_ret_,
1336813360 void (^__block__)(void)) +
1336913361 int **enqueue_kernel**(queue_t _queue_, kernel_enqueue_flags_t _flags_,
13370- const ndrange_t _ndrange_, void (^__block__)(local {localArgType} *, ...),
13362+ const ndrange_t _ndrange_, void (^__block__)(local void *, ...),
1337113363 uint size0, ...) +
1337213364 int **enqueue_kernel**(queue_t _queue_, kernel_enqueue_flags_t _flags_,
1337313365 const ndrange_t _ndrange_, uint _num_events_in_wait_list_,
1337413366 const clk_event_t *_event_wait_list_, clk_event_t *_event_ret_,
13375- void (^__block__)(local {localArgType} *, ...), uint size0, ...)
13367+ void (^__block__)(local void *, ...), uint size0, ...)
13368+
13369+ ifdef::cl_khr_device_enqueue_local_arg_types[]
13370+ If the {cl_khr_device_enqueue_local_arg_types_EXT} extension macro is supported:
13371+
13372+ int **enqueue_kernel**(queue_t _queue_, kernel_enqueue_flags_t _flags_,
13373+ const ndrange_t _ndrange_, void (^__block__)(local gentype *, ...),
13374+ uint size0, ...) +
13375+ int **enqueue_kernel**(queue_t _queue_, kernel_enqueue_flags_t _flags_,
13376+ const ndrange_t _ndrange_, uint _num_events_in_wait_list_,
13377+ const clk_event_t *_event_wait_list_, clk_event_t *_event_ret_,
13378+ void (^__block__)(local gentype *, ...), uint size0, ...)
13379+ endif::cl_khr_device_enqueue_local_arg_types[]
13380+
1337613381 | Enqueue the block for execution to _queue_.
1337713382
1337813383 If an event is returned, *enqueue_kernel* performs an implicit retain
@@ -13381,7 +13386,7 @@ The macro `CLK_NULL_QUEUE` refers to an invalid device queue.
1338113386
1338213387The *enqueue_kernel* built-in function allows a work-item to enqueue a
1338313388block.
13384- Work-items can enqueue multiple blocks to a device queue(s) .
13389+ Work-items can enqueue multiple blocks to device queues .
1338513390
1338613391The *enqueue_kernel* built-in function returns `CLK_SUCCESS` if the block is
1338713392enqueued successfully and returns `CLK_ENQUEUE_FAILURE` otherwise.
@@ -13406,6 +13411,7 @@ block:
1340613411 could not be allocated.
1340713412 * `CLK_OUT_OF_RESOURCES` if there is a failure to queue the block in
1340813413 _queue_ because of insufficient resources needed to execute the kernel.
13414+ --
1340913415
1341013416Below are some examples of how to enqueue a block.
1341113417
@@ -13720,15 +13726,30 @@ execution.
1372013726|====
1372113727| Built-in Function | Description
1372213728| uint *get_kernel_work_group_size*(void (^block)(void)) +
13723- uint *get_kernel_work_group_size*(void (^block)(local {localArgType} *, ...))
13729+ uint *get_kernel_work_group_size*(void (^block)(local void *, ...))
13730+
13731+ ifdef::cl_khr_device_enqueue_local_arg_types[]
13732+ If the {cl_khr_device_enqueue_local_arg_types_EXT} extension macro is supported:
13733+
13734+ uint *get_kernel_work_group_size*(void (^block)(local gentype *, ...))
13735+ endif::cl_khr_device_enqueue_local_arg_types[]
13736+
1372413737 | This provides a mechanism to query the maximum work-group size that
1372513738 can be used to execute a block on a specific device given by _device_.
1372613739
1372713740 _block_ specifies the block to be enqueued.
1372813741| uint *{get_kernel_preferred_work_group_size_multiple}*(
1372913742 void (^block)(void)) +
1373013743 uint *{get_kernel_preferred_work_group_size_multiple}*(
13731- void (^block)(local {localArgType} *, ...))
13744+ void (^block)(local void *, ...))
13745+
13746+ ifdef::cl_khr_device_enqueue_local_arg_types[]
13747+ If the {cl_khr_device_enqueue_local_arg_types_EXT} extension macro is supported:
13748+
13749+ uint *{get_kernel_preferred_work_group_size_multiple}*(
13750+ void (^block)(local gentype *, ...))
13751+ endif::cl_khr_device_enqueue_local_arg_types[]
13752+
1373213753 | Returns the preferred multiple of work-group size for launch.
1373313754 This is a performance hint.
1373413755 Specifying a work-group size that is not a multiple of the value
0 commit comments