// Copyright (2019-2023) Paul Scherrer Institute #ifndef JUNGFRAUJOCH_INDEXERWRAPPER_H #define JUNGFRAUJOCH_INDEXERWRAPPER_H #include #include "../common/Coord.h" #include "CrystalLattice.h" #ifdef JFJOCH_USE_CUDA #include #endif #define MIN_SPOTS_TO_INDEX (10) #define MAX_SPOTS_TO_INDEX (100) struct IndexingResult { CrystalLattice l; std::vector indexed_spots; uint64_t indexed_spots_count; }; class IndexerWrapper { #ifdef JFJOCH_USE_CUDA fast_feedback::config_runtime crt{ .num_sample_points = 32768 }; fast_feedback::config_persistent cpers{ .max_output_cells = 4, .max_input_cells = 1, .max_spots = MAX_SPOTS_TO_INDEX }; // default persistent config fast_feedback::refine::config_ifss conf_ifss{}; fast_feedback::refine::indexer_ifss indexer{cpers, crt, conf_ifss}; #endif constexpr const static uint64_t min_spots = 9; constexpr const static float threshold = 0.05f; public: void Setup(const UnitCell &cell); std::vector Run(const std::vector &coord); }; #endif //JUNGFRAUJOCH_INDEXERWRAPPER_H