Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[try_put_and_wait] Part 8: Add implementation for key_matching join_node #1432

Conversation

kboyarinov
Copy link
Contributor

Description

Extend key_matching join_node with try_put_and_wait API + tests

Fixes # - issue number(s) if exists

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

…production' into dev/kboyarinov/try_put_and_wait_function_node
…function_node' into dev/kboyarinov/try_put_and_wait_buffering_nodes
…buffering_nodes' into dev/kboyarinov/try_put_and_wait_limiter_node
…limiter_node' into dev/kboyarinov/try_put_and_wait_join_node
…join_node' into dev/kboyarinov/try_put_and_wait_key_matching_join_node
…production' into dev/kboyarinov/try_put_and_wait_buffering_nodes
…buffering_nodes' into dev/kboyarinov/try_put_and_wait_limiter_node
…limiter_node' into dev/kboyarinov/try_put_and_wait_join_node
…join_node' into dev/kboyarinov/try_put_and_wait_key_matching_join_node
…production' into dev/kboyarinov/try_put_and_wait_join_node
…join_node' into dev/kboyarinov/try_put_and_wait_key_matching_join_node
…production' into dev/kboyarinov/try_put_and_wait_join_node
…join_node' into dev/kboyarinov/try_put_and_wait_key_matching_join_node
Base automatically changed from dev/kboyarinov/try_put_and_wait_join_node to dev/kboyarinov/try_put_and_wait_production August 19, 2024 08:28
…production' into dev/kboyarinov/try_put_and_wait_key_matching_join_node
Copy link
Contributor

@vossmjp vossmjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes

char first[sizeof(T1)];
T2 second;
char fill1[REM];
template<class U> struct alignment_of {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preceding comment should be moved or removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed


#if __TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT
template <typename T1, typename T2, typename T3>
struct alignas(alignof(max_alignment_helper_t<T1, T2, T3>)) aligned_three {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "aligned_triple" is better than "aligned_three", since triple is more in line with pair.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed

this->third = metainfo;

for (auto waiter : metainfo.waiters()) {
waiter->reserve();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters, but I've noticed that you sometimes rely on the default value of 1 and other times are explicit about the 1. Is there some pattern to when you do or do not use the explicit value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no special pattern in this regard. I tried to use 1 as an explicit argument everywhere. Changed here and in the corresponding release.

test/tbb/test_join_node_preview.cpp Show resolved Hide resolved
test/tbb/test_join_node_preview.cpp Show resolved Hide resolved
kboyarinov and others added 4 commits August 20, 2024 13:04
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Copy link
Contributor

@vossmjp vossmjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@kboyarinov kboyarinov merged commit 1ce85d9 into dev/kboyarinov/try_put_and_wait_production Aug 20, 2024
22 checks passed
@kboyarinov kboyarinov deleted the dev/kboyarinov/try_put_and_wait_key_matching_join_node branch August 20, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants