Skip to content

Commit

Permalink
[KHRGA-123] Updated additions of handler (#153)
Browse files Browse the repository at this point in the history
* Updated additions of handler

Issue: KHRGA-123
  • Loading branch information
imvucic authored Jan 4, 2024
1 parent 8f07ce9 commit fc12d3e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ def make_ref(ref_str, ref_view, ref_sufix):
"#subsec:interfaces.hosttasks",
)
+ make_ref("SYCL_SPEC_MATH_ARRAY", "Section 4.14.3", "#sec:marray.type")
+ make_ref(
"SYCL_SPEC_ADDITION_TO_HANDLER",
"Section 4.10.3",
"#subsec:interfaces.hosttask.handler",
)
+ make_ref(
"SYCL_SPEC_INT_W_HOST_CODE",
"Section 4.15.5",
Expand Down
31 changes: 31 additions & 0 deletions source/iface/host-task-add-to-handler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,34 @@
**********************************
Additions to the ``sycl::handler``
**********************************

This section describes member functions in the command group handler
class that are used with host tasks.

::

class handler {
...

public:
template <typename T>
void host_task(T&& hostTaskCallable); // (1)

...
};

Effects: Enqueues an implementation-defined command to the SYCL runtime
to invoke ``hostTaskCallable`` exactly once. The scheduling of the
invocation of ``hostTaskCallable`` in relation to other commands
enqueued to the SYCL runtime must be in accordance with the dependency
model described in |SYCL_SPEC_MEM_MODEL|. Initializes an
``interop_handle`` object and passes it to ``hostTaskCallable``
when it is invoked if ``std::is_invocable_v<T, interop_handle>``
evaluates to true, otherwise invokes ``hostTaskCallable``
as a nullary function.

.. seealso::

|SYCL_SPEC_ADDITION_TO_HANDLER|

:ref:`handler`
1 change: 1 addition & 0 deletions source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ moveable
USM
Namespaces
namespace
nullary
instantiations
interoperation
interoperating
Expand Down

0 comments on commit fc12d3e

Please sign in to comment.