Open
Conversation
vossmjp
reviewed
Dec 15, 2025
vossmjp
reviewed
Dec 15, 2025
| independent work sources that improve stealing scalability. | ||
|
|
||
| This model can also be interpreted as follows. Suppose the producer will generate *N* input items, where *N* is unknown in advance. | ||
| Execution with *aggregating-task-group* resembles buffering a batch of inputs, running an asynchronous parallel-for over the batch, then buffering again. |
Contributor
There was a problem hiding this comment.
What do you mean by "running an asynchronous parallel-for" here? I think this itself is open to interpretation. Do you mean "run" as if a task_group::run with a body that contains a tbb::parallel_for?
vossmjp
reviewed
Dec 15, 2025
| auto work_item = get_work_item(); | ||
|
|
||
| while (work_item != end_of_work) { | ||
| tg.run(process(work_item)); // Can be executed by any worker |
Contributor
There was a problem hiding this comment.
Is it necessary that the work are calls to the same function, i.e. "process(work_item)" or can the tasks be different?
vossmjp
reviewed
Dec 15, 2025
| This document does not yet propose a concrete API. The following options can be considered: | ||
| 1. A separate ``task_group``-like API with the same member functions. | ||
| 2. Integration into ``tbb::task_group``, e.g., an additional ``run()`` overload with a policy parameter or a separate member function. | ||
| 3. A separate API (e.g., ``tbb::parallel_while(generator, predicate, body))``), equivalent to |
Contributor
There was a problem hiding this comment.
This really limits applicability to the same body across items.
vossmjp
reviewed
Dec 15, 2025
Co-authored-by: Mike Voss <[email protected]>
Co-authored-by: Mike Voss <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add RFC with the initial description of Task Aggregation idea. The concrete API is an open question.
Fixes # - issue number(s) if exists
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
List users with
@to send notificationsOther information