Skip to content

Fix const qualifier when using host_span<bitmask_type const*> - #11220

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:branch-22.08from
ttnghia:fix_span_data_type
Jul 8, 2022
Merged

rapids-bot[bot] merged 3 commits into
NVIDIA:branch-22.08from
ttnghia:fix_span_data_type

Conversation

@ttnghia

@ttnghia ttnghia commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

Currently, there are several places in cudf that use host_span of a pointer type, such as host_span<bitmask_type const*> in bitmask_and(). A host_span<bitmask_type const*> must be constructed from a non-const object, such as a non-const std::vector. If we have a const vector then we cannot use it to construct the required host_span unless we strip const qualifier out of the const vector.

This PR fixes that issue, changing from host_span<bitmask_type const*> to host_span<bitmask_type const* const> which allows to construct the host_span from both const and non-const container objects.

@ttnghia ttnghia added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf blocker libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS non-breaking Non-breaking change labels Jul 7, 2022
@ttnghia
ttnghia requested a review from a team as a code owner July 7, 2022 22:10
@ttnghia ttnghia self-assigned this Jul 7, 2022
@ttnghia
ttnghia requested review from cwharris and mythrocks July 7, 2022 22:10
@codecov

codecov Bot commented Jul 8, 2022 •

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.08@cdd4e03). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             branch-22.08   #11220   +/-   ##
===============================================
  Coverage                ?   86.30%           
===============================================
  Files                   ?      144           
  Lines                   ?    22698           
  Branches                ?        0           
===============================================
  Hits                    ?    19589           
  Misses                  ?     3109           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdd4e03...be15428. Read the comment docs.

@ttnghia

ttnghia commented Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit bc5e769 into NVIDIA:branch-22.08 Jul 8, 2022
@ttnghia
ttnghia deleted the fix_span_data_type branch July 8, 2022 02:47
rapids-bot Bot pushed a commit that referenced this pull request Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants