| /oneTBB/include/oneapi/tbb/ |
| H A D | parallel_for.h | 309 else if (first < last) { in parallel_for_impl() 311 Index end = Index(last - first - 1ul) / step + Index(1); in parallel_for_impl() 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() 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() 385 else if (first < last) { in parallel_for_impl() 387 Index end = (last - first - Index(1)) / step + Index(1); in parallel_for_impl() 389 parallel_for_body_wrapper<Function, Index> body(f, first, step); in parallel_for_impl() [all …]
|
| H A D | parallel_for_each.h | 328 forward_block_handling_task(Iterator first, std::size_t size, 337 new (task_it++) iteration_task(first, body, feeder_ptr, my_wait_context); 338 ++first; 390 parallel_for_body_wrapper(Iterator first, const Body& body, feeder_impl<Body, Item>* feeder_ptr) 391 : my_first(first), my_body(body), my_feeder_ptr(feeder_ptr) {} 479 … : my_first(first), my_last(last), my_wait_context(w_context), my_execution_context(e_context), 625 if (!(first == last)) { 629 … for_each_root_task<Iterator, Body, ItemType> root_task(first, last, body, w_context, context); 661 void parallel_for_each(Iterator first, Iterator last, const Body& body) { 663 run_parallel_for_each<Iterator, Body>(first, last, body, context); [all …]
|
| H A D | blocked_rangeNd.h | 120 …(my_dims.begin(), my_dims.end(), [](const tbb::blocked_range<value_type>& first, const tbb::blocke… in __TBB_requires() 121 return (first.size() * second.grainsize() < second.size() * first.grainsize()); in __TBB_requires()
|
| H A D | concurrent_hash_map.h | 699 while (this->is_valid(n) && !my_hash_compare.equal(key, n->value().first)) in __TBB_requires() 901 internal_copy(first, last, std::distance(first, last)); in __TBB_requires() 912 internal_copy(first, last, std::distance(first, last)); in __TBB_requires() 1226 void insert( I first, I last ) { in __TBB_requires() 1227 for ( ; first != last; ++first ) in __TBB_requires() 1228 insert( *first ); in __TBB_requires() 1511 void internal_copy( I first, I last, size_type reserve_size ) { in __TBB_requires() 1514 for(; first != last; ++first) { in __TBB_requires() 1515 hashcode_type h = my_hash_compare.hash( (*first).first ); in __TBB_requires() 1518 … node* node_ptr = create_node(base_type::get_allocator(), (*first).first, (*first).second); in __TBB_requires() [all …]
|
| /oneTBB/test/tbb/ |
| H A D | test_concurrent_hash_map.cpp | 83 CHECK(utils::IsEqual()(a->first, my_value.first)); in operator ()() 89 CHECK(utils::IsEqual()(ca->first, my_value.first)); in operator ()() 131 CHECK(my_c.count( value.first ) == 1); in operator ()() 137 CHECK(utils::IsEqual()(ca->first, value.first)); in operator ()() 144 CHECK(utils::IsEqual()(ca->first, value.first)); in operator ()() 151 CHECK(utils::IsEqual()(a->first, value.first)); in operator ()() 158 CHECK(utils::IsEqual()(a->first, value.first)); in operator ()() 162 CHECK(my_c.erase( value.first )); in operator ()() 163 CHECK(my_c.count( value.first ) == 0); in operator ()() 169 iterator r1_first_prev = r1.first++; in operator ()() [all …]
|
| /oneTBB/test/conformance/ |
| 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 ()() 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 ()() 148 oneapi::tbb::parallel_for( first, last, step, f, p ); in operator ()() 334 SmartIndex first{0, change_vector}; in test_pfor_func_invoke() local 338 oneapi::tbb::parallel_for(first, last, &SmartIndex::increase); in test_pfor_func_invoke() 343 oneapi::tbb::parallel_for(first, last, &SmartIndex::increase, aff); in test_pfor_func_invoke() 350 oneapi::tbb::parallel_for(first, last, stride, &SmartIndex::increase); in test_pfor_func_invoke() [all …]
|
| H A D | conformance_blocked_range3d.cpp | 190 oneapi::tbb::blocked_range3d<int> first(original); 192 oneapi::tbb::blocked_range3d<int> second(first, ps); 197 if (first.rows().size() == second.rows().size()) { 198 if (first.cols().size() == second.cols().size()) { 200 …utils::check_range_bounds_after_splitting(original.pages(), first.pages(), second.pages(), expecte… 203 …utils::check_range_bounds_after_splitting(original.cols(), first.cols(), second.cols(), expected_f… 207 …utils::check_range_bounds_after_splitting(original.rows(), first.rows(), second.rows(), expected_f…
|
| H A D | conformance_blocked_range2d.cpp | 157 oneapi::tbb::blocked_range2d<int> first(original); 159 oneapi::tbb::blocked_range2d<int> second(first, ps); 164 if (first.rows().size() == second.rows().size()) { 166 …utils::check_range_bounds_after_splitting(original.cols(), first.cols(), second.cols(), expected_f… 169 …utils::check_range_bounds_after_splitting(original.rows(), first.rows(), second.rows(), expected_f…
|
| H A D | conformance_concurrent_hash_map.cpp | 247 key_sum += -i->first.value_of(); in CheckTable() 292 w.count( (it++)->first ); in TestRehash() 598 if (c.count( (*it).first) == 0){ in equal() 748 int k = i->first.value_of(); in TraverseTable() 750 CHECK_FAST((*i).first.value_of()==k); in TraverseTable() 759 CHECK_FAST((cer.first == er.first && cer.second == er.second)); in TraverseTable() 760 CHECK_FAST(cer.first == i); in TraverseTable() 765 CHECK_FAST(cic->first.value_of()==k); in TraverseTable() 766 CHECK_FAST((*cic).first.value_of()==k); in TraverseTable() 867 int k = i->first.value_of(); in operator ()() [all …]
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | How_Task_Scheduler_Works.rst | 19 To achieve this, a balance between depth-first and breadth-first execution strategies 20 must be reached. Assuming that the task graph is finite, depth-first is better for 27 - **Minimize space**. Execution of the shallowest task leads to the breadth-first unfolding of a gr… 28 …number of nodes that co-exist simultaneously. In contrast, depth-first execution creates the same … 36 a task obtained by the first rule that applies from the roughly equivalent ruleset: 47 which causes the depth-first execution until the thread runs out of work. 49 which causes temporary breadth-first execution that converts potential parallelism
|
| H A D | Using_Circular_Buffers.rst | 9 first filter to create an item and last filter to consume an item are 12 first parameter to ``parallel_pipeline``. Under these conditions, no 20 first and last filter are *not* ``serial_in_order``, then you have to
|
| /oneTBB/doc/main/tbb_userguide/design_patterns/ |
| H A D | Reduction.rst | 82 interval [first,last). 88 T AssociativeReduce( const T* first, const T* last, T identity ) { 91 oneapi::tbb::blocked_range<const T*>(first,last), 121 T CombineReduce( const T* first, const T* last, T identity ) { 124 oneapi::tbb::blocked_range<const T*>(first,last), 155 if( last-first<=1000 ) { 157 return std::accumulate( first, last, identity ); 160 const T* mid = first+(last-first)/2; 163 [&]{left=RepeatableReduce(first,mid,identity);}, 193 oneapi::tbb::blocked_range<const T*>(first,last,1000), [all …]
|
| /oneTBB/test/common/ |
| H A D | concurrent_associative_common.h | 326 ++sum.first; 335 sum1.first += sum2.first; sum1.second += sum2.second; 506 it = range.first; 520 …REQUIRE_MESSAGE((ins2.second == false && ins2.first == ins.first), "Element 1 should not be re-ins… 599 it = range.first; 622 it = range.first; 626 it = range.first; 1067 REQUIRE(equal(*res.first, value)); 1070 iterator it = res.first; 1077 REQUIRE((equal(*r1.first, value) && ++r1.first == r1.second)); [all …]
|
| H A D | utils.h | 52 typename std::iterator_traits<It>::value_type median(It first, It last) { in median() argument 53 std::sort(first, last); in median() 54 typename std::iterator_traits<It>::difference_type distance = std::distance(first, last); in median() 55 std::advance(first, distance / 2 - 1); in median() 58 auto curr_element = first; in median() 59 auto next_element = ++first; in median() 62 return typename std::iterator_traits<It>::value_type(*first); in median() 391 return t1.first.lock().get() == t2.first.lock().get() && 413 REQUIRE(first.begin() == original.begin()); 414 REQUIRE(first.end() == expected_first_end); [all …]
|
| H A D | test_invoke.h | 37 …SmartRange(const Value& first, const Value& last) : base_range(first, last), change_vector(nullptr… in SmartRange() argument 38 SmartRange(const Value& first, const Value& last, std::vector<std::size_t>& cv) in SmartRange() argument 39 : base_range(first, last), change_vector(&cv) {} in SmartRange()
|
| /oneTBB/examples/parallel_pipeline/square/ |
| H A D | square.cpp | 78 void append(char* first, char* last) { in append() argument 79 memcpy(logical_end, first, last - first); in append() 80 logical_end += last - first; in append() 247 if (threads.first) { in main() 248 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _concurrent_skip_list.h | 301 internal_copy(first, last); in concurrent_skip_list() 396 return insert(value).first; in insert() 406 while (first != last) { in insert() 407 insert(*first); in insert() 408 ++first; in insert() 430 return insert(std::move(nh)).first; in insert() 458 while (first != last) { in unsafe_erase() 460 first = unsafe_erase(first); in unsafe_erase() 462 return get_iterator(first); in unsafe_erase() 1031 unsafe_erase(eq.first, eq.second); in internal_erase() [all …]
|
| H A D | _concurrent_unordered_base.h | 268 insert(first, last); in concurrent_unordered_base() 423 return insert(value).first; in insert() 428 return insert(std::move(value)).first; in insert() 433 for (; first != last; ++first) { in insert() 434 insert(*first); in insert() 463 return insert(std::move(nh)).first; in insert() 503 while(first != last) { in unsafe_erase() 504 first = unsafe_erase(first); in unsafe_erase() 1002 node_ptr curr = search_result.first; in internal_insert() 1009 curr = search_result.first; in internal_insert() [all …]
|
| H A D | _flow_graph_item_buffer_impl.h | 54 …__TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->first))%alignment_of<item_type>:… in item() 60 …__TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].begin()->first))%alignment_of<item_type>:… in item() 72 item_type* itm = const_cast<item_type*>(reinterpret_cast<const item_type*>(&item(i).first)); in get_my_item() 81 new(&(item(i).first)) item_type(o); in set_my_item() 122 item(i).first.~item_type(); in destroy_item() 171 char *new_space = (char *)&(new_array[i&(new_size-1)].begin()->first); in grow_my_array()
|
| H A D | _flow_graph_tagged_buffer_impl.h | 110 value_type *ov = reinterpret_cast<value_type *>(&(op->first)); in grow_array() 136 (void) new(&(my_elem->first)) value_type(v); in internal_insert_with_key() 156 void* ptr = (void*)(p->first); in internal_free_buffer() 218 pointer_type pv = reinterpret_cast<pointer_type>(&(p->first)); in find_ref_with_key() 242 value_type *vp = reinterpret_cast<value_type *>(&(p->first)); in delete_with_key()
|
| /oneTBB/examples/task_group/sudoku/ |
| H A D | README.md | 4 …hibits OR-parallelism. It can be optionally run until it obtains just the first solution. The poin… 26 * `verbose` - prints the first solution. 28 * `find-one` - stops after finding first solution.
|
| /oneTBB/src/tbbmalloc/ |
| H A D | large_objects.cpp | 563 tail->next = first; in putList() 564 if (first) in putList() 565 first->prev = tail; in putList() 566 first = head; in putList() 588 first = result->next; in get() 589 if (first) in get() 590 first->prev = nullptr; in get() 655 toRelease = first; in cleanToThreshold() 656 first = nullptr; in cleanToThreshold() 674 first = nullptr; in cleanAll() [all …]
|
| /oneTBB/examples/concurrent_hash_map/count_strings/ |
| H A D | count_strings.cpp | 107 printf("%s %d\n", i->first.c_str(), i->second); in CountOccurrences() 110 hashes[std::hash<MyString>()(i->first) & 0xFFFF]++; in CountOccurrences() 266 if (threads.first) { in main() 267 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
|
| /oneTBB/examples/migration/recursive_fibonacci/ |
| H A D | fibonacci.cpp | 55 std::cout << "Fibonacci two tasks impl N = " << res.first << " Avg time = " << res.second in main() 59 std::cout << "Fibonacci single task impl N = " << res.first << " Avg time = " << res.second in main()
|
| /oneTBB/examples/task_arena/fractal/ |
| H A D | main.cpp | 66 video.threaded = threads.first > 0; in main() 76 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
|