| /oneTBB/test/tbb/ |
| H A D | test_collaborative_call_once.cpp | 131 increment_functor f; variable 135 REQUIRE( f.ct == 1); 138 increment_functor f; variable 142 REQUIRE(f.ct == 1); 145 increment_functor f; variable 149 REQUIRE(f.ct == 1); 157 sum_functor f; variable 164 sum_functor f; variable 168 REQUIRE(f.sum == 0); 171 sum_functor f; variable [all …]
|
| H A D | test_composite_node.cpp | 49 my_input_body(int f, int s) : start(1), finish(f), step(s) {} in my_input_body() argument 181 tbb::flow::make_edge( j, f ); in adder_node() 186 base_type::add_nodes(j, f); in adder_node() 364 tbb::flow::make_edge( j, f ); in prefix_node() 365 tbb::flow::make_edge( f, s ); in prefix_node() 374 base_type::add_nodes(j,s,f); in prefix_node() 454 f_type f(g, 1, passthru_body()); in input_only_output_only_composite() local 460 std::tuple<f_type& > input_tuple(f); in input_only_output_only_composite() 469 a_in.add_nodes(f, seq, que); in input_only_output_only_composite() 472 a_in.add_visible_nodes(f, seq, que); in input_only_output_only_composite() [all …]
|
| H A D | test_continue_node.cpp | 118 inc_functor( const inc_functor &f ) { local_execute_count = size_t(f.local_execute_count); } in inc_functor() 119 void operator=(const inc_functor &f) { local_execute_count = size_t(f.local_execute_count); } in operator =() 394 tbb::flow::buffer_node<int>& f, std::size_t num, 401 tbb::flow::continue_node<Input>(tbb::flow::follows(f), body); 402 tbb::flow::continue_node<Input>(tbb::flow::follows(f), body, priority); 403 tbb::flow::continue_node<Input>(tbb::flow::follows(f), num, body); 404 tbb::flow::continue_node<Input>(tbb::flow::follows(f), num, body, priority);
|
| /oneTBB/include/oneapi/tbb/ |
| H A D | parallel_for.h | 313 parallel_for_body_wrapper<Function, Index> body(f, first, step); in parallel_for_impl() 321 void parallel_for(Index first, Index last, Index step, const Function& f) { in __TBB_requires() 328 parallel_for_impl<Index,Function,const simple_partitioner>(first, last, step, f, partitioner); in __TBB_requires() 334 parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, partitioner); in __TBB_requires() 346 parallel_for_impl(first, last, step, f, partitioner); in __TBB_requires() 352 void parallel_for(Index first, Index last, const Function& f) { in __TBB_requires() 377 parallel_for_impl(first, last, static_cast<Index>(1), f, partitioner); in __TBB_requires() 389 parallel_for_body_wrapper<Function, Index> body(f, first, step); in parallel_for_impl() 422 parallel_for_impl(first, last, step, f, partitioner, context); in __TBB_requires() 428 void parallel_for(Index first, Index last, const Function& f, task_group_context &context) { in __TBB_requires() [all …]
|
| H A D | task_arena.h | 51 task_arena_function(F& f) : my_func(f) {} in task_arena_function() argument 72 task_arena_function(F& f) : my_func(f) {} in task_arena_function() argument 202 R isolate_impl(F& f) { in isolate_impl() argument 226 enqueue_task(const F& f, small_object_allocator& alloc) : m_allocator(alloc), m_func(f) {} in enqueue_task() argument 248 R execute_impl(F& f) { in execute_impl() argument 386 void enqueue(F&& f) { in enqueue() argument 403 auto execute(F&& f) -> decltype(f()) { 404 return execute_impl<decltype(f())>(f); 445 inline auto isolate(F&& f) -> decltype(f()) { 446 return isolate_impl<decltype(f())>(f); [all …]
|
| H A D | task_group.h | 79 d1::task* task_ptr_or_nullptr(F&& f); 102 m_func(std::forward<FF>(f)) {} 115 std::forward<F>(f)(); in task_ptr_or_nullptr_impl() local 132 std::forward<F>(f)(); in task_ptr_or_nullptr() local 462 : m_func(f) in function_task() 467 : m_func(std::move(f)) in function_task() 490 function_stack_task(const F& f, wait_context& wo) : m_func(f), m_wait_ctx(wo) {} in function_stack_task() argument 531 task* prepare_task(F&& f) { in prepare_task() argument 602 void run(F&& f) { in run() argument 616 d2::task_handle defer(F&& f) { in defer() argument [all …]
|
| H A D | collaborative_call_once.h | 54 void isolated_execute(Fn f) { in alignas() 55 auto func = [f] { in alignas() 56 f(); in alignas() 97 void run_once(F&& f) { in alignas() 106 function_stack_task<F> t{ std::forward<F>(f), m_storage.m_wait_context }; in alignas() 142 friend void collaborative_call_once(collaborative_once_flag& flag, Fn&& f, Args&&... args); 156 void do_collaborative_call_once(Fn&& f) { in do_collaborative_call_once() argument 165 std::forward<Fn>(f)(); in do_collaborative_call_once()
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _template_helpers.h | 191 raii_guard( Func f ) noexcept : my_func(f), is_active(true) {} 212 raii_guard<Func> make_raii_guard( Func f ) { 213 return raii_guard<Func>(f); 295 return std::forward<F>(f)(std::forward<Preceding>(params)...); 299 return std::forward<F>(f)(std::forward<Preceding>(params)...); 324 static Ret call(F&& f, pack_type& pack, Preceding&&... params) { 326 std::forward<F>(f), static_cast<pack_remainder&>(pack), 332 static Ret call(F&& f, pack_type&& pack, Preceding&&... params) { 334 std::forward<F>(f), static_cast<pack_remainder&&>(pack), 342 void call(F&& f, Pack&& p) { [all …]
|
| H A D | _utils.h | 294 void run_initializer(const Functor& f, std::atomic<do_once_state>& state ) { in atomic_do_once() argument 295 f(); in atomic_do_once() 351 auto invoke(F&& f, Args&&... args) in atomic_do_once() 356 return std::invoke(std::forward<F>(f), std::forward<Args>(args)...); in atomic_do_once() 359 noexcept(noexcept(std::forward<F>(f)(std::forward<Args>(args)...))) in atomic_do_once() 360 -> decltype(std::forward<F>(f)(std::forward<Args>(args)...)) in atomic_do_once() 362 return std::forward<F>(f)(std::forward<Args>(args)...); in atomic_do_once() 379 delegated_function(FuncType& f) : my_func(f) {} in delegated_function() argument
|
| H A D | _flow_graph_node_impl.h | 114 void reset_function_input_base( reset_flags f) { in reset_function_input_base() argument 119 reset_receiver(f); in reset_function_input_base() 131 void reset_receiver( reset_flags f) { in reset_receiver() argument 433 void reset_function_input(reset_flags f) { in reset_function_input() argument 434 base_type::reset_function_input_base(f); in reset_function_input() 435 if(f & rf_reset_bodies) { in reset_function_input() 542 void reset(reset_flags f) { 543 base_type::reset_function_input_base(f); 545 if(f & rf_reset_bodies) { 640 continue_receiver::reset_receiver(f); [all …]
|
| /oneTBB/doc/main/tbb_userguide/snippets/ |
| H A D | flow_graph_examples.cpp | 36 function_node< int > f( g, unlimited, []( int ) { in flow_graph_attach_to_arena_1() local 39 f.try_put(1); in flow_graph_attach_to_arena_1() 50 function_node< int > f( g, unlimited, []( int ) { in flow_graph_attach_to_arena_2() local 62 f.try_put(1); in flow_graph_attach_to_arena_2()
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | always_use_wait_for_all.rst | 21 function_node< int, int > f( g, 1, []( int i ) -> int { 24 f.try_put(1); 27 // program will fail when f and g are destroyed at the 28 // end of the scope, since the body of f is not complete 32 In the function above, the graph g and its node f are destroyed at the 33 end of the function's scope. However, the task spawned to execute f's
|
| H A D | avoiding_data_races.rst | 18 node f: 39 function_node< int, int > f( g, unlimited, [&]( int i ) -> int { 45 make_edge( src, f ); 56 allowed concurrency in ``f`` from unlimited to 1, forcing each value to be 57 processed sequentially by ``f``. You may also note that the ``input_node`` also
|
| /oneTBB/examples/parallel_reduce/primes/ |
| H A D | primes.cpp | 112 Multiples(const Multiples& f, oneapi::tbb::split) in Multiples() argument 113 : n_factor(f.n_factor), in Multiples() 114 m(f.m), in Multiples() 117 my_factor(f.my_factor) {} in Multiples() 128 NumberType f = my_factor[k]; in initialize() local 129 NumberType p = (start - 1) / f * f % m; in initialize() 130 my_striker[k] = (p & 1 ? p + 2 * f : p + f) / 2; in initialize()
|
| /oneTBB/test/common/ |
| H A D | state_trackable.h | 148 bool is_state( const StateTrackable<allow_zero_initialized>& f ) { in is_state() argument 149 return f.state == desired_state; in is_state() 155 bool operator()( const StateTrackable<allow_zero_initialized>& f ) { in operator() 156 return !is_state<desired_state>(f); in operator() 169 bool operator()( const StateTrackable<allow_zero_initialized>& f ) { in operator() 170 return is_state<desired_state>(f); in operator()
|
| /oneTBB/doc/main/reference/ |
| H A D | task_group_extensions.rst | 42 task_handle defer(F&& f); 46 task_group_status run_and_wait(const F& f); 50 void run(F&& f); 61 .. cpp:function:: template<typename F> task_handle defer(F&& f) 68 .. cpp:function:: template<typename F> task_group_status run_and_wait(const F& f) 76 .. cpp:function:: template<typename F> void run(F&& f)
|
| /oneTBB/examples/task_arena/fractal/ |
| H A D | fractal.cpp | 119 fractal &f; member in fractal_body 124 f.render_rect(r.cols().begin(), r.rows().begin(), r.cols().end(), r.rows().end()); in operator ()() 127 fractal_body(fractal &_f) : f(_f) {} in fractal_body() 134 fractal f = *this; in render() local 135 fractal_body body(f); in render() 163 fractal &f = num ? f1 : f0; in calc_fractal() local 167 f.run(context[num]); in calc_fractal()
|
| /oneTBB/python/tbb/ |
| H A D | test.py | 71 def f(x): function 120 result = pool.apply_async(f, (10,)) # evaluate "f(10)" asynchronously 122 assert list(pool.map(f, range(10))) == list(map(f, range(10))) 123 it = pool.imap(f, range(10))
|
| /oneTBB/test/conformance/ |
| H A D | conformance_concurrent_queue.cpp | 112 T f; in TestFullQueue() local 119 T f; in TestFullQueue() local 147 f.set_serial(i); in TestClear() 148 queue.push(f); in TestClear() 158 queue.push( f); in TestClear() 168 queue.push(f); in TestClear() 243 queue.push(f); in TestIterator() 651 T f; in operator ()() local 669 serial[f.get_thread_id()] = f.get_serial(); in operator ()() 700 T f; in TestPushPop() local [all …]
|
| H A D | conformance_parallel_for.cpp | 134 void operator()( const T& first, const T& last, const Body& f, empty_partitioner_tag& ) { in operator ()() 135 oneapi::tbb::parallel_for( first, last, f ); in operator ()() 137 …void operator()( const T& first, const T& last, const T& step, const Body& f, empty_partitioner_ta… in operator ()() 138 oneapi::tbb::parallel_for( first, last, step, f ); in operator ()() 144 void operator()( const T& first, const T& last, const Body& f, Partitioner& p ) { in operator ()() 145 oneapi::tbb::parallel_for( first, last, f, p ); in operator ()() 147 void operator()( const T& first, const T& last, const T& step, const Body& f, Partitioner& p ) { in operator ()() 148 oneapi::tbb::parallel_for( first, last, step, f, p ); in operator ()() 158 FooBody<Pad> f( Array ); in Flog() local 159 const FooBody<Pad> fc = f; in Flog()
|
| /oneTBB/doc/main/tbb_userguide/design_patterns/ |
| H A D | Non-Preemptive_Priorities.rst | 77 void EnqueueWork( Priority p, Func f ) { 78 WorkItem* item = new ConcreteWorkItem<Func>( p, f ); 83 The caller provides a priority ``p`` and a functor ``f`` to routine ``EnqueueWork``. 84 …The functor may be the result of a lambda expression. ``EnqueueWork`` packages ``f`` as a ``WorkIt… 106 Func f; 108 f(); 113 WorkItem(p), f(f_)
|
| /oneTBB/examples/migration/recursive_fibonacci/ |
| H A D | task_emulation_layer.h | 210 void run_task(F&& f) { in run_task() argument 211 tg_pool[tbb::this_task_arena::current_thread_index()].run(std::forward<F>(f)); in run_task() 215 void run_task(F* f) { in run_task() argument 216 tg_pool[tbb::this_task_arena::current_thread_index()].run(std::ref(*f)); in run_task() 220 void run_and_wait(tbb::task_group& tg, F* f) { in run_and_wait() argument 221 tg.run_and_wait(std::ref(*f)); in run_and_wait()
|
| /oneTBB/examples/parallel_for/tachyon/src/ |
| H A D | texture.cpp | 370 flt f; in gnoise_texture() local 372 f = Noise((hit->x - tex->ctr.x), (hit->y - tex->ctr.y), (hit->z - tex->ctr.z)); in gnoise_texture() 374 if (f < 0.01) in gnoise_texture() 375 f = 0.01; in gnoise_texture() 376 if (f > 1.0) in gnoise_texture() 377 f = 1.0; in gnoise_texture() 379 col.r = tex->col.r * f; in gnoise_texture() 380 col.g = tex->col.g * f; in gnoise_texture() 381 col.b = tex->col.b * f; in gnoise_texture()
|
| H A D | quadric.cpp | 97 (2.0 * q->mat.f * rd.y * rd.z) + (q->mat.h * (rd.z * rd.z)); in quadric_intersect() 101 (q->mat.e * ro.y * rd.y) + (q->mat.f * ((ro.y * rd.z) + (rd.y * ro.z))) + in quadric_intersect() 106 (2.0 * q->mat.f * ro.y * ro.z) + (2.0 * q->mat.g * ro.y) + (q->mat.h * (ro.z * ro.z)) + in quadric_intersect() 130 q->mat.f * (pnt->z - q->ctr.z) + q->mat.g); in quadric_normal() 132 N->z = (q->mat.c * (pnt->x - q->ctr.x) + q->mat.f * (pnt->y - q->ctr.y) + in quadric_normal()
|
| /oneTBB/src/tbbmalloc/ |
| H A D | shared_utils.h | 113 if (FILE *f = fopen(file, "r")) { 114 while (numFound < N && fgets(buf, BUF_LINE_SIZE, f)) { 122 fclose(f);
|