[libcxx-commits] [PATCH] D70530: [pstl] OpenMP parallel back-end, WIP (Work in progress), just for discussion
Mikhail Dvorskiy via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 21 08:23:45 PST 2020
MikeDvorskiy updated this revision to Diff 245861.
MikeDvorskiy added a comment.
__parallel_transform_reduce pattern has been added.
In general case when a user passes user defined reductor, we canot rely on UDR from OpenMP spec, due to that requires "Identity" element. But STL reduction algorithms have not "Identity" element, just "Initial" element.
So, we have to do "manual" parallel reduction - creating N accumulators, accumulating N results and combining them int a final value.
P.S.
Of course, for +, *, min, max operations we can add a specialization code which will use "reduction" clause.
Repository:
rPSTL pstl
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70530/new/
https://reviews.llvm.org/D70530
Files:
include/pstl/internal/parallel_backend.h
include/pstl/internal/parallel_backend_omp.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70530.245861.patch
Type: text/x-patch
Size: 17317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200221/4c3ca975/attachment-0001.bin>
More information about the libcxx-commits
mailing list