Skip to content

Conversation

@murraystevenson
Copy link
Collaborator

This continues our journey towards VFX Platform CY2025 by adding support for oneTBB 2021. TBB 2020 is still supported so we can also target CY2024.

I've aimed to keep the changes to PrimitiveAlgoUtils::SplitTask minimal, and am relying on the existing test coverage. It's not used in Gaffer and may be a candidate for moving to IECoreHoudini if that is the only client...

@murraystevenson murraystevenson self-assigned this Jan 7, 2026
Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Murray - LGTM apart from the task_group_context stuff.

I've aimed to keep the changes to PrimitiveAlgoUtils::SplitTask minimal, and am relying on the existing test coverage. It's not used in Gaffer and may be a candidate for moving to IECoreHoudini if that is the only client...

Looks like it is used in Cortex still - PointsAlgo::segment() and CurvesAlgo::segment() use it via TaskSegmenter, so it probably can't be moved just yet. I wouldn't want to rely on this approach in Gaffer though - I'm convinced that much better approaches exist, as Daniel demonstrated for MeshAlgo::segment() a while back.

@johnhaddon
Copy link
Member

Thanks for the fixups - LGTM.

The low-level `tbb::task` API was removed from oneTBB 2021. Switching these over to `parallel_for` is the simplest change that is supported by both TBB 2020 and oneTBB 2021, allowing us to target VFX Platform CY2024 & CY2025.
recursive_mutex.h is deprecated in TBB 2020 and removed from oneTBB 2021
`tbb::task_scheduler_init` is deprecated in TBB 2020 and was removed from oneTBB 2021, so we no longer provide the Python context manager wrapper and migrate any usage of `tbb_task_scheduler_init` to `tbb_global_control`.
@murraystevenson murraystevenson merged commit 6afb4b0 into ImageEngine:main Jan 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants