< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortMaxVector.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 ShortMaxVector extends ShortVector {
 43     static final ShortSpecies VSPECIES =
 44         (ShortSpecies) ShortVector.SPECIES_MAX;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<ShortMaxVector> VCLASS = ShortMaxVector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

457     @ForceInline
458     public ShortMaxVector rearrange(VectorShuffle<Short> shuffle,
459                                   VectorMask<Short> m) {
460         return (ShortMaxVector)
461             super.rearrangeTemplate(ShortMaxShuffle.class,
462                                     ShortMaxMask.class,
463                                     (ShortMaxShuffle) shuffle,
464                                     (ShortMaxMask) m);  // specialize
465     }
466 
467     @Override
468     @ForceInline
469     public ShortMaxVector rearrange(VectorShuffle<Short> s,
470                                   Vector<Short> v) {
471         return (ShortMaxVector)
472             super.rearrangeTemplate(ShortMaxShuffle.class,
473                                     (ShortMaxShuffle) s,
474                                     (ShortMaxVector) v);  // specialize
475     }
476 
















477     @Override
478     @ForceInline
479     public ShortMaxVector selectFrom(Vector<Short> v) {
480         return (ShortMaxVector)
481             super.selectFromTemplate((ShortMaxVector) v);  // specialize
482     }
483 
484     @Override
485     @ForceInline
486     public ShortMaxVector selectFrom(Vector<Short> v,
487                                    VectorMask<Short> m) {
488         return (ShortMaxVector)
489             super.selectFromTemplate((ShortMaxVector) v,
490                                      (ShortMaxMask) m);  // specialize
491     }
492 
493 
494     @ForceInline
495     @Override
496     public short lane(int i) {

630                 this, species,
631                 (m, s) -> s.maskFactory(m.toArray()).check(s));
632         }
633 
634         @Override
635         @ForceInline
636         public ShortMaxMask eq(VectorMask<Short> mask) {
637             Objects.requireNonNull(mask);
638             ShortMaxMask m = (ShortMaxMask)mask;
639             return xor(m.not());
640         }
641 
642         // Unary operations
643 
644         @Override
645         @ForceInline
646         public ShortMaxMask not() {
647             return xor(maskAll(true));
648         }
649 









