// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #ifndef JFJOCH_FFTINDEXERGPU_H #define JFJOCH_FFTINDEXERGPU_H // This include should be only included in sections of the code, where it is certain that CUDA is present // so with JFJOCH_USE_CUDA preprocessor definition, given this file is included in the source only in this case #include #include #include #include "CUDAMemHelpers.h" #include "../../common/Coord.h" #include "../../common/CrystalLattice.h" #include "FFTIndexer.h" #include "../common/IndexingSettings.h" #include "FFTResult.h" class FFTIndexerGPU : public FFTIndexer { CudaDevicePtr d_dir_x; CudaDevicePtr d_dir_y; CudaDevicePtr d_dir_z; CudaDevicePtr d_spot_x; CudaDevicePtr d_spot_y; CudaDevicePtr d_spot_z; CudaHostPtr spot_x; CudaHostPtr spot_y; CudaHostPtr spot_z; CudaDevicePtr d_input_fft; CudaDevicePtr d_output_fft; CudaDevicePtr d_result_fft; CudaRegisteredVector result_fft_reg; CudaFFTPlan plan; CudaStream stream; void ExecuteFFT(const std::vector &coord, size_t nspots) override; public: explicit FFTIndexerGPU(const IndexingSettings& settings); FFTIndexerGPU(const FFTIndexerGPU &i) = delete; const FFTIndexerGPU &operator=(const FFTIndexerGPU &i) = delete; ~FFTIndexerGPU() override = default; }; #endif //JFJOCH_FFTINDEXERGPU_H