-
Notifications
You must be signed in to change notification settings - Fork 902
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
Replace device_vector with device_uvector in null_mask #7715
Replace device_vector with device_uvector in null_mask #7715
Conversation
@@ -53,7 +53,7 @@ void set_null_mask(bitmask_type *bitmask, | |||
* @param[in] stream CUDA stream used for device memory operations and kernel launches. | |||
*/ | |||
std::vector<size_type> segmented_count_set_bits(bitmask_type const *bitmask, | |||
std::vector<size_type> const &indices, | |||
host_span<size_type const> indices, |
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 assume the host_span
being passed by value here now is not a performance concern since it's much smaller than a vector (just a wrapper around a raw pointer)? Perhaps more for my edification than anything else: is there any particular reason to prefer not using the reference in this case?
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 think Vukasin covered this in his Better Code presentation on spans, but in general one of the points of views is you pass by value, though I don't remember why. It's just a pointer and a size. We don't pass column_view by value because they are not true views. There is an open issue for that one...
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.
Looked fine to me, just one small question.
@gpucibot merge |
Rerun tests. Previous CI test error:
|
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #7715 +/- ##
===============================================
+ Coverage 81.86% 82.53% +0.66%
===============================================
Files 101 101
Lines 16884 17453 +569
===============================================
+ Hits 13822 14404 +582
+ Misses 3062 3049 -13
Continue to review full report at Codecov.
|
Replaces remaining
device_vector
instances in null_mask.cu withdevice_uvector
. Change the interface ofsegmented_count_[un]set_bits
to takehost_span
instead ofstd::vector
.