[libcxx-commits] [PATCH] D151717: [libc++][PSTL] Add a GCD backend
Christopher Nelson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 16 06:13:13 PDT 2023
nadiasvertex added inline comments.
================
Comment at: libcxx/include/__algorithm/pstl_backends/cpu_backends/libdispatch.h:142-143
+ } else {
+ __xm = __first1 + (__size_x / 2);
+ __ym = std::lower_bound(__first2, __last2, *__xm, __comp);
+ }
----------------
ldionne wrote:
> Is there any reason why we use `lower_bound` here?
>
> @nadiasvertex Would you happen to remember why you did it that way in the original GCD backend implementation?
It's been so long, I don't remember the exact details, sorry. I think it had something to do with calculating the correct offset. We do the search in the smallest range, and the constraints change because the place we want to compute is different in first1:last1 than it is in first2:last2.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151717/new/
https://reviews.llvm.org/D151717
More information about the libcxx-commits
mailing list