CUDA is no longer compulsory

This commit is contained in:
2023-04-27 22:01:55 +02:00
parent 85c3fb49f9
commit 310196d650
7 changed files with 129 additions and 33 deletions
+6
View File
@@ -4,10 +4,13 @@
#include "IndexerWrapper.h"
void IndexerWrapper::Setup(const UnitCell &cell) {
#ifdef JFJOCH_USE_CUDA
indexer.iCellM() = CrystalLattice(cell).GetEigenMatrix();
#endif
}
std::vector<CrystalLattice> IndexerWrapper::Run(const std::vector<Coord> &coord) {
#ifdef JFJOCH_USE_CUDA
std::vector<CrystalLattice> ret;
if (coord.size() < MIN_SPOTS_TO_INDEX)
@@ -32,4 +35,7 @@ std::vector<CrystalLattice> IndexerWrapper::Run(const std::vector<Coord> &coord)
ret.emplace_back(indexer.oCell(id));
return ret;
#else
return {};
#endif
}