19 lines
589 B
C++
19 lines
589 B
C++
// 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);
|
|
}
|