mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8279508: Auto-vectorize Math.round API
Reviewed-by: sviswanathan, aph
This commit is contained in:
parent
c1e67b6603
commit
003ec21f3c
25 changed files with 765 additions and 90 deletions
|
@ -753,6 +753,7 @@ public final class Math {
|
|||
* @see java.lang.Integer#MAX_VALUE
|
||||
* @see java.lang.Integer#MIN_VALUE
|
||||
*/
|
||||
@IntrinsicCandidate
|
||||
public static int round(float a) {
|
||||
int intBits = Float.floatToRawIntBits(a);
|
||||
int biasedExp = (intBits & FloatConsts.EXP_BIT_MASK)
|
||||
|
@ -802,6 +803,7 @@ public final class Math {
|
|||
* @see java.lang.Long#MAX_VALUE
|
||||
* @see java.lang.Long#MIN_VALUE
|
||||
*/
|
||||
@IntrinsicCandidate
|
||||
public static long round(double a) {
|
||||
long longBits = Double.doubleToRawLongBits(a);
|
||||
long biasedExp = (longBits & DoubleConsts.EXP_BIT_MASK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue