| /oneTBB/test/tbb/ |
| H A D | test_parallel_invoke.cpp | 65 tbb::parallel_invoke(body, body); in test_from_2_to_10_arguments() 66 tbb::parallel_invoke(body, body, body); in test_from_2_to_10_arguments() 67 tbb::parallel_invoke(body, body, body, body); in test_from_2_to_10_arguments() 68 tbb::parallel_invoke(body, body, body, body, body); in test_from_2_to_10_arguments() 69 tbb::parallel_invoke(body, body, body, body, body, body); in test_from_2_to_10_arguments() 70 tbb::parallel_invoke(body, body, body, body, body, body, body); in test_from_2_to_10_arguments() 71 tbb::parallel_invoke(body, body, body, body, body, body, body, body); in test_from_2_to_10_arguments() 72 tbb::parallel_invoke(body, body, body, body, body, body, body, body, body); in test_from_2_to_10_arguments() 73 tbb::parallel_invoke(body, body, body, body, body, body, body, body, body, body); in test_from_2_to_10_arguments() 83 auto body = [&]{ lambda_counter++; }; in __anon420e3b420102() variable [all …]
|
| H A D | test_parallel_for_each.cpp | 214 concept can_call_parallel_for_each_with_iterator = requires( Iterator it, const Body& body, tbb::ta… 215 tbb::parallel_for_each(it, it, body); 216 tbb::parallel_for_each(it, it, body, ctx); 222 … const Body& body, tbb::task_group_context ctx ) { 223 tbb::parallel_for_each(cbs, body); 224 tbb::parallel_for_each(cbs, body, ctx); 225 tbb::parallel_for_each(const_cbs, body); 226 tbb::parallel_for_each(const_cbs, body, ctx);
|
| H A D | test_continue_node.cpp | 99 void continue_nodes( Body body ) { in continue_nodes() argument 102 tbb::flow::continue_node< OutputType > exe_node( g, body ); in continue_nodes() 393 concept can_call_continue_node_ctor = requires( tbb::flow::graph& graph, Body body, 396 tbb::flow::continue_node<Input>(graph, body); 397 tbb::flow::continue_node<Input>(graph, body, priority); 398 tbb::flow::continue_node<Input>(graph, num, body); 399 tbb::flow::continue_node<Input>(graph, num, body, priority); 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); [all …]
|
| H A D | test_collaborative_call_once.cpp | 76 void call_once_in_for_loop(std::size_t N, Fn&& body, Args&&... args) { in call_once_in_for_loop() argument 79 tbb::collaborative_call_once(flag, std::forward<Fn>(body), std::forward<Args>(args)...); in call_once_in_for_loop() 84 void call_once_in_parallel_for(std::size_t N, Fn&& body, Args&&... args) { in call_once_in_parallel_for() argument 88 auto func = [&] { tbb::detail::d0::call(std::forward<Fn>(body), std::move(stored_pack)); }; in call_once_in_parallel_for() 96 tbb::collaborative_call_once(flag, std::forward<Fn>(body), std::forward<Args>(args)...); in call_once_in_parallel_for() 103 void call_once_threads(std::size_t N, Fn&& body, Args&&... args) { in call_once_threads() argument 109 auto func = [&] { tbb::detail::d0::call(std::forward<Fn>(body), std::move(stored_pack)); }; in call_once_threads() 118 tbb::collaborative_call_once(flag, std::forward<Fn>(body), std::forward<Args>(args)...); in call_once_threads()
|
| /oneTBB/include/oneapi/tbb/ |
| H A D | parallel_reduce.h | 107 my_body(&body), in start_reduce() 268 my_body(body), in start_deterministic_reduce() 277 my_body(body), in start_deterministic_reduce() 517 return body.result(); in __TBB_requires() 530 return body.result(); in __TBB_requires() 543 return body.result(); in __TBB_requires() 556 return body.result(); in __TBB_requires() 569 return body.result(); in __TBB_requires() 582 return body.result(); in __TBB_requires() 595 return body.result(); in __TBB_requires() [all …]
|
| H A D | parallel_scan.h | 156 void reverse_join( Body& body ) { in reverse_join() 157 m_body.reverse_join(body); in reverse_join() 159 void assign_to( Body& body ) { in assign_to() 160 body.assign(m_body); in assign_to() 231 return &body; in create_child() 243 this->m_body = &body; in prepare_for_execution() 413 m_body(body), in start_scan() 435 temp_body.reverse_join(body); in run() 592 return body.result(); in __TBB_requires() 604 return body.result(); in __TBB_requires() [all …]
|
| H A D | parallel_for_each.h | 83 static auto call(const Body& body, ItemArg&& item, FeederArg*) 91 tbb::detail::invoke(body, std::forward<ItemArg>(item)); 99 static auto call(const Body& body, ItemArg&& item, FeederArg* feeder) 108 tbb::detail::invoke(body, std::forward<ItemArg>(item), *feeder); 197 : my_body(body), in feeder_impl() 391 : my_first(first), my_body(body), my_feeder_ptr(feeder_ptr) {} 468 : my_feeder(body, w_context, context) {} 668 void parallel_for_each(Range& rng, const Body& body) { 669 parallel_for_each(std::begin(rng), std::end(rng), body); 674 void parallel_for_each(const Range& rng, const Body& body) { [all …]
|
| H A D | parallel_for.h | 76 my_body(body), in start_for() 101 run(range, body, partitioner, context); in run() 228 void parallel_for( const Range& range, const Body& body ) { in __TBB_requires() 237 start_for<Range,Body,const simple_partitioner>::run(range,body,partitioner); in __TBB_requires() 245 start_for<Range,Body,const auto_partitioner>::run(range,body,partitioner); in __TBB_requires() 253 start_for<Range,Body,const static_partitioner>::run(range,body,partitioner); in __TBB_requires() 261 start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner); in __TBB_requires() 313 parallel_for_body_wrapper<Function, Index> body(f, first, step); in parallel_for_impl() 314 parallel_for(range, body, partitioner); in parallel_for_impl() 389 parallel_for_body_wrapper<Function, Index> body(f, first, step); in parallel_for_impl() [all …]
|
| H A D | parallel_pipeline.h | 71 filter( filter_mode mode, const Body& body ) : in filter() argument 73 … filter_node_leaf<InputType, OutputType, Body>(static_cast<unsigned int>(mode), body) ) { in filter() 90 filter<InputType, OutputType> make_filter( filter_mode mode, const Body& body ) { in make_filter() argument 92 … filter_node_leaf<InputType, OutputType, Body>(static_cast<unsigned int>(mode), body) ); in make_filter() 98 filter<filter_input<Body>, filter_output<Body>> make_filter( filter_mode mode, const Body& body ) { in make_filter() argument 99 return make_filter<filter_input<Body>, filter_output<Body>>(mode, body); in make_filter()
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _flow_graph_body_impl.h | 95 Body body; 118 B body; 127 body(i); 135 B body; 144 body(i); 152 B body; 161 return body(i); 168 B body; 195 B body; 226 B body; [all …]
|
| H A D | _flow_graph_trace_impl.h | 190 static inline void fgt_body( void *node, void *body ) { 191 … itt_relation_add( ITT_DOMAIN_FLOW, body, FLOW_BODY, __itt_relation_is_child_of, node, FLOW_NODE ); 202 …oid* codeptr, string_resource_index t, void *g, void *input_port, PortsTuple &ports, void *body ) { 206 fgt_body( input_port, body ); 231 …_node_with_body( void* codeptr, string_resource_index t, void *g, void *output_port, void *body ) { 234 fgt_body( output_port, body ); 242 …oid* codeptr, string_resource_index t, void *g, void *input_port, void *output_port, void *body ) { 243 fgt_node_with_body( codeptr, t, g, output_port, body ); 265 static inline void fgt_begin_body( void *body ) { 266 itt_task_begin( ITT_DOMAIN_FLOW, body, FLOW_BODY, nullptr, FLOW_NULL, FLOW_BODY );
|
| /oneTBB/test/conformance/ |
| H A D | conformance_parallel_reduce.cpp | 112 test_partitioner_utils::SimpleReduceBody body; variable 116 parallel_reduce(Range6(false, true), body, ap); 119 parallel_reduce(Range6(false, true), body, oneapi::tbb::static_partitioner()); 122 parallel_reduce(Range6(false, true), body, oneapi::tbb::simple_partitioner()); 125 parallel_reduce(Range6(false, true), body, oneapi::tbb::auto_partitioner()); 128 parallel_deterministic_reduce(Range6(false, true), body, oneapi::tbb::static_partitioner()); 131 parallel_deterministic_reduce(Range6(false, true), body, oneapi::tbb::simple_partitioner()); 138 void test_preduce_invoke_basic(const Body& body, const Reduction& reduction) { in test_preduce_invoke_basic() argument 145 CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction).get()); in test_preduce_invoke_basic() 150 CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, aff).get()); in test_preduce_invoke_basic() [all …]
|
| H A D | conformance_continue_node.cpp | 33 void test_deduction_guides_common(Body body) { in test_deduction_guides_common() argument 37 continue_node c1(g, body); in test_deduction_guides_common() 40 continue_node c2(g, body, lightweight()); in test_deduction_guides_common() 43 continue_node c3(g, 5, body); in test_deduction_guides_common() 46 continue_node c4(g, 5, body, lightweight()); in test_deduction_guides_common() 49 continue_node c5(g, body, node_priority_t(5)); in test_deduction_guides_common() 55 continue_node c7(g, 5, body, node_priority_t(5)); in test_deduction_guides_common() 64 continue_node c9(follows(b), body); in test_deduction_guides_common() 67 continue_node c10(follows(b), body, lightweight()); in test_deduction_guides_common() 70 continue_node c11(follows(b), 5, body); in test_deduction_guides_common() [all …]
|
| H A D | conformance_function_node.cpp | 38 void test_deduction_guides_common(Body body) { in test_deduction_guides_common() argument 42 function_node f1(g, unlimited, body); in test_deduction_guides_common() 45 function_node f2(g, unlimited, body, rejecting()); in test_deduction_guides_common() 48 function_node f3(g, unlimited, body, node_priority_t(5)); in test_deduction_guides_common() 51 function_node f4(g, unlimited, body, rejecting(), node_priority_t(5)); in test_deduction_guides_common() 55 function_node f5(follows(f2), unlimited, body); in test_deduction_guides_common() 58 function_node f6(follows(f5), unlimited, body, rejecting()); in test_deduction_guides_common() 61 function_node f7(follows(f6), unlimited, body, node_priority_t(5)); in test_deduction_guides_common() 64 function_node f8(follows(f7), unlimited, body, rejecting(), node_priority_t(5)); in test_deduction_guides_common()
|
| /oneTBB/test/common/ |
| H A D | parallel_reduce_common.h | 33 void reduce_invoker(const Range& range, Body& body, Partitioner& partiotioner) { in reduce_invoker() argument 34 tbb::parallel_reduce( range, body, partiotioner ); in reduce_invoker() 38 void reduce_invoker(const Range& range, Body& body, utils_default_partitioner&) { in reduce_invoker() argument 39 tbb::parallel_reduce( range, body ); in reduce_invoker() 53 void deterministic_reduce_invoker(const Range& range, Body& body, const Partitioner& partiotioner) { in deterministic_reduce_invoker() argument 54 tbb::parallel_deterministic_reduce( range, body, partiotioner ); in deterministic_reduce_invoker() 58 void deterministic_reduce_invoker(const Range& range, Body& body, const utils_default_partitioner&)… in deterministic_reduce_invoker() argument 59 tbb::parallel_deterministic_reduce( range, body ); in deterministic_reduce_invoker()
|
| H A D | parallel_for_each_common.h | 170 Body body; in TestBodyMove() local 175 tbb::parallel_for_each(mbegin, mend, body); in TestBodyMove() 183 Body body; in TestBody() local 187 tbb::parallel_for_each(begin, end, body); in TestBody() 214 void TestGenericLambda(size_t depth, GenericBody body) { in TestGenericLambda() argument 221 tbb::parallel_for_each(begin, end, body); in TestGenericLambda() 226 void TestGenericLambdaMove(size_t depth, GenericBody body) { in TestGenericLambdaMove() argument 236 tbb::parallel_for_each(mbegin, mend, body); in TestGenericLambdaMove() 242 TestGenericLambda<Iterator>(depth, body); in TestGenericLambdaWithMove() 243 TestGenericLambdaMove<Iterator>(depth, body); in TestGenericLambdaWithMove() [all …]
|
| /oneTBB/doc/main/reference/ |
| H A D | constructors_for_nodes.rst | 37 continue_node(follows(...), Body body, Policy = Policy()); 38 continue_node(precedes(...), Body body, Policy = Policy()); 40 continue_node(follows(...), int number_of_predecessors, Body body, Policy = Policy()); 41 continue_node(precedes(...), int number_of_predecessors, Body body, Policy = Policy()); 48 input_node(precedes(...), body); 51 multifunction_node(follows(...), std::size_t concurrency, Body body); 52 multifunction_node(precedes(...), std::size_t concurrency, Body body); 55 async_node(follows(...), std::size_t concurrency, Body body); 56 async_node(precedes(...), std::size_t concurrency, Body body);
|
| H A D | parallel_for_each_semantics.rst | 22 … void parallel_for_each( InputIterator first, InputIterator last, Body body ); // overload (1) 24 …void parallel_for_each( InputIterator first, InputIterator last, Body body, task_group_context& gr… 27 void parallel_for_each( Container& c, Body body ); // overload (3) 29 … void parallel_for_each( Container& c, Body body, task_group_context& group ); // overload (4) 32 void parallel_for_each( const Container& c, Body body ); // overload (5) 34 …void parallel_for_each( const Container& c, Body body, task_group_context& group ); // overload (6) 52 of the ``body`` with an object of type ``const value_type&`` or ``value_type&&`` to be well-formed.… 59 …rators] ISO C++ Standard section, ``tbb::parallel_for_each`` requires the execution of the ``body``
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | parallel_for_os.rst | 24 step in parallelizing this loop is to convert the loop body into a form 26 called the *body* object, in which ``operator()`` processes a chunk. The 27 following code declares the body object. 65 inside it. Usually, the constructor for the body object will initialize 66 these fields, though ``parallel_for`` does not care how the body object 67 is created. Template function ``parallel_for`` requires that the body 76 Because the body object might be copied, its ``operator()`` should not 77 modify the body. Otherwise the modification might or might not become 80 reminder of this nuance, ``parallel_for`` requires that the body 89 - **Style**. It makes the loop body look more like the original. [all …]
|
| H A D | Constraints.rst | 16 // Call for body(oneapi::tbb::blocked_range) is ill-formed 18 auto body = [](const int& r) { /*...*/ }; 19 oneapi::tbb::parallel_for(oneapi::tbb::blocked_range{1, 10}, body); 24 // note: the required expression 'body(range)' is invalid 25 body(range);
|
| H A D | catching_exceptions.rst | 7 If you catch an exception within the node's body, execution continues 9 caught before it propagates beyond the node's body, the execution of all 41 that is not caught within the body. This will cause the execution of the 45 within the body: 62 If the exception is caught and handled in the body, then there is no
|
| H A D | std_invoke.rst | 7 Previously, the body of the algorithm or Flow Graph node needed to be a Function Object (see `C++ S… 10 Now the body needs to meet the more relaxed requirements of being Callable (see `C++ Standard Calla… 13 * **Pointers to member functions** that you can use as the body of the algorithm or the Flow Graph … 14 * **Pointers to member objects** work as the body of the algorithm or parallel construct 81 // Define a lambda function as the body of the parallel_for loop 94 Now with C++17, you can directly utilize a pointer to ``range.iterate()`` as the body of the algori… 117 …ard function ``std::invoke(&StrideRange::iterate, range)`` to execute the body. It is the equivale… 165 Before C++17, the ``function_node`` in the Flow Graph required the body to be a Function Object. A … 167 With C++17, you can use ``std::invoke`` with a pointer to the member number directly as the body. 186 // Use a member function pointer to the number member of the Object struct as the body [all …]
|
| H A D | Nodes.rst | 27 template< typename Body> function_node(graph &g, size_t concurrency, Body body) 39 - Type of the body object. 44 * - body 53 invocation of the node to occur concurrently. The body is a lambda 97 3, the node n will spawn a task to apply the body to the first input, 1. 99 body to 2. And likewise, the node will wait for that task to complete 100 before spawning a third task to apply the body to 3. The calls to 148 available on your system, then all three invocations of the body will
|
| H A D | Predefined_Node_Types.rst | 26 …When activated, it executes a user body to generate its output. Its body is invoked if downstream … 27 … output is temporarily buffered until it is accepted downstream and then the body is again invoked. 29 …ut to all successors. Has generic input and output types. Executes a user body, and has controllab… 31 … of type continue_msg and has a generic output type. It executes a user body when it receives N … 33 …eric output types. It executes a user body, and has controllable concurrency level and buffering… 51 … This node receives messages of generic type, invokes the user-provided body to submit a messa…
|
| /oneTBB/examples/parallel_reduce/pi/ |
| H A D | pi.cpp | 39 reduce_body body; in compute_pi_parallel() local 40 tbb::parallel_reduce(tbb::blocked_range<number_t>(0, num_intervals), body); in compute_pi_parallel() 42 ret = body.my_pi * step; in compute_pi_parallel()
|