-
Notifications
You must be signed in to change notification settings - Fork 407
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
team-level std algos: part 2 #6205
Conversation
3af43a3
to
9013aa6
Compare
29b7043
to
7ec06a2
Compare
CI failure unrelated |
This comment was marked as outdated.
This comment was marked as outdated.
ci acting up but was fine before |
retest this please |
retest this please |
all CI failures are unrelated |
only hvhpc fails with compiler error opc |
const auto s_count = KE::distance(s_first, s_last); | ||
namespace KE = ::Kokkos::Experimental; | ||
const auto num_elements = KE::distance(first, last); | ||
[[maybe_unused]] const auto s_count = KE::distance(s_first, s_last); |
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.
Isn't this always used (in line 115)?
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.
the complain comes from line 106, it sees this possibility of existing earlier
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.
the same should be true for num_elements though , but don't recall seeing that warning
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 will try to remove them again
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.
Let me know.
// the target sequence should not be larger than the range [first, last) | ||
namespace KE = ::Kokkos::Experimental; | ||
const auto num_elements = KE::distance(first, last); | ||
[[maybe_unused]] const auto s_count = KE::distance(s_first, s_last); |
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 unused? Which compiler complains?
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.
the complain comes from line 189 and 193, it sees this possibility of existing earlier. I don't remember which compiler is doing this but definitely was getting warnings. I can dig it back up if you really want to know
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.
the same should be true for num_elements though
@masterleinad I removed all the |
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.
Fine with me.
template <class ExecutionSpace, class IteratorType1, class IteratorType2> | ||
template < | ||
typename ExecutionSpace, typename IteratorType1, typename IteratorType2, | ||
std::enable_if_t<::Kokkos::is_execution_space_v<ExecutionSpace>, int> = 0> |
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.
Is there a reason these guys are not constrained on are_iterators like the equal algorithm?
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.
the different # of params does not cause the same ambiguous error from compiler
Co-authored-by: Cezary Skrzyński
Co-authored-by: Jakub Strzebonski
Content
Team-level implementation and tests for:
Kokkos_Equal.hpp
Kokkos_Search.hpp
Kokkos_FindEnd.hpp
Kokkos_FindFirstOf.hpp
Technical comments
the change
class
->typename
and the enable if defaulted in the template parameters comes from this requestthe code duplication is intentional and agreed upon after the long discussion in here
tests are run for both contiguous views and strided views
Other comments
all team-level PRs are tracked in: Team-level std algorithms PRs: issue tracker #6352
this comes from breaking apart team impl of std algorithms #5150
Possible conflicts
Implementation-wise, this has not conflict with other team-level PRs so it could be merged independently.
However, a trivial conflict in the CMakeLists inside the unit test occurs if another of the team-level PRs is merged before this because each team-level PR adds test using a specific "label". Resolving this is trivial.
Associated wiki PRs
Kokkos_Equal.hpp
: see wiki PR 366Kokkos_Search.hpp
: see wiki PR 371Kokkos_FindEnd.hpp
: see wiki PR 366Kokkos_FindFirstOf.hpp
: see wiki PR 366IMPORTANT: wiki PRs are not complete yet but 99% there
The issue tracking all wiki PRs is here