< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Int128Vector.java

Print this page
*** 22,15 ***
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  package jdk.incubator.vector;
  
- import java.nio.ByteBuffer;
  import java.util.Arrays;
  import java.util.Objects;
  import java.util.function.IntUnaryOperator;
  
  import jdk.internal.vm.annotation.ForceInline;
  import jdk.internal.vm.vector.VectorSupport;
  
  import static jdk.internal.vm.vector.VectorSupport.*;
  
--- 22,15 ---
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  package jdk.incubator.vector;
  
  import java.util.Arrays;
  import java.util.Objects;
  import java.util.function.IntUnaryOperator;
  
+ import jdk.incubator.foreign.MemorySegment;
  import jdk.internal.vm.annotation.ForceInline;
  import jdk.internal.vm.vector.VectorSupport;
  
  import static jdk.internal.vm.vector.VectorSupport.*;
  

*** 472,10 ***
--- 472,26 ---
              super.rearrangeTemplate(Int128Shuffle.class,
                                      (Int128Shuffle) s,
                                      (Int128Vector) v);  // specialize
      }
  
+     @Override
+     @ForceInline
+     public Int128Vector compress(VectorMask<Integer> m) {
+         return (Int128Vector)
+             super.compressTemplate(Int128Mask.class,
+                                    (Int128Mask) m);  // specialize
+     }
+ 
+     @Override
+     @ForceInline
+     public Int128Vector expand(VectorMask<Integer> m) {
+         return (Int128Vector)
+             super.expandTemplate(Int128Mask.class,
+                                    (Int128Mask) m);  // specialize
+     }
+ 
      @Override
      @ForceInline
      public Int128Vector selectFrom(Vector<Integer> v) {
          return (Int128Vector)
              super.selectFromTemplate((Int128Vector) v);  // specialize

*** 651,10 ***
--- 667,19 ---
          @ForceInline
          public Int128Mask not() {
              return xor(maskAll(true));
          }
  
+         @Override
+         @ForceInline
+         public Int128Mask compress() {
+             return (Int128Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
+                 Int128Vector.class, Int128Mask.class, ETYPE, VLENGTH, null, this,
+                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
+         }
+ 
+ 
          // Binary operations
  
          @Override
          @ForceInline
          public Int128Mask and(VectorMask<Integer> mask) {

*** 843,33 ***
  
  
      @ForceInline
      @Override
      final
!     IntVector fromByteArray0(byte[] a, int offset) {
!         return super.fromByteArray0Template(a, offset);  // specialize
      }
  
      @ForceInline
      @Override
      final
!     IntVector fromByteArray0(byte[] a, int offset, VectorMask<Integer> m) {
!         return super.fromByteArray0Template(Int128Mask.class, a, offset, (Int128Mask) m);  // specialize
-     }
- 
-     @ForceInline
-     @Override
-     final
-     IntVector fromByteBuffer0(ByteBuffer bb, int offset) {
-         return super.fromByteBuffer0Template(bb, offset);  // specialize
-     }
- 
-     @ForceInline
-     @Override
-     final
-     IntVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Integer> m) {
-         return super.fromByteBuffer0Template(Int128Mask.class, bb, offset, (Int128Mask) m);  // specialize
      }
  
      @ForceInline
      @Override
      final
--- 868,19 ---
  
  
      @ForceInline
      @Override
      final
!     IntVector fromMemorySegment0(MemorySegment ms, long offset) {
!         return super.fromMemorySegment0Template(ms, offset);  // specialize
      }
  
      @ForceInline
      @Override
      final
!     IntVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
!         return super.fromMemorySegment0Template(Int128Mask.class, ms, offset, (Int128Mask) m);  // specialize
      }
  
      @ForceInline
      @Override
      final

*** 893,26 ***
  
  
      @ForceInline
      @Override
      final
!     void intoByteArray0(byte[] a, int offset) {
!         super.intoByteArray0Template(a, offset);  // specialize
-     }
- 
-     @ForceInline
-     @Override
-     final
-     void intoByteArray0(byte[] a, int offset, VectorMask<Integer> m) {
-         super.intoByteArray0Template(Int128Mask.class, a, offset, (Int128Mask) m);  // specialize
-     }
- 
-     @ForceInline
-     @Override
-     final
-     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Integer> m) {
-         super.intoByteBuffer0Template(Int128Mask.class, bb, offset, (Int128Mask) m);
      }
  
  
      // End of specialized low-level memory operations.
  
--- 904,12 ---
  
  
      @ForceInline
      @Override
      final
!     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
!         super.intoMemorySegment0Template(Int128Mask.class, ms, offset, (Int128Mask) m);
      }
  
  
      // End of specialized low-level memory operations.
  
< prev index next >