[libcxx-commits] [PATCH] D120186: [pstl] Implementation of Grand Central Dispatch backend
Christopher Nelson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 10 09:16:33 PDT 2022
nadiasvertex marked 2 inline comments as done.
nadiasvertex added inline comments.
================
Comment at: pstl/include/pstl/internal/gcd/parallel_invoke.h:29
+ dispatch_apply_f(2, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), &__data,
+ [](void* __ctx, ::std::size_t __index)
+ {
----------------
philnik wrote:
> Is there a reason you use `::std` here instead of `std`?
Nope.
================
Comment at: pstl/include/pstl/internal/gcd/parallel_stable_partial_sort.h:29
+ // TODO: The partial sort implementation should be shared with the other backends.
+ __leaf_sort(__xs, __xe, __comp);
+}
----------------
philnik wrote:
> This isn't ADL-proof.
Okay. What do you suggest?
================
Comment at: pstl/include/pstl/internal/gcd/util.h:104
+ // is safe to pass a pointer to the stack allocated data above.
+ dispatch_apply_f(__n_chunks_, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), this,
+ [](void* __ctx, std::size_t __chunk)
----------------
philnik wrote:
> Also not ADL-proof
It's a C-function. What do you suggest?
================
Comment at: pstl/include/pstl/internal/parallel_backend_gcd.h:14-16
+//------------------------------------------------------------------------
+// parallel_invoke
+//------------------------------------------------------------------------
----------------
philnik wrote:
> These comments seem weird to me.
Ok.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120186/new/
https://reviews.llvm.org/D120186
More information about the libcxx-commits
mailing list