Skip to content

Commit

Permalink
Clarify access::target::host_task
Browse files Browse the repository at this point in the history
An accessor with access::target::host_task is accessible on
the host from within the host task lambda. It is necessary
to specify that no get_native_mem method is needed and also
that target::host_task means not only 'accessible within host_task'
but 'accessible within host_task on the host'. This is necessary
as host_task defines a scope, but it doesn't define where the
memory is accessible from.
  • Loading branch information
hdelan committed Mar 4, 2024
1 parent f812749 commit 4234c45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6537,6 +6537,8 @@ capture the [code]#accessor# in a <<host-task>> can only use the accessor for
interoperability through the [code]#interop_handle#, any other uses result in
undefined behavior.

An accessor with access target [code]#target::host_task# is accessible on the
host, within the host task function for which the accessor is declared.
Programs which specify the access target as [code]#target::host_task# and then
use the [code]#accessor# from a <<sycl-kernel-function>> result in undefined
behavior.
Expand Down

0 comments on commit 4234c45

Please sign in to comment.