Skip to content
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

Use offsetalator in cudf::strings::copy_slice #14844

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Replace hardcoded offset types with offsetalator in cudf::strings::detail::copy_slice.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 23, 2024
@davidwendt davidwendt self-assigned this Jan 23, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jan 24, 2024
@davidwendt davidwendt marked this pull request as ready for review January 24, 2024 14:43
@davidwendt davidwendt requested a review from a team as a code owner January 24, 2024 14:43
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

input_offsets,
input_offsets + offsets_column->size(),
d_offsets,
cuda::proclaim_return_type<int64_t>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should declare something like size_type that would be a proper type name for all the int64_ts that are being sprinkled around? It's pretty subtle in some cases, like the 0L literal written above. I would want to reduce the possibility of unwanted casting (like forgetting to write 0L instead of 0) by having a type name with clear intent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not wish to create a special type at this time and prefer not to obfuscate int64_t in this code.

@bdice bdice changed the title Use offsetalator in strings:copy_slice Use offsetalator in strings::copy_slice Jan 26, 2024
@bdice bdice changed the title Use offsetalator in strings::copy_slice Use offsetalator in strings:copy_slice Jan 26, 2024
@davidwendt davidwendt changed the title Use offsetalator in strings:copy_slice Use offsetalator in cudf::strings::copy_slice Jan 26, 2024
@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 5cc021a into rapidsai:branch-24.04 Jan 29, 2024
69 checks passed
@davidwendt davidwendt deleted the copy-slice-offsetalator branch January 29, 2024 18:51
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 improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants