Lines Matching refs:tbb
48 class CountingTask : public tbb::detail::d1::task {
50 CountingTask( Body body, tbb::detail::d1::wait_context& wait ) : my_body(body), my_wait(wait) {} in CountingTask()
52 CountingTask( tbb::detail::d1::wait_context& wait ) : my_wait(wait) {} in CountingTask()
54 task* execute( tbb::detail::d1::execution_data& ) override { in execute()
61 task* cancel( tbb::detail::d1::execution_data& ) override { in cancel()
77 tbb::detail::d1::wait_context& my_wait;
96 tbb::detail::d1::wait_context wait(1); in test_cancellation_on_exception()
97 tbb::task_group_context test_context; in test_cancellation_on_exception()
106 tbb::detail::d1::execute_and_wait(task, test_context, wait, test_context); in test_cancellation_on_exception()
128 tbb::task_group test_gr;
142 tbb::detail::d1::wait_context wait(1);
143 tbb::task_group_context test_context;
148 tbb::detail::d1::execute_and_wait(test_task, test_context, wait, test_context);
176 tbb::detail::d1::wait_context wait(threads_num);
177 tbb::detail::d1::task_group_context test_context;
180 …std::vector<task_type, tbb::cache_aligned_allocator<task_type>> vector_test_task(threads_num, task…
185 tbb::detail::d1::spawn(vector_test_task[j], test_context);
187 tbb::detail::d1::wait(wait, test_context);
210 tbb::parallel_for(tbb::blocked_range<std::size_t>(0, pfor_iter_count), in __anon509d20bd0502()
211 [&pfor_counter] (tbb::blocked_range<std::size_t>& range) { in __anon509d20bd0502()
219 tbb::detail::d1::wait_context wait(task_threads_num);
220 tbb::detail::d1::task_group_context test_context;
222 …std::vector<task_type, tbb::cache_aligned_allocator<task_type>> vector_test_task(task_threads_num,…
230 tbb::detail::d1::spawn(vector_test_task[j], test_context);
237 tbb::detail::d1::wait(wait, test_context);
264 tbb::detail::d1::wait_context wait(threads_num);
265 tbb::detail::d1::task_group_context test_context;
267 …std::vector<task_type, tbb::cache_aligned_allocator<task_type>> vector_test_task(threads_num, task…
270 tbb::detail::d1::spawn(vector_test_task[idx], test_context); in __anon509d20bd0802()
287 …tbb::detail::d1::execute_and_wait(vector_test_task[threads_num - 1], test_context, wait, test_cont…
303 using task_pool_type = std::vector<SpawningTask, tbb::cache_aligned_allocator<SpawningTask>>;
305 SpawningTaskBody( task_pool_type& task_pool, tbb::task_group_context& test_ctx ) in SpawningTaskBody()
314 tbb::detail::d1::spawn(my_task_pool[idx], my_test_ctx); in operator ()()
320 tbb::task_group_context& my_test_ctx;
330 tbb::detail::d1::wait_context wait(task_number + 1);
331 tbb::task_group_context test_context;
341 tbb::detail::d1::execute_and_wait(first_task, test_context, wait, test_context);
348 struct suspended_task : public tbb::detail::d1::task {
350 suspended_task(tbb::task::suspend_point tag, tbb::detail::d1::wait_context& wait) in suspended_task()
354 task* execute(tbb::detail::d1::execution_data&) override { in execute()
355 tbb::parallel_for(tbb::blocked_range<std::size_t>(0, 100000), in execute()
356 [] (const tbb::blocked_range<std::size_t>& range) { in execute()
363 tbb::static_partitioner{} in execute()
367 tbb::task::resume(my_suspend_tag); in execute()
371 task* cancel(tbb::detail::d1::execution_data&) override { in cancel()
376 tbb::task::suspend_point my_suspend_tag;
377 tbb::detail::d1::wait_context& my_wait;
383 tbb::task_group_context test_context;
388 tbb::parallel_for(tbb::blocked_range<std::size_t>(0, 100000),
389 …[&suspend_flag, &test_context, &suspend_count, &resume_count] (const tbb::blocked_range<std::size_… in __anon509d20bd0b02()
396 std::vector<suspended_task, tbb::cache_aligned_allocator<suspended_task>> test_task; in __anon509d20bd0b02()
397 tbb::detail::d1::wait_context wait(1); in __anon509d20bd0b02()
399 tbb::this_task_arena::isolate([&wait, &test_context, &test_task] { in __anon509d20bd0b02()
401 … tbb::task::suspend([&wait, &test_context, &test_task, thread_id] (tbb::task::suspend_point tag) { in __anon509d20bd0b02()
404 tbb::detail::d1::spawn(test_task[0], test_context); in __anon509d20bd0b02()
408 tbb::detail::d1::wait(wait, test_context); in __anon509d20bd0b02()
417 struct bypass_task : public tbb::detail::d1::task {
418 using task_pool_type = std::vector<bypass_task, tbb::cache_aligned_allocator<bypass_task>>;
420 bypass_task(tbb::detail::d1::wait_context& wait, task_pool_type& task_pool, in bypass_task()
421 std::atomic<int>& resume_flag, tbb::task::suspend_point& suspend_tag) in bypass_task()
425 task* execute(tbb::detail::d1::execution_data&) override { in execute()
430 tbb::task::resume(my_suspend_tag); in execute()
442 tbb::task::resume(my_suspend_tag); in execute()
450 task* cancel(tbb::detail::d1::execution_data&) override { in cancel()
455 tbb::detail::d1::wait_context& my_wait;
458 tbb::task::suspend_point& my_suspend_tag;
469 tbb::task_group_context test_context;
470 tbb::detail::d1::wait_context wait(task_number + 1);
475 tbb::task::suspend_point test_suspend_tag;
477 std::vector<bypass_task, tbb::cache_aligned_allocator<bypass_task>> test_task_pool;
486 tbb::detail::d1::spawn(test_task_pool[ticket], test_context);
492 … tbb::task::suspend([&resume_flag, &test_suspend_tag, thread_id] (tbb::task::suspend_point tag) { in __anon509d20bd0e02()
501 tbb::detail::d1::execute_and_wait(suspend_task, test_context, wait, test_context);
510 tbb::task_group_context test_context;
511 tbb::detail::d1::wait_context wait{ 0 };
515 …tbb::global_control thread_limit(tbb::global_control::max_allowed_parallelism, num_threads_in_test…
516 tbb::task_arena test_arena(num_threads_in_test_arena);
521 tbb::task::suspend_point test_suspend_tag;
528 tbb::task::resume(test_suspend_tag); in __anon509d20bd1002()
534 std::vector<task_type, tbb::cache_aligned_allocator<task_type>> test_tasks;
547 … tbb::task::suspend([&resume_flag, &test_suspend_tag, thread_id] (tbb::task::suspend_point tag) { in __anon509d20bd1102()
560 …tbb::this_task_arena::isolate([&wait, &test_tasks, &test_arena, &test_context, &resumed, task_numb… in __anon509d20bd1302()
563 tbb::parallel_for(tbb::blocked_range<std::size_t>(task_number / 2, task_number), in __anon509d20bd1302()
564 … [&test_tasks, &test_arena, &test_context] (tbb::blocked_range<std::size_t>& range) { in __anon509d20bd1302()
575 tbb::detail::d1::wait(wait, test_context); in __anon509d20bd1602()
583 tbb::task_group_context test_context;
584 tbb::detail::d1::wait_context wait(task_number);
586 tbb::task_arena test_arena;
591 …tbb::parallel_for(tbb::blocked_range<std::size_t>(0, 1000), [] (tbb::blocked_range<std::size_t>&) { in __anon509d20bd1702()
599 std::vector<task_type, tbb::cache_aligned_allocator<task_type>> test_tasks;
613 tbb::detail::d1::spawn(test_tasks[j], test_context); in __anon509d20bd1902()
620 tbb::detail::d1::wait(wait, test_context); in __anon509d20bd1902()
634 tbb::concurrent_vector<tbb::task::suspend_point> suspend_points;
636 tbb::task_group test_gr;
642 tbb::task::suspend([&] (tbb::task::suspend_point sp) { in __anon509d20bd1a02()
658 tbb::task::resume(sp);
668 tbb::task_group_context test_context;
669 tbb::detail::d1::wait_context wait(task_number);
671 tbb::task_arena test_arena{int(std::thread::hardware_concurrency() + 1)};
685 std::vector<task_type, tbb::cache_aligned_allocator<task_type>> test_tasks;
692 tbb::global_control gc(tbb::global_control::max_allowed_parallelism, 1);
695 tbb::parallel_for(0, 1, [] (int) {}); in __anon509d20bd1e02()
696 tbb::task_arena test_arena2(tbb::task_arena::attach{});
702 tbb::global_control gc(tbb::global_control::max_allowed_parallelism, 1);
712 tbb::detail::d1::spawn(test_tasks[j], test_context); in __anon509d20bd1f02()
715 tbb::detail::d1::wait(wait, test_context); in __anon509d20bd1f02()
726 struct resubmitting_task : public tbb::detail::d1::task {
727 tbb::task_arena& my_arena;
728 tbb::task_group_context& my_ctx;
731 …resubmitting_task(tbb::task_arena& arena, tbb::task_group_context& ctx) : my_arena(arena), my_ctx(… in resubmitting_task()
734 tbb::detail::d1::task* execute(tbb::detail::d1::execution_data& ) override { in execute()
741 tbb::detail::d1::task* cancel( tbb::detail::d1::execution_data& ) override { in cancel()
752 tbb::global_control gc(tbb::global_control::max_allowed_parallelism, thread_number + 1);
754 tbb::task_arena test_arena(2 * thread_number, thread_number);
762 tbb::task_group_context test_context;
763 tbb::detail::d1::wait_context wait(critical_task_counter);
789 tbb::parallel_for(std::uint32_t(0), thread_number + 1, [&] (std::uint32_t) { in __anon509d20bd2302()
807 tbb::detail::d1::wait(wait, test_context);
824 tbb::detail::d0::raii_guard<decltype(func)> guard1(func);
825 tbb::detail::d0::raii_guard<decltype(func)> guard2(std::move(guard1));
831 tbb::task_scheduler_handle handle{ tbb::attach{} };
833 tbb::task_arena a(2, 0);
836 …tbb::parallel_for(0, 100, [] (int) { std::this_thread::sleep_for(std::chrono::nanoseconds(10)); }); in __anon509d20bd2602()
840 tbb::finalize(handle, std::nothrow_t{});