-
Notifications
You must be signed in to change notification settings - Fork 908
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
Change exceptions thrown by copying APIs #15319
Change exceptions thrown by copying APIs #15319
Conversation
Note to reviewers: let's discuss the usage of |
@@ -368,13 +368,16 @@ template <typename IndexIterator> | |||
size_type validate_segmented_indices(IndexIterator indices_begin, IndexIterator indices_end) | |||
{ | |||
auto const num_indices = static_cast<size_type>(std::distance(indices_begin, indices_end)); |
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.
Should this be using thrust::distance
instead of std::distance
? I'm not sure if std::distance
works on all iterator types. (I could be wrong here.)
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.
That's a good question. I think it's worth making the change since I can see some code paths that call through to this with thrust iterators. I'm guessing everything works fine or we'd be seeing bugs, but best to be safe nonetheless.
I'll do this in a separate PR though.
/merge |
Description
This PR also introduces
std::out_of_range
to cudf's code base in cases where it is appropriate.Contributes to #12885
Resolves #15315
Contributes to #15162
Checklist