MXAnalysisWithoutFPGA: Use GPU spot finder if available
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#include "ImageSpotFinderFactory.h"
|
||||
#include "ImageSpotFinderCPU.h"
|
||||
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
#include "../../common/CUDAWrapper.h"
|
||||
#include "ImageSpotFinderGPU.h"
|
||||
#endif
|
||||
|
||||
std::unique_ptr<ImageSpotFinder> CreateImageSpotFinder(size_t width, size_t height) {
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
if (get_gpu_count() > 0)
|
||||
return std::make_unique<ImageSpotFinderGPU>(width, height);
|
||||
#endif
|
||||
return std::make_unique<ImageSpotFinderCPU>(width, height);
|
||||
}
|
||||
Reference in New Issue
Block a user