================
@@ -683,24 +696,55 @@ There are a few items worthy of note:
or more parameters depending on how the SYCL library implementation defines
these types.
-#. The call to ``kernel_entry_point()`` has no effect other than to trigger
- emission of the entry point function. The statments that make up the body
- of the function are not executed when the function is called; they are
- only used in the generation of the entry point function.
+The call to ``kernel_entry_point()`` by ``single_task()`` is effectively
+replaced with synthesized code that looks approximately as follows.
+
+.. code-block:: c++
+
+ sycl::stream sout = Kernel.sout;
+ S s = Kernel.s;
+ sycl_kernel_launch<KN>("kernel-symbol-name", sout, s);
+
+There are a few items worthy of note:
+
+#. The SYCL kernel object is a lambda closure type and its captures do not
+ have formal names and cannot be accessed using the member access syntax used
+ above, but the intended behavior should be clear.
+
+#. ``kernel-symbol-name`` is substituted for the actual symbol name that would
+ be generated; these names are implementation details subject to change.
+
+#. Lookup for the ``sycl_kernel_launch()`` function template is
+ performed from the (possibly instantiated) location of the definition of
+ ``kernel_entry_point()``. If overload resolution fails, the program is
+ ill-formed. If the selected overload is a non-static member function, then
+ ``this`` is passed for the implicit object parameter.
+
+#. Function arguments passed to ``sycl_kernel_launch()`` are passed
+ as if by ``std::forward<X>(x)``.
----------------
Fznamznon wrote:
or std::move?
https://github.com/llvm/llvm-project/pull/152403
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits