< prev index next >

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

Print this page

  7  * published by the Free Software Foundation.  Oracle designates this
  8  * particular file as subject to the "Classpath" exception as provided
  9  * by Oracle in the LICENSE file that accompanied this code.
 10  *
 11  * This code is distributed in the hope that it will be useful, but WITHOUT
 12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14  * version 2 for more details (a copy is included in the LICENSE file that
 15  * accompanied this code).
 16  *
 17  * You should have received a copy of the GNU General Public License version
 18  * 2 along with this work; if not, write to the Free Software Foundation,
 19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20  *
 21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22  * or visit www.oracle.com if you need additional information or have any
 23  * questions.
 24  */
 25 package jdk.incubator.vector;
 26 
 27 import java.nio.ByteBuffer;
 28 import java.util.Arrays;
 29 import java.util.Objects;
 30 import java.util.function.IntUnaryOperator;
 31 

 32 import jdk.internal.vm.annotation.ForceInline;
 33 import jdk.internal.vm.vector.VectorSupport;
 34 
 35 import static jdk.internal.vm.vector.VectorSupport.*;
 36 
 37 import static jdk.incubator.vector.VectorOperators.*;
 38 
 39 // -- This file was mechanically generated: Do not edit! -- //
 40 
 41 @SuppressWarnings("cast")  // warning: redundant cast
 42 final class Float128Vector extends FloatVector {
 43     static final FloatSpecies VSPECIES =
 44         (FloatSpecies) FloatVector.SPECIES_128;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<Float128Vector> VCLASS = Float128Vector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

444     @ForceInline
445     public Float128Vector rearrange(VectorShuffle<Float> shuffle,
446                                   VectorMask<Float> m) {
447         return (Float128Vector)
448             super.rearrangeTemplate(Float128Shuffle.class,
449                                     Float128Mask.class,
450                                     (Float128Shuffle) shuffle,
451                                     (Float128Mask) m);  // specialize
452     }
453 
454     @Override
455     @ForceInline
456     public Float128Vector rearrange(VectorShuffle<Float> s,
457                                   Vector<Float> v) {
458         return (Float128Vector)
459             super.rearrangeTemplate(Float128Shuffle.class,
460                                     (Float128Shuffle) s,
461                                     (Float128Vector) v);  // specialize
462     }
463 
















464     @Override
465     @ForceInline
466     public Float128Vector selectFrom(Vector<Float> v) {
467         return (Float128Vector)
468             super.selectFromTemplate((Float128Vector) v);  // specialize
469     }
470 
471     @Override
472     @ForceInline
473     public Float128Vector selectFrom(Vector<Float> v,
474                                    VectorMask<Float> m) {
475         return (Float128Vector)
476             super.selectFromTemplate((Float128Vector) v,
477                                      (Float128Mask) m);  // specialize
478     }
479 
480 
481     @ForceInline
482     @Override
483     public float lane(int i) {

625                 this, species,
626                 (m, s) -> s.maskFactory(m.toArray()).check(s));
627         }
628 
629         @Override
630         @ForceInline
631         public Float128Mask eq(VectorMask<Float> mask) {
632             Objects.requireNonNull(mask);
633             Float128Mask m = (Float128Mask)mask;
634             return xor(m.not());
635         }
636 
637         // Unary operations
638 
639         @Override
640         @ForceInline
641         public Float128Mask not() {
642             return xor(maskAll(true));
643         }
644 