650         // Binary operations
651 
652         @Override
653         @ForceInline
654         public ShortMaxMask and(VectorMask<Short> mask) {
655             Objects.requireNonNull(mask);
656             ShortMaxMask m = (ShortMaxMask)mask;
657             return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMaxMask.class, null, short.class, VLENGTH,
658                                           this, m, null,
659                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
660         }
661 
662         @Override
663         @ForceInline
664         public ShortMaxMask or(VectorMask<Short> mask) {
665             Objects.requireNonNull(mask);
666             ShortMaxMask m = (ShortMaxMask)mask;
667             return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMaxMask.class, null, short.class, VLENGTH,
668                                           this, m, null,
669                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

829 
830 
831     @ForceInline
832     @Override
833     final
834     ShortVector fromCharArray0(char[] a, int offset) {
835         return super.fromCharArray0Template(a, offset);  // specialize
836     }
837 
838     @ForceInline
839     @Override
840     final
841     ShortVector fromCharArray0(char[] a, int offset, VectorMask<Short> m) {
842         return super.fromCharArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);  // specialize
843     }
844 
845 
846     @ForceInline
847     @Override
848     final
849     ShortVector fromByteArray0(byte[] a, int offset) {
850         return super.fromByteArray0Template(a, offset);  // specialize
851     }
852 
853     @ForceInline
854     @Override
855     final
856     ShortVector fromByteArray0(byte[] a, int offset, VectorMask<Short> m) {
857         return super.fromByteArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);  // specialize
858     }
859 
860     @ForceInline
861     @Override
862     final
863     ShortVector fromByteBuffer0(ByteBuffer bb, int offset) {
864         return super.fromByteBuffer0Template(bb, offset);  // specialize
865     }
866 
867     @ForceInline
868     @Override
869     final
870     ShortVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
871         return super.fromByteBuffer0Template(ShortMaxMask.class, bb, offset, (ShortMaxMask) m);  // specialize
872     }
873 
874     @ForceInline
875     @Override
876     final
877     void intoArray0(short[] a, int offset) {
878         super.intoArray0Template(a, offset);  // specialize
879     }
880 
881     @ForceInline
882     @Override
883     final
884     void intoArray0(short[] a, int offset, VectorMask<Short> m) {
885         super.intoArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);
886     }
887 
888 
889 
890     @ForceInline
891     @Override
892     final
893     void intoByteArray0(byte[] a, int offset) {
894         super.intoByteArray0Template(a, offset);  // specialize
895     }
896 
897     @ForceInline
898     @Override
899     final
900     void intoByteArray0(byte[] a, int offset, VectorMask<Short> m) {
901         super.intoByteArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);  // specialize
902     }
903 
904     @ForceInline
905     @Override
906     final
907     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
908         super.intoByteBuffer0Template(ShortMaxMask.class, bb, offset, (ShortMaxMask) m);
909     }
910 
911     @ForceInline
912     @Override
913     final
914     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
915         super.intoCharArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);
916     }
917 
918     // End of specialized low-level memory operations.
919 
920     // ================================================
921 
922 }

  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 ShortMaxVector extends ShortVector {
 43     static final ShortSpecies VSPECIES =
 44         (ShortSpecies) ShortVector.SPECIES_MAX;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<ShortMaxVector> VCLASS = ShortMaxVector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

457     @ForceInline
458     public ShortMaxVector rearrange(VectorShuffle<Short> shuffle,
459                                   VectorMask<Short> m) {
460         return (ShortMaxVector)
461             super.rearrangeTemplate(ShortMaxShuffle.class,
462                                     ShortMaxMask.class,
463                                     (ShortMaxShuffle) shuffle,
464                                     (ShortMaxMask) m);  // specialize
465     }
466 
467     @Override
468     @ForceInline
469     public ShortMaxVector rearrange(VectorShuffle<Short> s,
470                                   Vector<Short> v) {
471         return (ShortMaxVector)
472             super.rearrangeTemplate(ShortMaxShuffle.class,
473                                     (ShortMaxShuffle) s,
474                                     (ShortMaxVector) v);  // specialize
475     }
476 
477     @Override
478     @ForceInline
479     public ShortMaxVector compress(VectorMask<Short> m) {
480         return (ShortMaxVector)
481             super.compressTemplate(ShortMaxMask.class,
482                                    (ShortMaxMask) m);  // specialize
483     }
484 
485     @Override
486     @ForceInline
487     public ShortMaxVector expand(VectorMask<Short> m) {
488         return (ShortMaxVector)
489             super.expandTemplate(ShortMaxMask.class,
490                                    (ShortMaxMask) m);  // specialize
491     }
492 
493     @Override
494     @ForceInline
495     public ShortMaxVector selectFrom(Vector<Short> v) {
496         return (ShortMaxVector)
497             super.selectFromTemplate((ShortMaxVector) v);  // specialize
498     }
499 
500     @Override
501     @ForceInline
502     public ShortMaxVector selectFrom(Vector<Short> v,
503                                    VectorMask<Short> m) {
504         return (ShortMaxVector)
505             super.selectFromTemplate((ShortMaxVector) v,
506                                      (ShortMaxMask) m);  // specialize
507     }
508 
509 
510     @ForceInline
511     @Override
512     public short lane(int i) {

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

854 
855 
856     @ForceInline
857     @Override
858     final
859     ShortVector fromCharArray0(char[] a, int offset) {
860         return super.fromCharArray0Template(a, offset);  // specialize
861     }
862 
863     @ForceInline
864     @Override
865     final
866     ShortVector fromCharArray0(char[] a, int offset, VectorMask<Short> m) {
867         return super.fromCharArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);  // specialize
868     }
869 
870 
871     @ForceInline
872     @Override
873     final
874     ShortVector fromMemorySegment0(MemorySegment ms, long offset) {
875         return super.fromMemorySegment0Template(ms, offset);  // specialize
876     }
877 
878     @ForceInline
879     @Override
880     final
881     ShortVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
882         return super.fromMemorySegment0Template(ShortMaxMask.class, ms, offset, (ShortMaxMask) m);  // specialize














883     }
884 
885     @ForceInline
886     @Override
887     final
888     void intoArray0(short[] a, int offset) {
889         super.intoArray0Template(a, offset);  // specialize
890     }
891 
892     @ForceInline
893     @Override
894     final
895     void intoArray0(short[] a, int offset, VectorMask<Short> m) {
896         super.intoArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);
897     }
898 
899 
900 
901     @ForceInline
902     @Override
903     final
904     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
905         super.intoMemorySegment0Template(ShortMaxMask.class, ms, offset, (ShortMaxMask) m);














906     }
907 
908     @ForceInline
909     @Override
910     final
911     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
912         super.intoCharArray0Template(ShortMaxMask.class, a, offset, (ShortMaxMask) m);
913     }
914 
915     // End of specialized low-level memory operations.
916 
917     // ================================================
918 
919 }
< prev index next >