InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
`TBBMultiThreader::SetNumberOfWorkUnits` ignores GlobalMaximumNumberOfThreads, OK?
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
The SetNumberOfWorkUnits member function of MultiThreaderBase does at https://github.com/InsightSoftwareConsortium/ITK/blob/c14ff0e61d3f37ff3c4d6619b404586cc055bc56/Modules/Core/Common/src/itkMultiThreaderBase.cxx#L259-L262
```cpp
m_NumberOfWorkUnits = std::clamp(numberOfWorkUnits, 1, m_PimplGlobals->m_GlobalMaximumNumberOfThreads);
```
However, SetNumberOfWorkUnits member function of TBBMultiThreader ignores GlobalMaximumNumberOfThreads, as it just does, at https://github.com/InsightSoftwareConsortium/ITK/blob/c14ff0e61d3f37ff3c4d6619b404586cc055bc56/Modules/Core/Common/src/itkTBBMultiThreader.cxx#L105-L108
```cpp
m_NumberOfWorkUnits = std::max(1u, numberOfWorkUnits);
```
Is that behavior difference intended? If so, why would TBBMultiThreader behave different than the other threaders, with respect to SetNumberOfWorkUnits?
Contributor guide
Assessment
This issue has not been assessed yet.