Skip to content

Conversation

davidwendt
Copy link
Contributor

Description

Reworks the switch/case statement in reductions.cpp to use dispatch_type_and_aggregation instead.
This allows the specific functors to indicate valid aggregation/type support, reduce behavior when no data is given, as well as the reduction function itself. This makes it easier to update existing aggregations and support newer ones more reliably. It also allows for a reduction-specific is_valid_aggregation() API by keeping making the valid checks a compile-time feature.

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 self-assigned this Sep 23, 2025
@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 Sep 23, 2025
Copy link

copy-pr-bot bot commented Sep 23, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

// default column_view{} is an empty column
// empty column_view
CUDF_EXPECT_NO_THROW(statement(cudf::column_view{}));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was an invalid test -- libcudf type-dispatcher is designed to throw on an invalid or empty type.

@davidwendt
Copy link
Contributor Author

/ok to test

@davidwendt
Copy link
Contributor Author

/ok to test

@davidwendt
Copy link
Contributor Author

/ok to test

@davidwendt
Copy link
Contributor Author

/ok to test

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Sep 29, 2025
@davidwendt
Copy link
Contributor Author

/ok to test

@davidwendt davidwendt marked this pull request as ready for review September 29, 2025 18:47
@davidwendt davidwendt requested a review from a team as a code owner September 29, 2025 18:47
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

This is very nice. Thank you!

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 0c8f9cb into rapidsai:branch-25.12 Sep 30, 2025
252 of 254 checks passed
@davidwendt davidwendt deleted the reduce-functors branch September 30, 2025 14:15
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants