Repository navigation
Conversation
|
This API would be more generic if it accept a universal reference to a device buffer: Which allows the following uses: @kaatish is working on a utility function to make |
|
So I don't want to have to know how to build a |
Codecov Report
@@ Coverage Diff @@
## branch-0.11 #3252 +/- ##
============================================
Coverage 87.13% 87.13%
============================================
Files 49 49
Lines 9269 9269
============================================
Hits 8077 8077
Misses 1192 1192Continue to review full report at Codecov.
|
jrhemstad
left a comment
There was a problem hiding this comment.
While it may be more convenient, simply passing in a bitmask_type* can easily lead to shooting yourself in the foot. Consider if you're copying from a column_view::null_mask where the offset() !=0.
One solution is to instead accept a device_buffer in combination with #3262.
Which would look like:
make_numeric_column(..., copy_bitmask(view.null_mask(), view.offset(), view.size()), ...);
I admit that this leaves something to be desired.
Another option is to have the factory accept a column_view and then the implementation takes care of the offset bitmask.
std::unique_ptr<column> make_numeric_column(
data_type type, size_type size, column_view const& view,
size_type null_count = cudf::UNKNOWN_NULL_COUNT, cudaStream_t stream = 0,
rmm::mr::device_memory_resource* mr = rmm::mr::get_default_resource());
This looks a little weird to me, but I could probably be convinced.
|
I guess I like this option the best then. Could I have a |
I like this. It should be a trivial extension to the other |
jrhemstad
left a comment
There was a problem hiding this comment.
Just needs some tests.
devavret
left a comment
There was a problem hiding this comment.
I tried to use this but it doesn't work. Needs these changes.
Closes #3235
I have many functions where the output column's null mask should be the same (copy of) the input column's null mask. So the code just copies the null mask before calling the
columnconstructor like this:This PR will add new column factory methods to pass an existing null mask when building the column so the above code can be reduced to the following: