changeset 17526:d83170db025b

Double256Vector JDK support for VectorAPI Implementation
author srukmannagar
date Thu, 28 Sep 2017 17:00:21 -0700
parents 2737ffacb7c6
children 59f30be8f659
files src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template
diffstat 2 files changed, 30 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java	Wed Sep 27 17:23:32 2017 -0700
+++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java	Thu Sep 28 17:00:21 2017 -0700
@@ -89,6 +89,7 @@
 
     //
 
+    @HotSpotIntrinsicCandidate
     @Override
     public DoubleVector<S> add(Vector<Double,S> o) {
         return bOp(o, (i, a, b) -> (double) (a + b));
@@ -109,6 +110,7 @@
         return bOp(o, m, (i, a, b) -> (double) ((a >= Integer.MAX_VALUE || Integer.MAX_VALUE - b > a) ? Integer.MAX_VALUE : a + b));
     }
 
+    @HotSpotIntrinsicCandidate
     @Override
     public DoubleVector<S> sub(Vector<Double,S> o) {
         return bOp(o, (i, a, b) -> (double) (a - b));
@@ -129,6 +131,7 @@
         return bOp(o, m, (i, a, b) -> (double) ((a >= Double.MIN_VALUE || Double.MIN_VALUE + b > a) ? Double.MAX_VALUE : a - b));
     }
 
+    @HotSpotIntrinsicCandidate
     @Override
     public DoubleVector<S> mul(Vector<Double,S> o) {
         return bOp(o, (i, a, b) -> (double) (a * b));
@@ -139,6 +142,7 @@
         return bOp(o, m, (i, a, b) -> (double) (a * b));
     }
 
+    @HotSpotIntrinsicCandidate
     @Override
     public DoubleVector<S> div(Vector<Double,S> o) {
         return bOp(o, (i, a, b) -> (double) (a / b));
@@ -179,6 +183,7 @@
         return bOp(o, (i, a, b) -> (a >= b) ? a : b);
     }
 
+    @HotSpotIntrinsicCandidate
     @Override
     public Mask<Double, S> equal(Vector<Double,S> o) {
         return bTest(o, (i, a, b) -> a == b);
@@ -189,6 +194,7 @@
         return bTest(o, (i, a, b) -> a != b);
     }
 
+    @HotSpotIntrinsicCandidate
     @Override
     public Mask<Double, S> lessThan(Vector<Double,S> o) {
         return bTest(o, (i, a, b) -> a < b);
@@ -209,6 +215,7 @@
         return bTest(o, (i, a, b) -> a >= b);
     }
 
+    @HotSpotIntrinsicCandidate
     @Override
     public DoubleVector<S> blend(Vector<Double,S> o, Mask<Double, S> m) {
         return bOp(o, (i, a, b) -> m.getElement(i) ? a : b);
@@ -546,6 +553,7 @@
 
     // Type specific horizontal reductions
 
+    @HotSpotIntrinsicCandidate
     public double sumAll() {
         return rOp((double) 0, (i, a, b) -> (double) (a + b));
     }
@@ -601,9 +609,11 @@
 
         // Factories
 
+        @HotSpotIntrinsicCandidate
         @Override
         public abstract DoubleVector<S> zero();
 
+        @HotSpotIntrinsicCandidate
         public DoubleVector<S> broadcast(double e) {
             return op(i -> e);
         }
--- a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template	Wed Sep 27 17:23:32 2017 -0700
+++ b/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template	Thu Sep 28 17:00:21 2017 -0700
@@ -93,9 +93,9 @@
 
     //
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -119,9 +119,9 @@
         return bOp(o, m, (i, a, b) -> ($type$) ((a >= Integer.MAX_VALUE || Integer.MAX_VALUE - b > a) ? Integer.MAX_VALUE : a + b));
     }
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -145,9 +145,9 @@
         return bOp(o, m, (i, a, b) -> ($type$) ((a >= $Wideboxtype$.MIN_VALUE || $Wideboxtype$.MIN_VALUE + b > a) ? $Wideboxtype$.MAX_VALUE : a - b));
     }
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -161,9 +161,9 @@
         return bOp(o, m, (i, a, b) -> ($type$) (a * b));
     }
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -207,9 +207,9 @@
         return bOp(o, (i, a, b) -> (a >= b) ? a : b);
     }
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -223,9 +223,9 @@
         return bTest(o, (i, a, b) -> a != b);
     }
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -249,9 +249,9 @@
         return bTest(o, (i, a, b) -> a >= b);
     }
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -759,9 +759,9 @@
 
     // Type specific horizontal reductions
 
-#if[float]
+#if[FP]
     @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
     @HotSpotIntrinsicCandidate
 #end[int]
@@ -833,18 +833,18 @@
 
         // Factories
 
-#if[float]
+#if[FP]
         @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
         @HotSpotIntrinsicCandidate
 #end[int]
         @Override
         public abstract $abstractvectortype$<S> zero();
 
-#if[float]
+#if[FP]
         @HotSpotIntrinsicCandidate
-#end[float]
+#end[FP]
 #if[int]
         @HotSpotIntrinsicCandidate
 #end[int]