-
Notifications
You must be signed in to change notification settings - Fork 115
[oneTBB] task_group/task_arena extensions #368
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
Merged
anton-potapov
merged 17 commits into
uxlfoundation:main
from
anton-potapov:task_group_extensions
Sep 15, 2021
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4890ea2
[oneTBB] task_handle related extensions
anton-potapov f74a61d
[oneTBB] task_handle related extensions
anton-potapov e997253
[oneTBB] task_handle related extensions
anton-potapov b1e172d
[oneTBB] task_handle related extensions
anton-potapov baa71ef
[oneTBB] task_group contructor acepting task_group_context
anton-potapov bfc85b2
[oneTBB] task_group contructor acepting task_group_context
anton-potapov f2ffbc6
Merge pull request #2 from anton-potapov/task_group_constructor
anton-potapov 121649e
[oneTBB] task_handle related extensions
anton-potapov 85a9d7f
[oneTBB] task_handle related extensions
anton-potapov 4d64cce
Merge pull request #1 from anton-potapov/task_handle
anton-potapov 0bb3203
[oneTBB] task_handle related extensions
anton-potapov 56aa6a2
Merge pull request #3 from anton-potapov/task_group_run_and_wait
anton-potapov 2225ba0
[oneTBB] task_handle related extensions
anton-potapov b2f1937
[oneTBB] task_handle related extensions
anton-potapov f516a74
Merge remote-tracking branch 'upstream/main' into task_group_extensions
anton-potapov 25d14e7
[oneTBB] task_handle related extensions
anton-potapov e10309c
Merge remote-tracking branch 'upstream/main' into task_group_extensions
anton-potapov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
84 changes: 84 additions & 0 deletions
84
source/elements/oneTBB/source/task_scheduler/task_group/task_handle.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| .. SPDX-FileCopyrightText: 2021 Intel Corporation | ||
| .. | ||
| .. SPDX-License-Identifier: CC-BY-4.0 | ||
|
|
||
| =========== | ||
| task_handle | ||
| =========== | ||
| **[scheduler.task_handle]** | ||
|
|
||
| An instance of ``task_handle`` type owns a deferred task object. | ||
|
|
||
| .. code:: cpp | ||
|
|
||
| namespace oneapi { | ||
| namespace tbb { | ||
|
|
||
| class task_handle { | ||
| public: | ||
| task_handle(); | ||
| task_handle(task_handle&& src); | ||
|
|
||
| ~task_handle(); | ||
|
|
||
| task_handle& operator=(task_handle&& src); | ||
|
|
||
| explicit operator bool() const noexcept; | ||
| }; | ||
|
|
||
| bool operator==(task_handle const& h, std::nullptr_t) noexcept; | ||
| bool operator==(std::nullptr_t, task_handle const& h) noexcept; | ||
|
|
||
| bool operator!=(task_handle const& h, std::nullptr_t) noexcept; | ||
| bool operator!=(std::nullptr_t, task_handle const& h) noexcept; | ||
|
|
||
| } // namespace tbb | ||
| } // namespace oneapi | ||
|
|
||
|
|
||
| Member Functions | ||
| ---------------- | ||
|
|
||
| .. namespace:: tbb::task_handle | ||
|
|
||
| .. cpp:function:: task_handle() | ||
|
|
||
| Creates an empty ``task_handle`` object. | ||
|
|
||
| .. cpp:function:: task_handle(task_handle&& src) | ||
|
|
||
| Constructs ``task_handle`` object with the content of ``src`` using move semantics. ``src`` becomes empty after the construction. | ||
|
|
||
| .. cpp:function:: ~task_handle() | ||
|
|
||
| Destroys the ``task_handle`` object and associated task if it exists. | ||
|
|
||
| .. cpp:function:: task_handle& operator=(task_handle&& src) | ||
|
|
||
| Replaces the content of ``task_handle`` object with the content of ``src`` using move semantics. ``src`` becomes empty after the assignment. | ||
| The previously associated task object, if any, is destroyed before the assignment. | ||
|
|
||
| **Returns:** Reference to ``*this``. | ||
|
|
||
| .. cpp:function:: explicit operator bool() const noexcept | ||
|
|
||
| Checks if ``*this`` has an associated task object. | ||
|
|
||
| **Returns:** ``true`` if ``*this`` is not empty, ``false`` otherwise. | ||
|
|
||
| Non-Member Functions | ||
| -------------------- | ||
|
|
||
| .. code:: cpp | ||
|
|
||
| bool operator==(task_handle const& h, std::nullptr_t) noexcept | ||
| bool operator==(std::nullptr_t, task_handle const& h) noexcept | ||
|
|
||
| **Returns**: ``true`` if ``h`` is empty, ``false`` otherwise. | ||
|
|
||
| .. code:: cpp | ||
|
|
||
| bool operator!=(task_handle const& h, std::nullptr_t) noexcept | ||
| bool operator!=(std::nullptr_t, task_handle const& h) noexcept | ||
|
|
||
| **Returns**: ``true`` if ``h`` is not empty, ``false`` otherwise. |
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.
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.
Please, update the copyright year for this file.
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.
updated