Home
last modified time | relevance | path

Searched refs:item (Results 1 – 25 of 44) sorted by relevance

12

/oneTBB/doc/main/tbb_userguide/design_patterns/
H A DNon-Preemptive_Priorities.rst13 Choose the next work item to do, based on priorities.
79 ReadyPile.add(item);
131 void add( WorkItem* item ) {
132 level[item->priority].push(item);
136 // Scan queues in priority order for an item.
137 WorkItem* item=NULL;
139 if( level[i].try_pop(item) )
141 assert(item);
142 item->run();
152 higher priority item. There is one task for each item, but the
[all …]
H A DLocal_Serializer.rst47 Always keep an item in flight if possible. If no item is in flight
48 when a work item appears, put the item in flight. Otherwise, push the
49 item onto the FIFO. When the current item in flight completes, pop
50 another item from the FIFO and put it in flight.
121 s->add(item);
123 ReadyPile.add(item);
205 WorkItem* item;
206 queue.try_pop(item);
207 ReadyPile.add(item);
210 void add( WorkItem* item ) {
[all …]
H A DWavefront.rst14 an item uses results from computations on predecessor items.
48 counter with each item. Initialize each counter to the number of
50 have no predessors (have counts of zero). After an item is processed,
56 If the number of predecessors for an item cannot be determined in
/oneTBB/test/common/
H A Dparallel_for_each_common.h248 …TestGenericLambdaWithMove<Iterator>(depth, [](auto item){g_tasks_observed += FindNumOfTasks(item.v… in TestGenericLambdasCommon()
249 …tGenericLambdaWithMove<Iterator>(depth, [](const auto item){g_tasks_observed += FindNumOfTasks(ite… in TestGenericLambdasCommon()
250 …TestGenericLambda<Iterator>(depth, [](volatile auto& item){g_tasks_observed += FindNumOfTasks(item in TestGenericLambdasCommon()
252 …TestGenericLambda<Iterator>(depth, [](auto& item){g_tasks_observed += FindNumOfTasks(item.value())… in TestGenericLambdasCommon()
253 …GenericLambdaWithMove<Iterator>(depth, [](const auto& item){g_tasks_observed += FindNumOfTasks(ite… in TestGenericLambdasCommon()
254 …TestGenericLambdaWithMove<Iterator>(depth, [](auto&& item){g_tasks_observed += FindNumOfTasks(item in TestGenericLambdasCommon()
256 TestGenericLambdaWithMove<Iterator>(depth, [](auto item, auto& feeder){do_work(item, feeder);}); in TestGenericLambdasCommon()
257 …TestGenericLambdaWithMove<Iterator>(depth, [](const auto item, auto& feeder){do_work(item, feeder)… in TestGenericLambdasCommon()
260 TestGenericLambda<Iterator>(depth, [](auto& item, auto& feeder){do_work(item, feeder);}); in TestGenericLambdasCommon()
261 …TestGenericLambdaWithMove<Iterator>(depth, [](const auto& item, auto& feeder){do_work(item, feeder… in TestGenericLambdasCommon()
[all …]
H A Dconcurrent_priority_queue_common.h208 for (auto& item : vec) { in type_tester_unique_ptr()
209 vec_sorted.push_back(value_type(new T(item))); in type_tester_unique_ptr()
214 for (auto& item : vec) { in type_tester_unique_ptr()
215 q1.push(value_type(new T(item))); in type_tester_unique_ptr()
216 q1_copy.push(value_type(new T(item))); in type_tester_unique_ptr()
223 for (auto& item : vec) { in type_tester_unique_ptr()
224 q1.emplace(new T(item)); in type_tester_unique_ptr()
/oneTBB/src/tbb/
H A Dintrusive_list.h38 static intrusive_list_node& node ( T& item ) { return List::node(item); } in node() argument
40 static T& item ( intrusive_list_node* node ) { return List::item(node); } in item() function
42 static const T& item( const intrusive_list_node* node ) { return List::item(node); } in item() function
90 return intrusive_list_base::item(my_pos);
94 return &intrusive_list_base::item(my_pos);
198 static T& item ( intrusive_list_node* node ) { in item() function
206 static const T& item( const intrusive_list_node* node ) { in item() function
207 return item(const_cast<intrusive_list_node*>(node)); in item()
224 static T& item ( intrusive_list_node* node ) { return *static_cast<T*>(node); } in item() function
226 static const T& item( const intrusive_list_node* node ) { return *static_cast<const T*>(node); } in item() function
H A Dparallel_pipeline.cpp221 task_info& item = array[++low_token & (array_size-1)]; in try_to_spawn_task_for_next_token() local
223 wakee = item; in try_to_spawn_task_for_next_token()
224 item.is_valid = false; in try_to_spawn_task_for_next_token()
/oneTBB/include/oneapi/tbb/detail/
H A D_flow_graph_item_buffer_impl.h52 aligned_space_item &item(size_type i) { in item() function
58 const aligned_space_item &item(size_type i) const { in item() function
64 …bool my_item_valid(size_type i) const { return (i < my_tail) && (i >= my_head) && (item(i).second … in my_item_valid()
66 bool my_item_reserved(size_type i) const { return item(i).second == reserved_item; } in my_item_reserved()
72 item_type* itm = const_cast<item_type*>(reinterpret_cast<const item_type*>(&item(i).first)); in get_my_item()
78 if(item(i).second != no_item) { in set_my_item()
81 new(&(item(i).first)) item_type(o); in set_my_item()
82 item(i).second = has_item; in set_my_item()
122 item(i).first.~item_type(); in destroy_item()
123 item(i).second = no_item; in destroy_item()
[all …]
/oneTBB/doc/main/tbb_userguide/
H A DConcurrent_Queue_Classes.rst12 std::queue. The operation ``try_pop`` pops an item if it is available.
24 T item;
26 item = MySerialQueue.front();
28 ... process item...
36 before another thread snatches the last item from ``MySerialQueue``.
46 T item;
47 if( MyQueue.try_pop(item) ) {
48 ...process item...
71 - ``pop(item)`` waits until it can succeed.
74 - ``push(item)`` waits until it can succeed without exceeding the
[all …]
H A DUsing_Circular_Buffers.rst9 first filter to create an item and last filter to consume an item are
13 checking of whether an item is still in use is necessary.
18 the time the circular buffer wraps around to reallocate an item, the
19 item must have been freed from its previous use in the pipeline. If the
H A DCook_Until_Done_parallel_do.rst16 can be safely processed in parallel, and processing each item takes at
46 void operator()( Item& item ) const {
47 Foo(item);
79 work by calling ``feeder.add(item)``. For example, suppose processing
/oneTBB/test/tbb/
H A Dtest_arena_priorities.cpp141 for( auto& item : arenas ) { in submit_work() local
142 tbb::task_arena& arena = *std::get<arena_pointer>(item).get(); in submit_work()
143 concurrency_type concurrency = std::get<arena_concurrency>(item); in submit_work()
145 auto& tg = std::get<associated_task_group>(item); in submit_work()
171 for( auto& item : arenas ) { in wait_work_completion() local
172 tbb::task_arena& arena = *std::get<arena_pointer>(item).get(); in wait_work_completion()
173 auto& tg = std::get<associated_task_group>(item); in wait_work_completion()
266 for( auto& item : arenas ) in test() local
308 for( auto& item : arenas ) { in test() local
309 if( std::get<arena_priority>(item) == p ) { in test()
[all …]
H A Dtest_intrusive_list.cpp116 Item& item = *it; in test_list_operations() local
118 delete &item; in test_list_operations()
123 Item& item = *it; in test_list_operations() local
125 delete &item; in test_list_operations()
130 Item& item = *it++; // the iterator advances only here in test_list_operations() local
131 il.remove(item); in test_list_operations()
132 delete &item; in test_list_operations()
H A Dtest_eh_algorithms.cpp1283 size_t item = m_Item++; in operator ()() local
1287 if(item == 1) { in operator ()()
1294 m_Buffer[item] = 1; in operator ()()
1295 return &m_Buffer[item]; in operator ()()
1310 void* operator()(void* item) const { in operator ()()
1322 return item; in operator ()()
1408 return item; in operator ()()
1442 return item; in operator ()()
1517 return item; in operator ()()
1643 return item; in operator ()()
[all …]
H A Dtest_concurrent_queue.cpp42 T item = 0; in operator ()() local
43 queue.try_pop(item); in operator ()()
44 CHECK(item <= T(nthread)); in operator ()()
H A Dtest_parallel_for_each.cpp286 int item = 0; member
299 element.item = 42; in test_with_cpp20_iterator()
303 CHECK(elements[index].item == 42); in test_with_cpp20_iterator()
H A Dtest_semaphore.cpp96 for (auto item : max_vals) { in test_semaphore() local
97 max_count = utils::max(max_count, item); in test_semaphore()
/oneTBB/examples/graph/binpack/
H A Dbinpack.cpp99 void operator()(const value_type& item, ports_type& p) { in operator ()() argument
104 std::get<0>(p).try_put(item); in operator ()()
106 item > in operator ()()
144 else if (item <= desired_bin_capacity - my_used && in operator ()()
145 item >= looking_for) { // this item can be packed in operator ()()
146 my_bin.push_back(item); in operator ()()
147 my_used += item; in operator ()()
148 packed_sum += item; in operator ()()
196 std::get<0>(p).try_put(item); // put unused item back to pool in operator ()()
292 for (auto& item : input_array) { in main() local
[all …]
/oneTBB/include/oneapi/tbb/
H A Dparallel_for_each.h63 virtual void internal_add_copy(const Item& item) = 0;
64 virtual void internal_add_move(Item&& item) = 0;
69 void add(const Item& item) {internal_add_copy(item);} in add() argument
70 void add(Item&& item) {internal_add_move(std::move(item));} in add() argument
83 static auto call(const Body& body, ItemArg&& item, FeederArg*)
91 tbb::detail::invoke(body, std::forward<ItemArg>(item));
122 item(std::forward<ItemType>(input_item)), in feeder_item_task()
150 call(my_feeder.my_body, item, my_feeder, first_priority{}); in execute()
160 Item item; member
183 void internal_add_copy(const Item& item) override { in internal_add_copy() argument
[all …]
H A Dconcurrent_vector.h71 vector_iterator( const vector_type& vector, size_type index, value_type* item = nullptr )
72 : my_vector(const_cast<vector_type*>(&vector)), my_index(index), my_item(item) in my_vector()
111 value_type *item = my_item; variable
112 if (item == nullptr) {
113 item = &my_vector->internal_subscript(my_index);
115 __TBB_ASSERT(item == &my_vector->internal_subscript(my_index), "corrupt cache");
117 return *item;
407 iterator push_back( const value_type& item ) { in push_back() argument
408 return internal_emplace_back(item); in push_back()
411 iterator push_back( value_type&& item ) { in push_back() argument
[all …]
/oneTBB/doc/main/reference/
H A Dconcurrent_lru_cache_cls.rst19 to limit the number of stored unused values. For each key, there is at most one item
25 ``concurrent_lru_cache::handle`` object that refers to an item instead of its value.
26 Once there are no ``handle`` objects holding reference to an item, it is considered unused.
32 When no item is found for a given key, the container calls the user-specified
107 **Effects**: Searches the container for an item that corresponds to the given key.
108 If such an item is not found, the user-specified function object is called to
/oneTBB/doc/main/intro/
H A Dnotation.rst29 …- Braces and vertical bars indicate the choice of one item from a selection of two or more …
35 - The ellipsis indicates that the previous item can be repeated several times.
38 …- The ellipsis preceded by a comma indicates that the previous item can be repeated sever…
/oneTBB/test/conformance/
H A Dconformance_parallel_for.cpp323 for (std::size_t item : change_vector) { in test_pfor_body_invoke() local
324 CHECK(item == number_of_overloads); in test_pfor_body_invoke()
345 for (std::size_t& item : change_vector) { in test_pfor_func_invoke()
346 CHECK(item == number_of_overloads); in test_pfor_func_invoke()
347 item = 0; in test_pfor_func_invoke()
H A Dconformance_parallel_for_each.cpp143 for (auto item : change_vector) { in test_pfor_each_invoke_basic() local
144 CHECK(item == 1); in test_pfor_each_invoke_basic()
H A Dconformance_parallel_scan.cpp148 for (std::size_t& item : result_vector) item = 0; in test_pscan_invoke()

12