Lines Matching refs:task

3 Migrating from low-level task API
6 The low-level task API of Intel(R) Threading Building Blocks (TBB) was considered complex and hence
9 task API is used.
17 inherit ``tbb::task`` and implement its interface. Then spawning of ``ChildTask1`` and
23 #include <tbb/task.h>
27 RootTask& root = *new(tbb::task::allocate_root()) RootTask{};
34 tbb::task::spawn(child1);
35 tbb::task::spawn(child2);
58 implement ``tbb::task`` interface that overrides the ``tbb::task* tbb::task::execute()`` virtual
89 Adding more work during task execution
96 parallel pattern. The ``tbb::parallel_do`` algorithm logic may be implemented using the task API as:
102 #include <tbb/task.h>
104 // Assuming RootTask and OtherWork are defined and implement tbb::task interface.
106 struct Task : public tbb::task {
107 Task(tbb::task& root, int i)
111 tbb::task* execute() override {
115 tbb::task& child = *new(m_root.allocate_child()) OtherWork;
116 tbb::task::spawn(child);
121 tbb::task& m_root;
127 RootTask& root = *new(tbb::task::allocate_root()) RootTask{/*params*/};
132 Task& task = *new(root.allocate_child()) Task(root, items[i]);
133 tbb::task::spawn(task);
228 need for the task scheduler to react to outer circumstances, such as cancellation of group
263 task:
333 TBB ``task::execute()`` method can return a pointer to a task that can be executed next by the curr…
334 … reduce scheduling overheads compared to direct ``spawn``. Similar to ``spawn``, the returned task
339 #include <tbb/task.h>
343 struct Task : tbb::task {
344 task* execute(){
356 RootTask& root = *new(tbb::task::allocate_root()) RootTask{};
387 Here ``oneapi::tbb::task_group::defer`` adds a new task into the ``tg``. However, the task is not p…
391 Deferred task creation
393 The TBB low-level task API separates the task creation from the actual spawning. This separation al…
394 postpone the task spawning, while the parent task and final result production are blocked from prem…
396 inherit ``tbb::task`` and implement its interface. Then, blocking the ``RootTask`` from leaving pre…
401 #include <tbb/task.h>
405 RootTask& root = *new(tbb::task::allocate_root()) RootTask{};
412 tbb::task::spawn(child);
415 tbb::task::enqueue(cb_task);
448 Here ``oneapi::tbb::task_group::defer`` adds a new task into the ``tg``. However, the task is not s…