645         // Binary operations
646 
647         @Override
648         @ForceInline
649         public Float128Mask and(VectorMask<Float> mask) {
650             Objects.requireNonNull(mask);
651             Float128Mask m = (Float128Mask)mask;
652             return VectorSupport.binaryOp(VECTOR_OP_AND, Float128Mask.class, null, int.class, VLENGTH,
653                                           this, m, null,
654                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
655         }
656 
657         @Override
658         @ForceInline
659         public Float128Mask or(VectorMask<Float> mask) {
660             Objects.requireNonNull(mask);
661             Float128Mask m = (Float128Mask)mask;
662             return VectorSupport.binaryOp(VECTOR_OP_OR, Float128Mask.class, null, int.class, VLENGTH,
663                                           this, m, null,
664                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

817 
818     @ForceInline
819     @Override
820     final
821     FloatVector fromArray0(float[] a, int offset, VectorMask<Float> m) {
822         return super.fromArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);  // specialize
823     }
824 
825     @ForceInline
826     @Override
827     final
828     FloatVector fromArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
829         return super.fromArray0Template(Float128Mask.class, a, offset, indexMap, mapOffset, (Float128Mask) m);
830     }
831 
832 
833 
834     @ForceInline
835     @Override
836     final
837     FloatVector fromByteArray0(byte[] a, int offset) {
838         return super.fromByteArray0Template(a, offset);  // specialize
839     }
840 
841     @ForceInline
842     @Override
843     final
844     FloatVector fromByteArray0(byte[] a, int offset, VectorMask<Float> m) {
845         return super.fromByteArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);  // specialize
846     }
847 
848     @ForceInline
849     @Override
850     final
851     FloatVector fromByteBuffer0(ByteBuffer bb, int offset) {
852         return super.fromByteBuffer0Template(bb, offset);  // specialize
853     }
854 
855     @ForceInline
856     @Override
857     final
858     FloatVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Float> m) {
859         return super.fromByteBuffer0Template(Float128Mask.class, bb, offset, (Float128Mask) m);  // specialize
860     }
861 
862     @ForceInline
863     @Override
864     final
865     void intoArray0(float[] a, int offset) {
866         super.intoArray0Template(a, offset);  // specialize
867     }
868 
869     @ForceInline
870     @Override
871     final
872     void intoArray0(float[] a, int offset, VectorMask<Float> m) {
873         super.intoArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);
874     }
875 
876     @ForceInline
877     @Override
878     final
879     void intoArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
880         super.intoArray0Template(Float128Mask.class, a, offset, indexMap, mapOffset, (Float128Mask) m);
881     }
882 
883 
884     @ForceInline
885     @Override
886     final
887     void intoByteArray0(byte[] a, int offset) {
888         super.intoByteArray0Template(a, offset);  // specialize
889     }
890 
891     @ForceInline
892     @Override
893     final
894     void intoByteArray0(byte[] a, int offset, VectorMask<Float> m) {
895         super.intoByteArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);  // specialize
896     }
897 
898     @ForceInline
899     @Override
900     final
901     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Float> m) {
902         super.intoByteBuffer0Template(Float128Mask.class, bb, offset, (Float128Mask) m);
903     }
904 
905 
906     // End of specialized low-level memory operations.
907 
908     // ================================================
909 
910 }

  7  * published by the Free Software Foundation.  Oracle designates this
  8  * particular file as subject to the "Classpath" exception as provided
  9  * by Oracle in the LICENSE file that accompanied this code.
 10  *
 11  * This code is distributed in the hope that it will be useful, but WITHOUT
 12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14  * version 2 for more details (a copy is included in the LICENSE file that
 15  * accompanied this code).
 16  *
 17  * You should have received a copy of the GNU General Public License version
 18  * 2 along with this work; if not, write to the Free Software Foundation,
 19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20  *
 21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22  * or visit www.oracle.com if you need additional information or have any
 23  * questions.
 24  */
 25 package jdk.incubator.vector;
 26 

 27 import java.util.Arrays;
 28 import java.util.Objects;
 29 import java.util.function.IntUnaryOperator;
 30 
 31 import jdk.incubator.foreign.MemorySegment;
 32 import jdk.internal.vm.annotation.ForceInline;
 33 import jdk.internal.vm.vector.VectorSupport;
 34 
 35 import static jdk.internal.vm.vector.VectorSupport.*;
 36 
 37 import static jdk.incubator.vector.VectorOperators.*;
 38 
 39 // -- This file was mechanically generated: Do not edit! -- //
 40 
 41 @SuppressWarnings("cast")  // warning: redundant cast
 42 final class Float128Vector extends FloatVector {
 43     static final FloatSpecies VSPECIES =
 44         (FloatSpecies) FloatVector.SPECIES_128;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<Float128Vector> VCLASS = Float128Vector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

444     @ForceInline
445     public Float128Vector rearrange(VectorShuffle<Float> shuffle,
446                                   VectorMask<Float> m) {
447         return (Float128Vector)
448             super.rearrangeTemplate(Float128Shuffle.class,
449                                     Float128Mask.class,
450                                     (Float128Shuffle) shuffle,
451                                     (Float128Mask) m);  // specialize
452     }
453 
454     @Override
455     @ForceInline
456     public Float128Vector rearrange(VectorShuffle<Float> s,
457                                   Vector<Float> v) {
458         return (Float128Vector)
459             super.rearrangeTemplate(Float128Shuffle.class,
460                                     (Float128Shuffle) s,
461                                     (Float128Vector) v);  // specialize
462     }
463 
464     @Override
465     @ForceInline
466     public Float128Vector compress(VectorMask<Float> m) {
467         return (Float128Vector)
468             super.compressTemplate(Float128Mask.class,
469                                    (Float128Mask) m);  // specialize
470     }
471 
472     @Override
473     @ForceInline
474     public Float128Vector expand(VectorMask<Float> m) {
475         return (Float128Vector)
476             super.expandTemplate(Float128Mask.class,
477                                    (Float128Mask) m);  // specialize
478     }
479 
480     @Override
481     @ForceInline
482     public Float128Vector selectFrom(Vector<Float> v) {
483         return (Float128Vector)
484             super.selectFromTemplate((Float128Vector) v);  // specialize
485     }
486 
487     @Override
488     @ForceInline
489     public Float128Vector selectFrom(Vector<Float> v,
490                                    VectorMask<Float> m) {
491         return (Float128Vector)
492             super.selectFromTemplate((Float128Vector) v,
493                                      (Float128Mask) m);  // specialize
494     }
495 
496 
497     @ForceInline
498     @Override
499     public float lane(int i) {

641                 this, species,
642                 (m, s) -> s.maskFactory(m.toArray()).check(s));
643         }
644 
645         @Override
646         @ForceInline
647         public Float128Mask eq(VectorMask<Float> mask) {
648             Objects.requireNonNull(mask);
649             Float128Mask m = (Float128Mask)mask;
650             return xor(m.not());
651         }
652 
653         // Unary operations
654 
655         @Override
656         @ForceInline
657         public Float128Mask not() {
658             return xor(maskAll(true));
659         }
660 
661         @Override
662         @ForceInline
663         public Float128Mask compress() {
664             return (Float128Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
665                 Float128Vector.class, Float128Mask.class, ETYPE, VLENGTH, null, this,
666                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
667         }
668 
669 
670         // Binary operations
671 
672         @Override
673         @ForceInline
674         public Float128Mask and(VectorMask<Float> mask) {
675             Objects.requireNonNull(mask);
676             Float128Mask m = (Float128Mask)mask;
677             return VectorSupport.binaryOp(VECTOR_OP_AND, Float128Mask.class, null, int.class, VLENGTH,
678                                           this, m, null,
679                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
680         }
681 
682         @Override
683         @ForceInline
684         public Float128Mask or(VectorMask<Float> mask) {
685             Objects.requireNonNull(mask);
686             Float128Mask m = (Float128Mask)mask;
687             return VectorSupport.binaryOp(VECTOR_OP_OR, Float128Mask.class, null, int.class, VLENGTH,
688                                           this, m, null,
689                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

842 
843     @ForceInline
844     @Override
845     final
846     FloatVector fromArray0(float[] a, int offset, VectorMask<Float> m) {
847         return super.fromArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);  // specialize
848     }
849 
850     @ForceInline
851     @Override
852     final
853     FloatVector fromArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
854         return super.fromArray0Template(Float128Mask.class, a, offset, indexMap, mapOffset, (Float128Mask) m);
855     }
856 
857 
858 
859     @ForceInline
860     @Override
861     final
862     FloatVector fromMemorySegment0(MemorySegment ms, long offset) {
863         return super.fromMemorySegment0Template(ms, offset);  // specialize
864     }
865 
866     @ForceInline
867     @Override
868     final
869     FloatVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Float> m) {
870         return super.fromMemorySegment0Template(Float128Mask.class, ms, offset, (Float128Mask) m);  // specialize














871     }
872 
873     @ForceInline
874     @Override
875     final
876     void intoArray0(float[] a, int offset) {
877         super.intoArray0Template(a, offset);  // specialize
878     }
879 
880     @ForceInline
881     @Override
882     final
883     void intoArray0(float[] a, int offset, VectorMask<Float> m) {
884         super.intoArray0Template(Float128Mask.class, a, offset, (Float128Mask) m);
885     }
886 
887     @ForceInline
888     @Override
889     final
890     void intoArray0(float[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Float> m) {
891         super.intoArray0Template(Float128Mask.class, a, offset, indexMap, mapOffset, (Float128Mask) m);
892     }
893 
894 
895     @ForceInline
896     @Override
897     final
898     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Float> m) {
899         super.intoMemorySegment0Template(Float128Mask.class, ms, offset, (Float128Mask) m);














900     }
901 
902 
903     // End of specialized low-level memory operations.
904 
905     // ================================================
906 
907 }
< prev index next >