Skip to content

Commit

Permalink
Apply review comment
Browse files Browse the repository at this point in the history
Signed-off-by: pavelkumbrasev <[email protected]>
  • Loading branch information
pavelkumbrasev committed Jul 15, 2024
1 parent e6371bf commit e5888ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/oneapi/tbb/parallel_for_each.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ struct feeder_item_task: public task {
using feeder_type = feeder_impl<Body, Item>;

template <typename ItemType>
feeder_item_task(ItemType&& input_item, feeder_type& feeder, small_object_allocator& alloc, wait_tree_vertex_interface* node) :
feeder_item_task(ItemType&& input_item, feeder_type& feeder, small_object_allocator& alloc, wait_tree_vertex_interface& wait_vertex) :
item(std::forward<ItemType>(input_item)),
my_feeder(feeder),
my_allocator(alloc),
m_wait_tree_vertex(node)
m_wait_tree_vertex(r1::get_thread_reference_vertex(&wait_vertex))
{
m_wait_tree_vertex->reserve();
}
Expand Down Expand Up @@ -174,7 +174,7 @@ class feeder_impl : public feeder<Item> {
void internal_add_copy_impl(std::true_type, const Item& item) {
using feeder_task = feeder_item_task<Body, Item>;
small_object_allocator alloc;
auto task = alloc.new_object<feeder_task>(item, *this, alloc, r1::get_thread_reference_vertex(&my_wait_context));
auto task = alloc.new_object<feeder_task>(item, *this, alloc, my_wait_context);

spawn(*task, my_execution_context);
}
Expand All @@ -190,7 +190,7 @@ class feeder_impl : public feeder<Item> {
void internal_add_move(Item&& item) override {
using feeder_task = feeder_item_task<Body, Item>;
small_object_allocator alloc{};
auto task = alloc.new_object<feeder_task>(std::move(item), *this, alloc, r1::get_thread_reference_vertex(&my_wait_context));
auto task = alloc.new_object<feeder_task>(std::move(item), *this, alloc, my_wait_context);

spawn(*task, my_execution_context);
}
Expand Down

0 comments on commit e5888ce

Please sign in to comment.