-
Notifications
You must be signed in to change notification settings - Fork 205
[FEA] Matrix column shift #2634
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
base: branch-25.06
Are you sure you want to change the base?
Conversation
cpp/include/raft/matrix/shift.cuh
Outdated
* @param[in] k: shift size | ||
*/ | ||
template <typename math_t, typename matrix_idx_t> | ||
void col_right_shift(raft::resources const& handle, |
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.
This naming is a bit confusing. Could we please instead have a "shift" function with an enum for "Direction::Left", "Direction::Right" and maybe use another enum for ShiftType::Row/ShiftType::Column? That would clean this up and minimize the number of free functions the user has to worry about invoking.
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.
Thank you for the suggestion, totally agree.
We have towards_end
and towards_zero
as the shift direction because left/right doesn't work with row shifting.
Implementation for in-place row or column shifting for matrices.
Currently needed for the case where we need to add a self loop in a knn graph.