[PATCH] D155769: [Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

Ronan Keryell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 15:25:26 PDT 2023


keryell added a comment.

Interesting.



================
Comment at: clang/docs/StdParSupport.rst:349
+
+        thread t0{[&]() {
+          hipSetDevice(accelerator_0);
----------------



================
Comment at: clang/docs/StdParSupport.rst:354
+        }};
+        thread t1{[&]() {
+          hitSetDevice(accelerator_1);
----------------



================
Comment at: clang/docs/StdParSupport.rst:360-362
+        t0.join();
+        t1.join();
+
----------------



================
Comment at: clang/docs/StdParSupport.rst:366-367
+
+   Note that this is a temporary, unsafe workaround for a deficiency in the C++
+   Standard.
+
----------------
Another way could be to hide somehow a way to select the device in the policy like in https://github.com/KhronosGroup/SyclParallelSTL, which might be something included in your point "4." of "Open Questions / Future Developments".
Perhaps better than opening the TLS Pandora box?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155769/new/

https://reviews.llvm.org/D155769



More information about the cfe-commits mailing list