RFR: 8287289: Gather/Scatter with Index Vector
Paul Sandoz
psandoz at openjdk.org
Tue Apr 11 00:09:57 UTC 2023
On Fri, 7 Apr 2023 15:33:34 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> Another question is that where should I base this patch onto? I assume it should be `vectorIntrinsics`.
Since this is relatively small in scope I think it suitable as an enhancement for the jdk repo, and if ready could be targeted for 21. But, it may take us a few iterations to get the API right.
- Why did you remove mapped index access using MemorySegments? Its tempting to focus on that as the primitive, and not add specific API points for arrays, given these access methods are more specialized. Perhaps you ran into some issues?
- Initially I was pondering whether we should also have an offset argument, but this only seems worthwhile if there are address calculation optimizations that cannot be easily applied (if any are possible) to the user code adding an offset to the input mapped index vector (also see next point).
- Having IntVector and LongVector for MemorySegments seems unavoidable given species lane counts. For arrays we could probably get away with just IntVector, but we could also just drop those too if MemorySegments worked out. However, for MemorySegments using IntVector we would need to point out that the segment might need to be sliced at a required offset.
-------------
PR Comment: https://git.openjdk.org/panama-vector/pull/213#issuecomment-1502493778
More information about the panama-dev
mailing list