< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float128Vector.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.*;
  

*** 459,10 ***
--- 459,26 ---
              super.rearrangeTemplate(Float128Shuffle.class,
                                      (Float128Shuffle) s,
                                      (Float128Vector) v);  // specialize
      }
  
+     @Override
+     @ForceInline
+     public Float128Vector compress(VectorMask<Float> m) {
+         return (Float128Vector)
+             super.compressTemplate(Float128Mask.class,
+                                    (Float128Mask) m);  // specialize
+     }
+ 
+     @Override
+     @ForceInline
+     public Float128Vector expand(VectorMask<Float> m) {
+         return (Float128Vector)
+             super.expandTemplate(Float128Mask.class,
+                                    (Float128Mask) m);  // specialize
+     }
+ 
      @Override
      @ForceInline
      public Float128Vector selectFrom(Vector<Float> v) {
          return (Float128Vector)
              super.selectFromTemplate((Float128Vector) v);  // specialize

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

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

*** 882,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<Float> m) {
-         super.intoByteArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);  // specialize
-     }
- 
-     @ForceInline
-     @Override
-     final
-     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Float> m) {
-         super.intoByteBuffer0Template(Float128Mask.class, bb, offset, (Float128Mask) m);
      }
  
  
      // End of specialized low-level memory operations.
  
--- 893,12 ---
  
  
      @ForceInline
      @Override
      final
!     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Float> m) {
!         super.intoMemorySegment0Template(Float128Mask.class, ms, offset, (Float128Mask) m);
      }
  
  
      // End of specialized low-level memory operations.
  
< prev index next >