Skip to content

Commit 3d84a93

Browse files
author
sfn
committed
Properly break out of switch statement when selecting backend
1 parent cc750e8 commit 3d84a93

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/software/pipeline/main_depthMapEstimation.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,17 +451,19 @@ int aliceVision_main(int argc, char* argv[])
451451
{
452452
depthMap::DepthMapEstimator depthMapEstimator(mp, tileParams, depthMapParams, sgmParams, refineParams);
453453
depthMap::computeOnMultiGPUs(cams, depthMapEstimator, nbGPUs);
454+
break;
454455
}
455456
#endif
456457
#if ALICEVISION_IS_DEFINED(ALICEVISION_DEPTHMAP_BACKEND_SYCL)
457458
case 1:
458459
{
459460
depthMap_sycl::DepthMapEstimator depthMapEstimator(mp, tileParams, depthMapParams, sgmParams, refineParams);
460461
depthMap_sycl::computeOnMultiDevices(cams, depthMapEstimator, nbGPUs);
462+
break;
461463
}
462464
#endif
463465
default:
464-
ALICEVISION_LOG_ERROR("Invalid/unsupported backend selected for computation");
466+
ALICEVISION_THROW_ERROR("Invalid/unsupported backend selected for computation");
465467
}
466468

467469
ALICEVISION_COMMANDLINE_END

src/software/pipeline/main_depthMapFiltering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,19 @@ int aliceVision_main(int argc, char* argv[])
171171
{
172172
depthMap::NormalMapEstimator normalMapEstimator(mp);
173173
depthMap::computeOnMultiGPUs(cams, normalMapEstimator, nbGPUs);
174+
break;
174175
}
175176
#endif
176177
#if ALICEVISION_IS_DEFINED(ALICEVISION_DEPTHMAP_BACKEND_SYCL)
177178
case 1:
178179
{
179180
depthMap_sycl::NormalMapEstimator normalMapEstimator(mp);
180181
depthMap_sycl::computeOnMultiDevices(cams, normalMapEstimator, nbGPUs);
182+
break;
181183
}
182184
#endif
183185
default:
184-
ALICEVISION_LOG_ERROR("Invalid/unsupported backend selected for computation");
186+
ALICEVISION_THROW_ERROR("Invalid/unsupported backend selected for computation");
185187
}
186188
}
187189

0 commit comments

Comments
 (0)