// Copyright (2019-2024) Paul Scherrer Institute #ifndef JUNGFRAUJOCH_INDEXERWRAPPER_H #define JUNGFRAUJOCH_INDEXERWRAPPER_H #include #include "../common/Coord.h" #include "CrystalLattice.h" #include "../common/Definitions.h" #ifdef JFJOCH_USE_CUDA #include #endif struct IndexingResult { CrystalLattice l; std::vector predicted_spots; }; class IndexerWrapper { #ifdef JFJOCH_USE_CUDA fast_feedback::config_runtime crt{}; fast_feedback::config_persistent cpers{ .max_output_cells = 32, .max_input_cells = 1, .max_spots = MAX_SPOT_COUNT, .num_candidate_vectors = 32, .redundant_computations = true, }; // default persistent config fast_feedback::refine::config_ifssr cifssr{ .min_spots = 6u }; fast_feedback::refine::indexer indexer{cpers, crt}; #endif constexpr const static uint32_t viable_cell_min_spots = 9; public: void Setup(const UnitCell &cell); std::vector Run(const std::vector &coord, float indexing_threshold); }; #endif //JUNGFRAUJOCH_INDEXERWRAPPER_H