This patch moves the logic to clone and check a new chunk into a new
function, to allow re-use in a follow-up patch that implements parallel
reductions.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Might even be worth pulling out as a named function - given how long the outer function is.
llvm/tools/llvm-reduce/deltas/Delta.cpp | ||
---|---|---|
219–220 | Usually I'd suggest any lambda that doesn't escape its scope should default capture by ref [&] rather than enumerating the captures (since it's like any other local scope - like a loop, etc - and should have access to all local variables without needing to declare them) - but given the intended direction involves parallelism, I'm with you here that it's good to enumerate the captures to avoid using some shared state accidentally that isn't thread safe. |
Usually I'd suggest any lambda that doesn't escape its scope should default capture by ref [&] rather than enumerating the captures (since it's like any other local scope - like a loop, etc - and should have access to all local variables without needing to declare them) - but given the intended direction involves parallelism, I'm with you here that it's good to enumerate the captures to avoid using some shared state accidentally that isn't thread safe.