IndexerWrapper: Use dedicated structure to write result
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user