Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Document interaction of asynchronous operations with thread scopes #143

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/extended_api/asynchronous_operations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
## Asynchronous Operations

Asynchronous operations are performed _as-if_ in other threads. This other threads are related to the thread requesting the asynchronous operations via all scope relationships [^thread_scope].
Copy link
Collaborator Author

@gonzalobg gonzalobg Apr 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Asynchronous operations are performed _as-if_ in other threads. This other threads are related to the thread requesting the asynchronous operations via all scope relationships [^thread_scope].
Asynchronous operations are potentially performed in a new thread. These new threads are related to the thread requesting the asynchronous operations via all scope relationships [^thread_scope].




| [`cuda::memcpy_async`] | Asynchronously copies one range to another. `(function template)` <br/><br/> 1.1.0 / CUDA 11.0 <br/> 1.2.0 / CUDA 11.1 (group & aligned overloads) |


[`cuda::memcpy_async`]: {{ "extended_api/asynchronous_operations/memcpy_async.html" | relative_url }}
[^thread_scope]: This includes [`cuda::thread_scope_thread`]. That is, [`cuda::thread_scope_thread`] can synchronize multiple threads.

[`cuda::memcpy_async`]: {{ "extended_api/asynchronous_operations/memcpy_async.html" | relative_url }}
[`cuda::thread_scope_thread`]: {{ "extended_api/thread_scopes.html" | relative_url }}
6 changes: 4 additions & 2 deletions docs/extended_api/thread_scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ Each program thread is related to each other program thread by one or more
by the *device* thread scope, specified with `thread_scope_device`.
- Each GPU thread is related to each other GPU thread in the same CUDA block
by the *block* thread scope, specified with `thread_scope_block`.
- Each thread (CPU or GPU) is related to itself by the `thread` thread scope,
specified with `thread_scope_thread`.
- Each thread (CPU or GPU) is related to itself and to the threads executing its
[asynchronous operations] by the `thread` thread scope, specified with
`thread_scope_thread`.

Objects in namespace `cuda::std::` have the same behavior as corresponding
objects in namespace `cuda::` when instantiated with a scope of
Expand Down Expand Up @@ -152,3 +153,4 @@ Modify [atomics.fences paragraph 2 through 4] of ISO/IEC IS 14882 (the C++
[CUDA programming guide]: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html
[`concurrentManagedAccess` property]: https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp_116f9619ccc85e93bc456b8c69c80e78b
[`hostNativeAtomicSupported` property]: https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp_1ef82fd7d1d0413c7d6f33287e5b6306f
[asynchronous operations]: {{ "asynchronous_operations.html" | relative_url }}