This is a supplemental change to D13658. per the conversation in that review, we need to make sure we're using the right number of logical cores, and as of Windows 11, an app may not always see the right number on larger core machines. This change should address that.
Diff Detail
- Repository
- rB Blender
Event Timeline
Think we should remove the BLI_system_thread_count to avoid accidental access of an unreliable thread counter.
The patch contains a lot of unrelated changes: indentation, re-ordering include statements, changing the Foo * style. Not sure how that is happening, but such changes needs to be removed before we can land the patch,
Thanks for the update.
Can you please ensure the patch does not contain style/whitespace changes? Those are not related to the topic, and are against the code style anyway.
I'm actually not sure why those changes are coming in, I run a make format before I make the diff.
The changes are in the code which is #if 0 and clang-format does not modify it. My intuition suggests that the initial change in the style came from the editor, not from the make format. Don't think there is an automatic solution to this other than manually reverting those changes. Doing git diff -w and re-applying the patch without whitespace changes would reduce amount of manual work.
@Jagannadhan Ravi (easythrees), there were still some unrelated changes. Thought it'll be faster to go ahead and help you cleaning those up :)
Now it all seems good to me. @Ray Molenkamp (LazyDodo), @Brecht Van Lommel (brecht), not sure if you want to have a review here.
| source/blender/blenlib/intern/task_scheduler.cc | ||
|---|---|---|
| 65 | TBB May not be available here (this is the else in a #ifdef WITH_TBB_GLOBAL_CONTROL branch) and will break if you build without tbb (ie lite) | |