9#include <spdlog/spdlog.h>
18Halide::Target AppConfig::s_halide_target = Halide::get_host_target();
37 if (m_processing_backend != backend)
39 m_processing_backend = backend;
45 spdlog::info(
"[AppConfig] Processing backend changed to: {}", backend_str);
51 return m_processing_backend;
61 s_halide_target = target;
64 std::string features_str;
65 if (target.has_feature(Halide::Target::CUDA)) features_str +=
"CUDA ";
66 if (target.has_feature(Halide::Target::OpenCL)) features_str +=
"OpenCL ";
67 if (target.has_feature(Halide::Target::Vulkan)) features_str +=
"Vulkan ";
68 if (target.has_feature(Halide::Target::Metal)) features_str +=
"Metal ";
69 if (target.has_feature(Halide::Target::D3D12Compute)) features_str +=
"DirectX12 ";
71 spdlog::info(
"[AppConfig] Halide Target updated. Architecture: {}, Features: [{}]",
72 target.to_string(), features_str);
77 return s_halide_target;
85void AppConfig::reset()
87 spdlog::debug(
"[AppConfig] Resetting configuration to defaults.");
93 s_halide_target = Halide::get_host_target();
Application-wide configuration singleton.
Singleton class for managing application-wide configuration settings.
static void setHalideTarget(const Halide::Target &target)
Sets the configured Halide Target object.
Common::MemoryType getProcessingBackend() const noexcept
Gets the configured processing backend.
static AppConfig & instance()
Gets the singleton instance of AppConfig.
void setProcessingBackend(Common::MemoryType backend)
Sets the processing backend (CPU or GPU) for image operations.
static const Halide::Target & getHalideTarget()
Gets the configured Halide Target object.
MemoryType
Enum representing the memory type where image data is stored.
@ CPU_RAM
Data is stored in main CPU RAM.