Fix compilation errors and warnings

This commit is contained in:
2025-11-27 22:41:49 +01:00
parent e79667671a
commit 7e27c87673
17 changed files with 61 additions and 52 deletions

View File

@@ -13,6 +13,7 @@ std::unique_ptr<Backend> BackendFactory::create(BackendType backend_type, const
switch (backend_type)
{
case BackendType::CUDA_BACKEND:
{
#ifdef USE_CUDA
if (!CUDANet::Backends::CUDA::is_cuda_available()) {
@@ -20,14 +21,12 @@ std::unique_ptr<Backend> BackendFactory::create(BackendType backend_type, const
}
auto cuda = std::make_unique<CUDANet::Backends::CUDA>(config);
cuda.initialize();
return cuda;
#else
throw std::runtime_error("Library was compiled without CUDA support.");
#endif
}
break;
default: