Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[CUDAX] Add modernized simpleP2P sample #2696
[CUDAX] Add modernized simpleP2P sample #2696
Changes from 16 commits
eae1b06
5d7ad98
2a3060f
795439b
850f5ec
bbc7d2e
9ec90b6
29d48b7
4760c7d
836c512
824a568
088dad2
3a813a3
8ffc7f7
5174101
9d47842
a5f1e4a
fa570ad
197ed75
3650705
f20190d
119b05c
02c94b9
baaff9b
ed5cf1f
49c431c
1f05372
13961d0
b0384b6
603f2aa
76cd405
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this could reuse
device_ref::get_peers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is using
get_peers
in line 75 to get the actual peers.The original sample was printing out for every pair of devices if peer access is available, so I thought I should do it too. So I added the printing loop to show how you can access individual pairs, but also used
get_peers
as a way to construct the resulting vector to show that API as well.But if this is too obscure, I could also get rid of the printing loop or separate it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely separate it out. i'll also note that the printing loops are doing a cross-product, so this could be made linear with a
cartesian_product
view. but i don't think we have such a thing yet.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this necessary? what happens if it's omitted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary, it was in the original sample so I added it to just show how to do it. But we can remove it if its confusing why its there