< prev index next >

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

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
















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

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









650         // Binary operations
651 
652         @Override
653         @ForceInline
654         public IntMaxMask and(VectorMask<Integer> mask) {
655             Objects.requireNonNull(mask);
656             IntMaxMask m = (IntMaxMask)mask;
657             return VectorSupport.binaryOp(VECTOR_OP_AND, IntMaxMask.class, null, int.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 IntMaxMask or(VectorMask<Integer> mask) {
665             Objects.requireNonNull(mask);
666             IntMaxMask m = (IntMaxMask)mask;
667             return VectorSupport.binaryOp(VECTOR_OP_OR, IntMaxMask.class, null, int.class, VLENGTH,
668                                           this, m, null,
669                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

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

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

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

646                 this, species,
647                 (m, s) -> s.maskFactory(m.toArray()).check(s));
648         }
649 
650         @Override
651         @ForceInline
652         public IntMaxMask eq(VectorMask<Integer> mask) {
653             Objects.requireNonNull(mask);
654             IntMaxMask m = (IntMaxMask)mask;
655             return xor(m.not());
656         }
657 
658         // Unary operations
659 
660         @Override
661         @ForceInline
662         public IntMaxMask not() {
663             return xor(maskAll(true));
664         }
665 
666         @Override
667         @ForceInline
668         public IntMaxMask compress() {
669             return (IntMaxMask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
670                 IntMaxVector.class, IntMaxMask.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 IntMaxMask and(VectorMask<Integer> mask) {
680             Objects.requireNonNull(mask);
681             IntMaxMask m = (IntMaxMask)mask;
682             return VectorSupport.binaryOp(VECTOR_OP_AND, IntMaxMask.class, null, int.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 IntMaxMask or(VectorMask<Integer> mask) {
690             Objects.requireNonNull(mask);
691             IntMaxMask m = (IntMaxMask)mask;
692             return VectorSupport.binaryOp(VECTOR_OP_OR, IntMaxMask.class, null, int.class, VLENGTH,
693                                           this, m, null,
694                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

858 
859     @ForceInline
860     @Override
861     final
862     IntVector fromArray0(int[] a, int offset, VectorMask<Integer> m) {
863         return super.fromArray0Template(IntMaxMask.class, a, offset, (IntMaxMask) m);  // specialize
864     }
865 
866     @ForceInline
867     @Override
868     final
869     IntVector fromArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
870         return super.fromArray0Template(IntMaxMask.class, a, offset, indexMap, mapOffset, (IntMaxMask) m);
871     }
872 
873 
874 
875     @ForceInline
876     @Override
877     final
878     IntVector fromMemorySegment0(MemorySegment ms, long offset) {
879         return super.fromMemorySegment0Template(ms, offset);  // specialize
880     }
881 
882     @ForceInline
883     @Override
884     final
885     IntVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
886         return super.fromMemorySegment0Template(IntMaxMask.class, ms, offset, (IntMaxMask) m);  // specialize














887     }
888 
889     @ForceInline
890     @Override
891     final
892     void intoArray0(int[] a, int offset) {
893         super.intoArray0Template(a, offset);  // specialize
894     }
895 
896     @ForceInline
897     @Override
898     final
899     void intoArray0(int[] a, int offset, VectorMask<Integer> m) {
900         super.intoArray0Template(IntMaxMask.class, a, offset, (IntMaxMask) m);
901     }
902 
903     @ForceInline
904     @Override
905     final
906     void intoArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
907         super.intoArray0Template(IntMaxMask.class, a, offset, indexMap, mapOffset, (IntMaxMask) m);
908     }
909 
910 
911     @ForceInline
912     @Override
913     final
914     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
915         super.intoMemorySegment0Template(IntMaxMask.class, ms, offset, (IntMaxMask) m);














916     }
917 
918 
919     // End of specialized low-level memory operations.
920 
921     // ================================================
922 
923 }
< prev index next >