On Fri, 31 Mar 2023 00:18:21 GMT, Paul Sandoz <psan...@openjdk.org> wrote:
>> Quan Anh Mai has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 14 commits: >> >> - move implementations up >> - Merge branch 'master' into shufflerefactor >> - Merge branch 'master' into shufflerefactor >> - reviews >> - missing casts >> - clean up >> - fix Matcher::vector_needs_load_shuffle >> - fix internal types, clean up >> - optimise laneIsValid >> - Merge branch 'master' into shufflerefactor >> - ... and 4 more: https://git.openjdk.org/jdk/compare/d063b896...a4835c00 > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-VectorBits.java.template > line 1106: > >> 1104: @Override >> 1105: @ForceInline >> 1106: public int laneSource(int i) { > > Can this method be moved to `AbstractShuffle`? No because `T lane(int)` is a method of the typed vector classes which is not available in `AbstractVector` > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-VectorBits.java.template > line 1158: > >> 1156: } >> 1157: >> 1158: private static $bitstype$[] prepare(int[] indices, int offset) >> { > > If we want to reduce code duplication further I suspect we could move these > static methods to IntVector etc. Up to you. I think duplication of generated code is less of a concern so it may be more desirable to keep them in the shuffle classes and near their usages. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13093#discussion_r1154405710 PR Review Comment: https://git.openjdk.org/jdk/pull/13093#discussion_r1154407372