File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
sycl/doc/extensions/proposed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -616,11 +616,15 @@ arguments when the kernel is enqueued.
616
616
For example, when enqueuing a kernel with `handler::parallel_for` or
617
617
`handler::single_task`, the kernel argument values must be set via
618
618
`handler::set_arg` or `handler::set_args`.
619
- Failing to set the value of a kernel argument results in undefined behavior.
620
- The type of the value passed to `handler::set_arg` or `handler::set_args` must
621
- be the same as the type of the corresponding formal parameter in the free
622
- function kernel.
623
- Passing a value with a mismatched type results in undefined behavior.
619
+ The application must abide by the following rules, otherwise the behavior is
620
+ undefined:
621
+
622
+ * The application must set a value for each kernel argument.
623
+ * The application must not set a value for a kernel argument that does not
624
+ exist (e.g. specifying an argument index to `handler::set_arg` that is out of
625
+ range).
626
+ * The type of the expression used to set the argument's value must match the
627
+ type of the corresponding formal parameter in the free function kernel.
624
628
625
629
=== Obtaining the iteration id for a kernel
626
630
You can’t perform that action at this time.
0 commit comments