Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-03 Thread Sandhya Viswanathan
On Thu, 3 Oct 2024 05:04:35 GMT, Jatin Bhateja wrote: >> I see the problem with float/double vectors. Let us do the rearrange form >> only for Integral (byte, short, int, long) vectors then. For float/double >> vector we could keep the code that you have currently. > > You will also need additi

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-03 Thread Sandhya Viswanathan
On Thu, 3 Oct 2024 05:04:35 GMT, Jatin Bhateja wrote: >> I see the problem with float/double vectors. Let us do the rearrange form >> only for Integral (byte, short, int, long) vectors then. For float/double >> vector we could keep the code that you have currently. > > You will also need additi

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-02 Thread Jatin Bhateja
On Tue, 1 Oct 2024 18:03:06 GMT, Sandhya Viswanathan wrote: >>> This could instead be: src1.rearrange(this.lanewise(VectorOperators.AND, 2 >>> * VLENGTH - 1).toShuffle(), src2); Or even simplified to: >>> src1.rearrange(this.toShuffle(), src2); >> >> Yes, this may save additional allocation p

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-01 Thread Sandhya Viswanathan
On Tue, 1 Oct 2024 09:53:02 GMT, Jatin Bhateja wrote: >> Thanks for the example. Yes, you have a point there. So we would need to do: >>src1.rearrange(this.lanewise(VectorOperators.AND, 2 * VLENGTH - >> 1).toShuffle(), src2); > >> This could instead be: src1.rearrange(this.lanewise(VectorOp

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-01 Thread Jatin Bhateja
On Mon, 30 Sep 2024 22:39:09 GMT, Sandhya Viswanathan wrote: >> I think you have to do the masking before conversion - >> `vec.lanewise(VectorOperators.AND, 2 * VLENGTH - 1).toShuffle()` is not the >> same as `vec.toShuffle()` for all inputs. >> >> >> jshell> IntVector indexes = IntVector.fr

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Mon, 30 Sep 2024 22:51:57 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handling NPOT vector length for AArch64 SVE with vector sizes varying b/w >> 128 and 2048 bits at 128 bit inc

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Mon, 30 Sep 2024 21:28:22 GMT, Paul Sandoz wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java >> line 551: >> >>> 549: return ((ByteVector)src1).vectorFactory(res); >>> 550: } >>> 551: >> >> This could instead be: >>src1.rearrange(this.lan

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Paul Sandoz
On Sat, 28 Sep 2024 17:37:10 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handling NPOT vector length for AArch64 SVE with vector sizes varying b/w >> 128 and 2048 bits at 128 bit inc

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-24 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl