From 4234c458107ff2708034d632acf1ff7d948e6c3e Mon Sep 17 00:00:00 2001 From: Hugh Delaney Date: Mon, 4 Mar 2024 17:51:48 +0000 Subject: [PATCH] Clarify access::target::host_task 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. --- adoc/chapters/programming_interface.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index 7ddac2e6..23c38dec 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -6537,6 +6537,8 @@ capture the [code]#accessor# in a <> 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 <> result in undefined behavior.