This is an archive of the discontinued LLVM Phabricator instance.

[libc++][PSTL] Implement std::for_each{, _n}
ClosedPublic

Authored by philnik on Apr 27 2023, 2:13 PM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG68ee014b15d3: [libc++][PSTL] Implement std::for_each{, _n}

Diff Detail

Event Timeline

philnik created this revision.Apr 27 2023, 2:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 2:13 PM
philnik requested review of this revision.Apr 27 2023, 2:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 2:13 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik retitled this revision from [libc++][PMR] Impletement std::for_each{, _n} to [libc++][PSTL] Impletement std::for_each{, _n}.Apr 27 2023, 2:14 PM
philnik retitled this revision from [libc++][PSTL] Impletement std::for_each{, _n} to [libc++][PSTL] Implement std::for_each{, _n}.
ldionne accepted this revision.Apr 28 2023, 8:21 AM
ldionne added inline comments.
libcxx/include/__algorithm/for_each.h
22–24 ↗(On Diff #517713)

I don't think these formatting changes are necessary here.

libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/pstl.for_each.pass.cpp
42

I think it does, cause it's a bit reference under the hood and so for example begin(), begin() + 1 will share the same underlying byte but can be processed in different threads. So yeah, I think vector<bool> + pstl is not a happy combination.

This revision is now accepted and ready to land.Apr 28 2023, 8:21 AM
philnik updated this revision to Diff 517938.Apr 28 2023, 8:31 AM

Generate files

philnik updated this revision to Diff 518016.Apr 28 2023, 12:19 PM
philnik marked 2 inline comments as done.

Address comments

philnik updated this revision to Diff 518336.Apr 30 2023, 11:06 AM

Try to fix CI

This revision was landed with ongoing or failed builds.Apr 30 2023, 1:27 PM
This revision was automatically updated to reflect the committed changes.

Could you perhaps make a quick pass over all your pstl tests to make sure you don't have copy-paste errors in those signatures?

libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/pstl.for_each_n.pass.cpp
16–18

Wrong signature!