From 1f6a4897618a181b098d312fa63b9a619ca0ab15 Mon Sep 17 00:00:00 2001 From: Gonzalo Brito Gadeschi Date: Fri, 19 Mar 2021 16:20:20 +0100 Subject: [PATCH] Document interaction of asynchronous operations with thread scopes Closes #137. --- docs/extended_api/asynchronous_operations.md | 8 +++++++- docs/extended_api/thread_scopes.md | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/extended_api/asynchronous_operations.md b/docs/extended_api/asynchronous_operations.md index 03c85c2584..0339df61ec 100644 --- a/docs/extended_api/asynchronous_operations.md +++ b/docs/extended_api/asynchronous_operations.md @@ -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)`

1.1.0 / CUDA 11.0
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 }} diff --git a/docs/extended_api/thread_scopes.md b/docs/extended_api/thread_scopes.md index 9e90d6c835..f01b27ed65 100644 --- a/docs/extended_api/thread_scopes.md +++ b/docs/extended_api/thread_scopes.md @@ -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 @@ -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 }}