[vector] RFR 8222897: Renaming of shift, rotate operations. Few other api changes.

Kharbas, Kishor kishor.kharbas at intel.com
Fri Apr 26 22:55:55 UTC 2019


Hi,
I have an updated patch with some more changes -

1.       Renaming cross-lane operations like addAll() to addLanes().

2.       Added missing shift*(ByteVector) and rotate*(ByteVector) methods in ByteVector and also in ShortVector.

3.       Fixed some issues identified in Javadoc.

4.       Fixed the tests and benchmark as per the api changes.

Webrev - http://cr.openjdk.java.net/~kkharbas/vector-api/8222897/8222897-webrev.01/
Resulting Javadoc - http://cr.openjdk.java.net/~kkharbas/vector-api/javadoc/VectorApi-JavaDoc.05/jdk.incubator.vector/jdk/incubator/vector/package-summary.html

Thanks,
Kishor

From: Kharbas, Kishor
Sent: Tuesday, April 23, 2019 11:55 AM
To: panama-dev at openjdk.java.net
Cc: Brian Goetz <brian.goetz at oracle.com>; John Rose <john.r.rose at oracle.com>; Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Kharbas, Kishor <kishor.kharbas at intel.com>
Subject: RE: [vector] RFR 8222897: Renaming of shift, rotate operations. Few other api changes.

The generated Javadoc with this change is at - http://cr.openjdk.java.net/~kkharbas/vector-api/javadoc/VectorApi-JavaDoc.04/jdk.incubator.vector/jdk/incubator/vector/package-summary.html

Regards,
Kishor

From: Kharbas, Kishor
Sent: Tuesday, April 23, 2019 11:10 AM
To: panama-dev at openjdk.java.net<mailto:panama-dev at openjdk.java.net>
Cc: Kharbas, Kishor <kishor.kharbas at intel.com<mailto:kishor.kharbas at intel.com>>
Subject: [vector] RFR 8222897: Renaming of shift, rotate operations. Few other api changes.

Hi all,

To make the api easy to use, few changes identified are -
1. Rename shift, rotate operations to be more explicit in what they do. Example, shiftL -> shiftLeft. This also follows the convention used in other libraries; example rotateLeft() in java.lang.Integer.
2. Added instance methods in Vector.java to create masks and shuffles. The goal is to help programmers by not having to maintain or acquire a reference to Species when creating masks and shuffle. These methods in turn call the static methods in VectorMask and VectorShuffle with the vector's species.
3. VectorSpecies.boxType() is confusing, rename to vectorType().
4. Add helper method in Species to determine loop terminating condition.

I have created a webrev for these changes. Requesting a review.

Webrev - http://cr.openjdk.java.net/~kkharbas/vector-api/8222897/8222897-webrev.00/
Bug - https://bugs.openjdk.java.net/browse/JDK-8222897

Thanks,
Kishor


More information about the panama-dev mailing list