-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert simple uses of WorkerThreadPool
to parallel for_range()
#79490
Conversation
@@ -204,6 +204,10 @@ class WorkerThreadPool : public Object { | |||
|
|||
template <typename F> | |||
static _FORCE_INLINE_ void for_range(int i_begin, int i_end, bool parallel, String name, F f) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR, but now I've realized the naming convention of arguments code be a bit mroe strongly followed here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I already said I'm loving all this parallel for refactor.
Regarding the review, everything looks correct to me. Let's test it in the wild. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR warrants some discussion with the production team as it strongly encourages the use of lambdas. Currently we discourage the use of lambdas in the codebase except for in a few key places.
Other |
Ah, I see I was mistaking this PR for #72784 which was already merged awhile ago. Oh well, I'll defer to your judgement here |
Simplifies threading compared to direct usage of
WorkerThreadPool
, since there is no longer a need for intermediate functions or structs.image_compress_cvtt()
may experience performance regressions until #72716 is merged.This has not been tested. Tread with caution.