-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add a note about changes in RangePolicy index conversion safety check #558
base: main
Are you sure you want to change the base?
Conversation
Should we not just it is templated? (not asking you to change, just trying to follow the reasoning) |
I am for exposing that For instance, constructors should either be
or maybe just be:
If either option sounds reasonable, I'll make these changes. |
I don't know the right way to do this. The templated constructors are really just an implementation detail. It is designed to work like non-templated overloads in that we are simulating implicit convertibility to Documentation should be usage-focused. |
Expanding on what I wrote on Slack: We need a different name than Maybe add a note saying it defaults to the Even though they are interchangeable, we really should be consistent on which one we use in the docs. I have a slight preference for We need to balance simplifying the documentation for users w/o glossing over lower level details they may eventually need. |
I overlooked that there's
This information is already available on this page in
Although I do also prefer |
If a reader asks "what is If you look at the synopsis, you see using member_type = PolicyTraits<Args...>::index_type;
//...
// Inherited from PolicyTraits<Args...>
//...
using index_type = PolicyTraits<Args...>::index_type; It's a clue, but not particularly helpful. You have to dig through the source to understand what That is a lot of mental gymnastics to go through to reason out that "I need numbers and they should probably be unsigned" (and even the "unsigned" part people skip; otherwise, we wouldn't need the round trip test). Brainstorming here: maybe we just need to say something like:
|
3dbccc4
to
62cbb47
Compare
Changed argument index types from
int64_t
toIndexType
to better describe what's really in the implementation, which is templated type that is required to be convertible toIndexType
.It's already noted that the internal
IndexType
will be defaulted toint64_t
if not specified.Also added a note about changed behavior in conversion safety check when roundtrip convertibility is not provided (from kokkos/kokkos#7172).