// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include "ImagePreprocessor.h" #include "../indexing/CUDAMemHelpers.h" class ImagePreprocessorGPU : public ImagePreprocessor { std::shared_ptr stream; int threads; int blocks; CudaDevicePtr gpu_mask; CudaDevicePtr gpu_decompressed_image; CudaDevicePtr gpu_stats; std::vector cpu_stats; CudaRegisteredVector cpu_stats_reg; std::vector cpu_image; template ImageStatistics Analyze(ImagePreprocessorBuffer &processed_image, const uint8_t *input, T err_value, T sat_value); public: ImagePreprocessorGPU(const DiffractionExperiment &experiment, const PixelMask &mask, std::shared_ptr stream); ImageStatistics Analyze(ImagePreprocessorBuffer &processed_image, const uint8_t *decompressed_image, CompressedImageMode image_mode) override; };