-
Notifications
You must be signed in to change notification settings - Fork 445
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
Adding converting constructor in Kokkos::RandomAccessIterator #6929
Adding converting constructor in Kokkos::RandomAccessIterator #6929
Conversation
algorithms/src/std_algorithms/impl/Kokkos_RandomAccessIterator.hpp
Outdated
Show resolved
Hide resolved
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.
Just a few minor comments.
Looks good other than that.
algorithms/src/std_algorithms/impl/Kokkos_RandomAccessIterator.hpp
Outdated
Show resolved
Hide resolved
ASSERT_TRUE(first_st2first_d); | ||
ASSERT_TRUE(first_st2first_s); | ||
} | ||
|
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.
Maybe add a comment that it would be good to have a test for the explicit specifier with an expression.
I just looked over the View
converting constructors and they are all implicit so I don't see what we can actually do at the moment.
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.
Thanks for your comments. I fixed accordingly.
I am less confident in the final point about a comment.
If something is wrong, please let me know
…od idea because it let user write code that would compile with C++17 but not with later standards.
One of the CUDA build timed out (unrelated) |
@yasahi-hpc please add an entry to the changelog for this PR |
This PR aims at adding a missing converting constructor in
Kokkos::RandomAccessIterator
.Convertibility of iterators is based on the convertibility of underlying views.
It now allows to construct
a non-const iterator from a const iterator but disallows to construct a const iterator from a non-const iteratora const iterator from a non-const iterator but disallows to construct a non-const iterator from a const iterator