IndexerWrapper: Use dedicated structure to write result

This commit is contained in:
2023-05-18 08:52:49 +02:00
parent ea719742ce
commit 8c85789a77
3 changed files with 15 additions and 8 deletions
+7 -4
View File
@@ -9,9 +9,9 @@ void IndexerWrapper::Setup(const UnitCell &cell) {
#endif
}
std::vector<CrystalLattice> IndexerWrapper::Run(const std::vector<Coord> &coord) {
std::vector<IndexingResult> IndexerWrapper::Run(const std::vector<Coord> &coord) {
#ifdef JFJOCH_USE_CUDA
std::vector<CrystalLattice> ret;
std::vector<IndexingResult> ret;
if (coord.size() < MIN_SPOTS_TO_INDEX)
return ret;
@@ -31,8 +31,11 @@ std::vector<CrystalLattice> IndexerWrapper::Run(const std::vector<Coord> &coord)
auto id = fast_feedback::refine::best_cell(indexer.oScoreV());
// Check if is viable
if (fast_feedback::refine::is_viable_cell(indexer.oCell(id), indexer.Spots(), 0.05f, 9u))
ret.emplace_back(indexer.oCell(id));
if (fast_feedback::refine::is_viable_cell(indexer.oCell(id), indexer.Spots(), 0.05f, 9u)) {
IndexingResult result;
result.l = CrystalLattice(indexer.oCell(id));
ret.emplace_back(result);
}
return ret;
#else