Skip to content

Commit

Permalink
Document interaction of asynchronous operations with thread scopes
Browse files Browse the repository at this point in the history
Closes #137.
  • Loading branch information
gonzalobg committed Mar 19, 2021
1 parent d92436a commit 1f6a489
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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].



| [`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 }}

0 comments on commit 1f6a489

Please sign in to comment.