// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include "../../common/Coord.h" #include "Indexer.h" // The best cells of the fast-feedback indexer for one input cell, before Refine(): three rows per // cell (the real-space cell vectors), scores ascending - lower is better. The layout of the GPU // library's oCellM()/oScoreV(), so both feed Refine() the same way. struct FFBIDXCells { Eigen::MatrixX3 cells; Eigen::VectorX scores; }; // The fast-feedback indexer on the CPU: same samples, scores and output as the GPU library. // cell holds the real-space cell vectors as rows; the first nspots of spots are used. FFBIDXCells FFBIDXFindCells(const Eigen::Matrix3f &cell, const std::vector &spots, size_t nspots); class FFBIDXIndexerCPU : public Indexer { Eigen::Matrix3f input_cell; void SetupUnitCell(const std::optional &cell) override; public: std::vector RunInternal(const std::vector &coord, size_t nspots) override; };