Skip to content

Commit

Permalink
Merge pull request #5098 from blowekamp/fix_const_theader_test
Browse files Browse the repository at this point in the history
COMP: Address non-const operations when TBB enabled in test
  • Loading branch information
blowekamp authored Dec 19, 2024
2 parents e917d9f + 2dd2a65 commit f0eadd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Modules/Core/Common/test/itkMultiThreaderExceptionsTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@ itkMultiThreaderExceptionsTest(int, char *[])

using OutputImageType = itk::Image<OutputPixelType, Dimension>;

const std::set<ThreaderEnum> threadersToTest = { ThreaderEnum::Platform, ThreaderEnum::Pool };
const std::set<ThreaderEnum> threadersToTest = {
ThreaderEnum::Platform,
ThreaderEnum::Pool,
#ifdef ITK_USE_TBB
threadersToTest.insert(ThreaderEnum::TBB);
ThreaderEnum::TBB,
#endif // ITK_USE_TBB
};
for (auto thType : threadersToTest)
{
itk::MultiThreaderBase::SetGlobalDefaultThreader(thType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ itkMultiThreaderTypeFromEnvironmentTest(int argc, char * argv[])
success &= checkThreaderByName(expectedThreaderType);

// check that developer's choice for default is respected
const std::set<ThreaderEnum> threadersToTest = { ThreaderEnum::Platform, ThreaderEnum::Pool };
const std::set<ThreaderEnum> threadersToTest = {
ThreaderEnum::Platform,
ThreaderEnum::Pool,
#ifdef ITK_USE_TBB
threadersToTest.insert(ThreaderEnum::TBB);
ThreaderEnum::TBB,
#endif // ITK_USE_TBB
};
for (auto thType : threadersToTest)
{
itk::MultiThreaderBase::SetGlobalDefaultThreader(thType);
Expand Down

0 comments on commit f0eadd9

Please sign in to comment.