Home
last modified time | relevance | path

Searched refs:range (Results 1 – 25 of 77) sorted by relevance

1234

/oneTBB/test/common/
H A Dparallel_reduce_common.h33 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()
44 return tbb::parallel_reduce( range, ResultType(), func, reduction, partiotioner ); in reduce_invoker()
49 return tbb::parallel_reduce( range, ResultType(), func, reduction ); in reduce_invoker()
54 tbb::parallel_deterministic_reduce( range, body, partiotioner ); in deterministic_reduce_invoker()
59 tbb::parallel_deterministic_reduce( range, body ); in deterministic_reduce_invoker()
63 ResultType deterministic_reduce_invoker(const Range& range, const Func& func, in deterministic_reduce_invoker() argument
69 ResultType deterministic_reduce_invoker(const Range& range, const Func& func, in deterministic_reduce_invoker() argument
[all …]
H A Dconcurrent_associative_common.h124 for(typename MultiMap::iterator it = range.first; it != range.second; ++it) {
325 for (Iterator i = range.begin(); i != range.end(); ++i) {
330 if (range.is_divisible()) {
431 Range r = cont.range();
506 it = range.first;
599 it = range.first;
609 range = newcont.equal_range(2); it = range.first;
622 it = range.first;
626 it = range.first;
644 REQUIRE(!cont.range().empty());
[all …]
/oneTBB/include/oneapi/tbb/
H A Dparallel_reduce.h39 body(range); in requires()
106 my_range(range), in start_reduce()
138 if ( !range.empty() ) { in run()
150 run(range, body, partitioner, context); in run()
267 my_range(range), in start_deterministic_reduce()
282 if ( !range.empty() ) { in run()
296 run(range, body, partitioner, context); in run()
392 void operator()(Range& range) { in operator()
718 ::run(range, body, partitioner); in __TBB_requires()
741 ::run(range, body, partitioner, context); in __TBB_requires()
[all …]
H A Dparallel_sort.h66 std::size_t offset = range.size / 8u; in pseudo_median_of_nine()
75 RandomAccessIterator array = range.begin; in split_range()
81 std::size_t j = range.size; in split_range()
105 std::size_t new_range_size = range.size - i; in split_range()
106 range.size = j; in split_range()
126 quick_sort_range( quick_sort_range& range, split ) in quick_sort_range() argument
127 : comp(range.comp) in quick_sort_range()
128 , size(split_range(range)) in quick_sort_range()
131 , begin(range.begin + range.size + 1) {} in quick_sort_range()
149 RandomAccessIterator my_end = range.end(); in operator()
[all …]
H A Dparallel_scan.h115 new( m_range.begin() ) Range(range); in finish_construction()
194 m_range(range), in sum_node()
230 body.finish_construction(this, range, stuff_last); in create_child()
271 template<typename range,typename body,typename partitioner>
274 template<typename range,typename body>
412 m_range(range), in start_scan()
426 if( !range.empty() ) { in run()
564 void parallel_scan( const Range& range, Body& body ) { in __TBB_requires()
591 parallel_scan(range, body, __TBB_DEFAULT_PARTITIONER()); in __TBB_requires()
603 parallel_scan(range, body, partitioner); in __TBB_requires()
[all …]
H A Dparallel_for.h75 my_range(range), in start_for()
101 run(range, body, partitioner, context); in run()
105 if ( !range.empty() ) { 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()
261 start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner); in __TBB_requires()
312 blocked_range<Index> range(static_cast<Index>(0), end); in parallel_for_impl()
314 parallel_for(range, body, partitioner); in parallel_for_impl()
388 blocked_range<Index> range(static_cast<Index>(0), end); in parallel_for_impl()
[all …]
H A Dpartitioner.h269 start.run_body( range ); // static partitioner goes here in work_balance()
273 void execute(StartType &start, Range &range, execution_data& ed) { in execute()
281 if ( range.is_divisible() ) { in execute()
286 } while ( range.is_divisible() && self().is_divisible() ); in execute()
289 self().work_balance(start, range, ed); in execute()
434 if( !range.is_divisible() || !self().max_depth() ) { in work_balance()
435 start.run_body( range ); in work_balance()
438 range_vector<Range, range_pool_size> range_pool(range); in work_balance()
509 void execute(StartType &start, Range &range, execution_data& ed) { in execute() argument
511 while( range.is_divisible() ) in execute()
[all …]
/oneTBB/test/conformance/
H A Dconformance_parallel_reduce.cpp62 const oneapi::tbb::blocked_range<int> range(0, N); in TestDeterministicReductionFor() local
67 deterministic_reduce_invoker(range, benchmark_body, Partitioner()); in TestDeterministicReductionFor()
70 deterministic_reduce_invoker(range, measurement_body, Partitioner()); in TestDeterministicReductionFor()
74 Type lambda_measurement_result = deterministic_reduce_invoker<Type>( range, in TestDeterministicReductionFor()
142 test_invoke::SmartRange<test_invoke::SmartValue> range(0, iterations); in test_preduce_invoke_basic() local
145 CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction).get()); in test_preduce_invoke_basic()
146 …CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, oneapi::tbb::simple… in test_preduce_invoke_basic()
147 …CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, oneapi::tbb::auto_p… in test_preduce_invoke_basic()
150 CHECK(result == oneapi::tbb::parallel_reduce(range, identity, body, reduction, aff).get()); in test_preduce_invoke_basic()
152 …CHECK(result == oneapi::tbb::parallel_deterministic_reduce(range, identity, body, reduction).get()… in test_preduce_invoke_basic()
[all …]
H A Dconformance_blocked_rangeNd.cpp77 auto begin = data.begin() + range.dim(N - 1).begin(); in increment_data()
79 auto end = begin + range.dim(N - 1).size(); in increment_data()
87 auto begin = data.begin() + range.dim(N - 1).begin(); in check_data()
89 auto end = begin + range.dim(N - 1).size(); in check_data()
109 static bool is_empty(const range_t& range) { in is_empty()
110 if (range.dim(N - 1).empty()) { return true; } in is_empty()
111 return range_utils<range_t, N - 1>::is_empty(range); in is_empty()
114 static bool is_divisible(const range_t& range) { in is_divisible()
115 if (range.dim(N - 1).is_divisible()) { return true; } in is_divisible()
116 return range_utils<range_t, N - 1>::is_divisible(range); in is_divisible()
[all …]
H A Dconformance_parallel_scan.cpp162 test_invoke::SmartRange<test_invoke::SmartValue> range(0, iterations, change_vector); variable
168 test_pscan_invoke(desired_vector, change_vector, range, identity, scan, combine);
169 …test_pscan_invoke(desired_vector, change_vector, range, identity, scan, combine, oneapi::tbb::auto…
170 …test_pscan_invoke(desired_vector, change_vector, range, identity, scan, combine, oneapi::tbb::simp…
H A Dconformance_mutex.h338 void operator()(oneapi::tbb::blocked_range<std::size_t>& range) const { in operator()
340 recurse_till(range.begin(), range.end()); in operator()
351 void operator()(oneapi::tbb::blocked_range<std::size_t>& range) const { in operator()
353 for(std::size_t i = range.begin(); i != range.end(); ++i) { in operator()
/oneTBB/python/tbb/
H A Dtest.py122 assert list(pool.map(f, range(10))) == list(map(f, range(10)))
123 it = pool.imap(f, range(10))
138 assert list(pool.imap(work, range(10, 3, -1), chunksize=4)) == list(map(
139 str, range(10, 3, -1)))
142 assert sorted(pool.imap_unordered(work, range(10, 3, -1))) == sorted(map(
143 str, range(10, 3, -1)))
147 result = pool.map_async(timeout_work, range(10), callback=cb)
153 result = pool.imap_async(timeout_work, range(3, 10), callback=cb)
163 result = pool.imap_unordered_async(timeout_work, range(10, 3, -1), callback=cb)
182 result = pool.imap_unordered_async(work, range(2, -10, -1), callback=cb)
[all …]
/oneTBB/examples/parallel_reduce/convex_hull/
H A Dconvex_hull_sample.cpp53 void operator()(const range_t &range) const { in operator ()()
54 util::rng the_rng(range.begin()); in operator ()()
55 const std::size_t i_end = range.end(); in operator ()()
59 for (std::size_t i = range.begin(); i != i_end; ++i) { in operator ()()
67 points.grow_to_at_least(range.end()); in operator ()()
110 void operator()(const range_t &range) { in operator ()() argument
111 const std::size_t i_end = range.end(); in operator ()()
112 if (!range.empty()) { in operator ()()
177 void operator()(const range_t &range) { in operator ()() argument
178 const std::size_t i_end = range.end(); in operator ()()
[all …]
H A Dconvex_hull_bench.cpp243 util::rng the_rng(range.begin()); in operator ()()
244 const std::size_t i_end = range.end(); in operator ()()
270 util::rng the_rng(range.begin()); in operator ()()
271 const std::size_t i_end = range.end(); in operator ()()
330 void operator()(const range_t &range) { in operator ()() argument
331 const std::size_t i_end = range.end(); in operator ()()
332 if (!range.empty()) { in operator ()()
400 void operator()(const range_t &range) { in operator ()() argument
401 const std::size_t i_end = range.end(); in operator ()()
465 void operator()(const range_t &range) { in operator ()() argument
[all …]
/oneTBB/doc/main/tbb_userguide/
H A Dstd_invoke.rst39 // Indicate if the range is empty
44 // Indicate if the range can be divided
51 // Performed an action for each element of the range,
67 ``range.iterate()``
79 StrideRange range(array_to_iterate, array_size, /* stride = */ 2);
82 auto pfor_body = [] (const StrideRange& range) {
83 range.iterate();
87 oneapi::tbb::parallel_for(range, pfor_body);
106 // Parallelize the iteration over the range object
107 oneapi::tbb::parallel_for(range, &StrideRange::iterate);
[all …]
H A DAdvanced_Topic_Other_Kinds_of_Iteration_Spaces.rst20 // True if range is empty
22 // True if range can be split into non-empty subranges
34 The method ``empty`` should return true if the range is empty. The
35 method ``is_divisible`` should return true if the range can be split
69 ``oneapi/tbb/blocked_range2d.h`` for an example of a range that is
70 two-dimensional. Its splitting constructor attempts to split the range
H A Dconcurrent_hash_map.rst54 void operator()( const blocked_range<string*> range ) const {
55 for( string* p=range.begin(); p!=range.end(); ++p ) {
117 for( string* p=range.begin(); p!=range.end(); ++p ) {
/oneTBB/test/tbb/
H A Dtest_parallel_scan.cpp222 return tbb::parallel_scan(range, idx, scan, reverse_join); in ParallelScanFunctionalInvoker()
225 return tbb::parallel_scan(range, idx, scan, reverse_join, tbb::simple_partitioner()); in ParallelScanFunctionalInvoker()
228 return tbb::parallel_scan(range, idx, scan, reverse_join, tbb::auto_partitioner()); in ParallelScanFunctionalInvoker()
263 Storage<T> res = ParallelScanFunctionalInvoker(range, Storage<T>(0), sb, jb, mode); in operator ()()
265 if (range.empty()) in operator ()()
278 Storage<T> res = ParallelScanFunctionalInvoker(range, Storage<T>(0), in operator ()()
287 if (range.empty()) in operator ()()
381 Storage<T> res = ParallelScanFunctionalInvoker(range, Storage<T>(0), in operator ()()
390 if (range.empty()) in operator ()()
413 using CorrectRange = test_concepts::range::Correct;
[all …]
H A Dtest_eh_algorithms.cpp841 auto range = adaptive_range<Iterator>(get_iter_range_size()); in Test1_parallel_for_each() local
843 tbb::parallel_for_each(std::begin(range), std::end(range), simple_body() ); in Test1_parallel_for_each()
859 tbb::parallel_for_each(std::begin(range), std::end(range), SimpleParForEachBody()); in operator ()()
880 auto range = adaptive_range<Iterator>(get_iter_range_size()); in Test2_parallel_for_each() local
882 tbb::parallel_for_each(std::begin(range), std::end(range), outer_body() ); in Test2_parallel_for_each()
898 tbb::parallel_for_each(std::begin(range), std::end(range), SimpleParForEachBody(), ctx); in operator ()()
926 tbb::parallel_for_each(std::begin(range), std::end(range), outer_body()); in Test3_parallel_for_each()
949 tbb::parallel_for_each(std::begin(range), std::end(range), SimpleParForEachBody(), ctx); in operator ()()
976 tbb::parallel_for_each(std::begin(range), std::end(range), outer_body_with_eh()); in Test4_parallel_for_each()
1024 …tbb::parallel_for_each(std::begin(range), std::end(range), ParForEachBodyWithThrowingFeederTasks()… in Test5_parallel_for_each()
[all …]
H A Dtest_openmp.cpp68 void operator()( const tbb::blocked_range<int>& range ) { in operator ()() argument
69 for (int j = range.begin(); j != range.end(); ++j) in operator ()()
112 void operator()( const tbb::blocked_range<int>& range ) const { in operator ()()
113 for (int i = range.begin(); i != range.end(); ++i) { in operator ()()
H A Dtest_parallel_sort.cpp156 ContainerType range(Size); in run() local
159 while (fill_ranges(std::begin(range), std::begin(sorted_range), Size, default_comp)) { in run()
160 tbb::parallel_sort(range); in run()
161 validate(range, sorted_range); in run()
167 ContainerType range(Size); in run() local
170 while (fill_ranges(std::begin(range), std::begin(sorted_range), Size, comp)) { in run()
171 tbb::parallel_sort(range, comp); in run()
172 validate(range, sorted_range); in run()
H A Dtest_parallel_for.cpp135 RangeType range( 0, utils::get_platform_max_threads(), nullptr, false, ensure_non_emptiness ); in test() local
137 tbb::parallel_for( range, SimpleBody(), ap ); in test()
149 RangeType range(0, thread_num, nullptr, feedback, ensure_non_emptiness); in test() local
152 tbb::parallel_for( range, sync_body, ap ); in test()
153 tbb::parallel_for( range, sync_body, tbb::static_partitioner() ); in test()
337 using namespace test_concepts::range; in test_pfor_range_constraints()
353 using CorrectRange = test_concepts::range::Correct; in test_pfor_body_constraints()
H A Dtest_mutex.cpp81 void operator()(tbb::blocked_range<size_t>& range) const { in operator ()()
82 for (std::size_t i = range.begin(); i != range.end(); ++i) { in operator ()()
/oneTBB/examples/common/utility/
H A Dutility.hpp483 friend std::istream& operator>>(std::istream& i, thread_number_range& range) { in operator >>() argument
494 string_to_number_of_threads string_to_number_of_threads(range.auto_number_of_threads()); in operator >>()
508 internal::string_to(std::string(s, second_colon + 1), range.step); in operator >>()
511 range = thread_number_range(range.auto_number_of_threads, low, high, range.step); in operator >>()
519 friend std::ostream& operator<<(std::ostream& o, thread_number_range const& range) { in operator <<() argument
523 step_function_descriptors[i].function != range.step.step_function; in operator <<()
529 o << range.first << ":" << range.last << ":" << step_function_descriptors[i].mnemonic in operator <<()
530 << range.step.step_function_argument; in operator <<()
/oneTBB/include/oneapi/tbb/detail/
H A D_range_common.h100 requires( const std::remove_reference_t<Range>& range ) {
101 { range.empty() } -> relaxed_convertible_to<bool>;
102 { range.is_divisible() } -> relaxed_convertible_to<bool>;

1234