INNER CODE UNIT · C++
listlen
torognes/swarm · src/algo.cpp:464
auto const listlen = amps_v.size() - cursor.swarmed;
qgram_differ.fast_over_pool(seedampliconid,
make_view(amps_v).subview(cursor.swarmed, listlen),
workspace.qgram_diffs(listlen));
for (auto i = 0ULL; i < listlen; ++i) {
auto const diff = workspace.qgramdiffs_v[i];
assert(diff <= std::numeric_limits<unsigned int>::max());
// the id comes from the record this iteration is writing to, rather
// than from a second array the collecting pass used to fill
auto & pool_entry = amps_v[cursor.swarmed + i];
pool_entry.diffestimate = static_cast<unsigned int>(diff);
if (diff <= parameters.opt_differences) {
workspace.targetindices[targetcount] = cursor.swarmed + i;
workspace.targetampliconids[targetcount] = pool_entry.ampliconid;
++targetcount;
}
}