According to the thread scope documentation:
A thread scope specifies the kind of threads that can synchronize with each other using a primitive such as an atomic or a barrier.
Each thread (CPU or GPU) is related to itself by the thread thread scope, specified with thread_scope_thread.
This example, however, suggests that multiple threads of execution - the current thread and the threads performing the memcpy_async - can be synchronized using the synchronization primitives with thread_scope_thread.
A fix could be to change the documentation to:
The thread thread scope relates each thread (CPU or GPU) and its ??? threads to itself.
where ??? would be a name for the set of threads that includes the ones used by the memcpy_asyncs.
According to the thread scope documentation:
This example, however, suggests that multiple threads of execution - the current thread and the threads performing the
memcpy_async- can be synchronized using the synchronization primitives withthread_scope_thread.A fix could be to change the documentation to:
where
???would be a name for the set of threads that includes the ones used by thememcpy_asyncs.