You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets indexed lane sources return borrowed or otherwise non-Copy items. RowFn needs this for typed row inputs without adding a second kernel abstraction.
What changes are included in this PR?
Removes the Copy bound from IndexedSource::Item. It also makes LaneZip fields private, validates lengths once in LaneZip::new, and removes the repeated assertion from its inline len method.
This is a prerequisite only. The first production RowFn adopter is in #9345, so there is no meaningful RowFn performance comparison at this layer.
What APIs are changed? Are there any user-facing changes?
LaneZip must now be constructed with LaneZip::new instead of tuple syntax. The workspace has no direct field construction outside this module.
Another fun thing I found in my rustc investigation: when removing the Copy bound, sometimes the compiler can generate faster code because instead of a copy (load and store), it performs a move, which sometimes can allow a loop to vectorize better? Why? I have no idea! And when I tried to minimize for a repro I couldn't find a good one because things kept changing between rust versions.
Regardless, it seems like we should just take of the Copy constraint because it's not needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RowFnAPI #9129Lets indexed lane sources return borrowed or otherwise non-
Copyitems. RowFn needs this for typed row inputs without adding a second kernel abstraction.What changes are included in this PR?
Removes the
Copybound fromIndexedSource::Item. It also makesLaneZipfields private, validates lengths once inLaneZip::new, and removes the repeated assertion from its inlinelenmethod.This is a prerequisite only. The first production RowFn adopter is in #9345, so there is no meaningful RowFn performance comparison at this layer.
What APIs are changed? Are there any user-facing changes?
LaneZipmust now be constructed withLaneZip::newinstead of tuple syntax. The workspace has no direct field construction outside this module.