Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
8 Views

Enhancement Request: Parallel for/do order when limited to a single thread

I would like to request an enhancement of TBB loop patterns: if the Task Scheduler is limited to a single thread, the behavior of parallel for/do/other loops should be sequential and completely backward compatible to a single-thread execution.

Motivation: we are moving legacy single-threaded code to parallel execution, we need to keep backward compatibility. Users that do not choose to use the new parallel features should experience no behavior change.

As for now, I have to maintain 2 code streams: parallel and single-threaded. This complicates the development and the result code.

It seems that enabling backward compatibility for a single thread is not complicated and will not add performance overhead for TBB parallel loops.

Thanks!
Alex Nikonov
0 Kudos
1 Reply
Highlighted
Black Belt
8 Views

Could you specify the observed differences and why they matter?
0 Kudos