< prev index next >

src/java.base/share/classes/jdk/internal/vm/vector/VectorSupport.java

Print this page
@@ -73,10 +73,15 @@
  
      // Rotate operations
      public static final int VECTOR_OP_LROTATE = 23;
      public static final int VECTOR_OP_RROTATE = 24;
  
+     // Compression expansion operations
+     public static final int VECTOR_OP_COMPRESS = 25;
+     public static final int VECTOR_OP_EXPAND = 26;
+     public static final int VECTOR_OP_MASK_COMPRESS = 27;
+ 
      // Math routines
      public static final int VECTOR_OP_TAN = 101;
      public static final int VECTOR_OP_TANH = 102;
      public static final int VECTOR_OP_SIN = 103;
      public static final int VECTOR_OP_SINH = 104;

@@ -434,18 +439,18 @@
      }
  
      /* ============================================================================ */
  
      public interface StoreVectorOperation<C,
-                                           V extends Vector<?>> {
+                                           V extends VectorPayload> {
          void store(C container, int index, V v);
      }
  
      @IntrinsicCandidate
      public static
      <C,
-      V extends Vector<?>>
+      V extends VectorPayload>
      void store(Class<?> vClass, Class<?> eClass,
                 int length,
                 Object base, long offset,
                 V v, C container, int index,
                 StoreVectorOperation<C, V> defaultImpl) {

@@ -623,10 +628,30 @@
          return defaultImpl.apply(v, s);
      }
  
      /* ============================================================================ */
  
+     public interface ComExpOperation<V extends Vector<?>,
+                                      M extends VectorMask<?>> {
+         VectorPayload apply(V v, M m);
+     }
+ 
+     @IntrinsicCandidate
+     public static
+     <V extends Vector<E>,
+      M extends VectorMask<E>,
+      E>
+     VectorPayload comExpOp(int opr,
+                            Class<? extends V> vClass, Class<? extends M> mClass, Class<E> eClass,
+                            int length, V v, M m,
+                            ComExpOperation<V, M> defaultImpl) {
+         assert isNonCapturingLambda(defaultImpl) : defaultImpl;
+         return defaultImpl.apply(v, m);
+     }
+ 
+     /* ============================================================================ */
+ 
      @IntrinsicCandidate
      public static
      <VP extends VectorPayload>
      VP maybeRebox(VP v) {
          // The fence is added here to avoid memory aliasing problems in C2 between scalar & vector accesses.
< prev index next >