arpith-jacob added inline comments.

================
Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:511-516
+    // Activate workers.
+    syncCTAThreads(CGF);
+
+    // Barrier at end of parallel region.
+    syncCTAThreads(CGF);
+
----------------
tra wrote:
> Are two back-to-back syncCTAThreads() intentional or did you mean to call 
> something else to activate workers?
Intentional.  The first wakes up worker warps to execute the parallel region.  
The second is for the master warp to wait until the region has completed 
execution.  This is to implement the semantics of an implicit barrier at the 
end of an OpenMP parallel region.


https://reviews.llvm.org/D28145



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to