rugnux: relabel the integrated reflections in parallel, output unchanged
reseat_integrated changed the basis of every integrated reflection on the main thread. One image per task now; each touches only its own outcome. Measured on 4nwv (CPU-only): 2.1 s of serial time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1c748ba41e
commit
ec02b181db
@@ -602,13 +602,16 @@ bool Rugnux::ScaleMergeAndSymmetry(PipelineLocals &p) {
|
||||
const auto reseat_integrated = [&](const gemmi::Op &cob) {
|
||||
const gemmi::Mat33 basis = BasisMatrix(cob);
|
||||
const gemmi::Op hkl = HklOperator(cob);
|
||||
for (auto &io : indexer->GetIntegrationOutcome()) {
|
||||
// One image per task: each touches only its own outcome.
|
||||
auto &outcomes = indexer->GetIntegrationOutcome();
|
||||
ParallelFor(static_cast<int>(outcomes.size()), config_.nthreads, [&](int o) {
|
||||
auto &io = outcomes[o];
|
||||
io.latt = io.latt.Multiply(basis);
|
||||
for (auto &r : io.reflections) {
|
||||
const gemmi::Op::Miller h = hkl.apply_to_hkl({{r.h, r.k, r.l}});
|
||||
r.h = h[0]; r.k = h[1]; r.l = h[2];
|
||||
}
|
||||
}
|
||||
});
|
||||
result.consensus_cell = CellInBasis(*result.consensus_cell, cob);
|
||||
end_msg.unit_cell = result.consensus_cell;
|
||||
if (end_msg.rotation_lattice.has_value())
|
||||
|
||||
Reference in New Issue
Block a user