-
Notifications
You must be signed in to change notification settings - Fork 915
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
Remove implicit copy due to conversion from cudf::size_type and size_t #10045
Remove implicit copy due to conversion from cudf::size_type and size_t #10045
Conversation
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 nice fix. LGTM.
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.
What was being copied?
The line So while it appears we are using the values inside |
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-22.02 #10045 +/- ##
================================================
- Coverage 10.49% 10.41% -0.08%
================================================
Files 119 119
Lines 20305 20543 +238
================================================
+ Hits 2130 2139 +9
- Misses 18175 18404 +229
Continue to review full report at Codecov.
|
@@ -171,8 +171,9 @@ std::vector<metadata::stripe_source_mapping> aggregate_orc_metadata::select_stri | |||
|
|||
// Coalesce stripe info at the source file later since that makes downstream processing much | |||
// easier in impl::read | |||
for (const size_t& stripe_idx : user_specified_stripes[src_file_idx]) { | |||
CUDF_EXPECTS(stripe_idx < per_file_metadata[src_file_idx].ff.stripes.size(), | |||
for (const auto& stripe_idx : user_specified_stripes[src_file_idx]) { |
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.
Just small nit:
for (const auto& stripe_idx : user_specified_stripes[src_file_idx]) { | |
for (const auto stripe_idx : user_specified_stripes[src_file_idx]) { |
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.
@ttnghia Can you explain why you're suggesting this change?
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.
Sorry @bdice for late reply (I didn't see this).
A reference is similar to pointer, which is 64 bits. If you use reference for 32 bits numbers, that's kind of inefficient. Although the compiler can optimize this and generate the same code (for references and without references), it is still logically inefficient.
@gpucibot merge |
Detected when compiling with gcc-11 by the new
range-loop-construct
warning