< prev index next >

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

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
















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

692                 this, species,
693                 (m, s) -> s.maskFactory(m.toArray()).check(s));
694         }
695 
696         @Override
697         @ForceInline
698         public Short512Mask eq(VectorMask<Short> mask) {
699             Objects.requireNonNull(mask);
700             Short512Mask m = (Short512Mask)mask;
701             return xor(m.not());
702         }
703 
704         // Unary operations
705 
706         @Override
707         @ForceInline
708         public Short512Mask not() {
709             return xor(maskAll(true));
710         }
711 









712         // Binary operations
713 
714         @Override
715         @ForceInline
716         public Short512Mask and(VectorMask<Short> mask) {
717             Objects.requireNonNull(mask);
718             Short512Mask m = (Short512Mask)mask;
719             return VectorSupport.binaryOp(VECTOR_OP_AND, Short512Mask.class, null, short.class, VLENGTH,
720                                           this, m, null,
721                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
722         }
723 
724         @Override
725         @ForceInline
726         public Short512Mask or(VectorMask<Short> mask) {
727             Objects.requireNonNull(mask);
728             Short512Mask m = (Short512Mask)mask;
729             return VectorSupport.binaryOp(VECTOR_OP_OR, Short512Mask.class, null, short.class, VLENGTH,
730                                           this, m, null,
731                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

891 
892 
893     @ForceInline
894     @Override
895     final
896     ShortVector fromCharArray0(char[] a, int offset) {
897         return super.fromCharArray0Template(a, offset);  // specialize
898     }
899 
900     @ForceInline
901     @Override
902     final
903     ShortVector fromCharArray0(char[] a, int offset, VectorMask<Short> m) {
904         return super.fromCharArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);  // specialize
905     }
906 
907 
908     @ForceInline
909     @Override
910     final
911     ShortVector fromByteArray0(byte[] a, int offset) {
912         return super.fromByteArray0Template(a, offset);  // specialize
913     }
914 
915     @ForceInline
916     @Override
917     final
918     ShortVector fromByteArray0(byte[] a, int offset, VectorMask<Short> m) {
919         return super.fromByteArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);  // specialize
920     }
921 
922     @ForceInline
923     @Override
924     final
925     ShortVector fromByteBuffer0(ByteBuffer bb, int offset) {
926         return super.fromByteBuffer0Template(bb, offset);  // specialize
927     }
928 
929     @ForceInline
930     @Override
931     final
932     ShortVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
933         return super.fromByteBuffer0Template(Short512Mask.class, bb, offset, (Short512Mask) m);  // specialize
934     }
935 
936     @ForceInline
937     @Override
938     final
939     void intoArray0(short[] a, int offset) {
940         super.intoArray0Template(a, offset);  // specialize
941     }
942 
943     @ForceInline
944     @Override
945     final
946     void intoArray0(short[] a, int offset, VectorMask<Short> m) {
947         super.intoArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);
948     }
949 
950 
951 
952     @ForceInline
953     @Override
954     final
955     void intoByteArray0(byte[] a, int offset) {
956         super.intoByteArray0Template(a, offset);  // specialize
957     }
958 
959     @ForceInline
960     @Override
961     final
962     void intoByteArray0(byte[] a, int offset, VectorMask<Short> m) {
963         super.intoByteArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);  // specialize
964     }
965 
966     @ForceInline
967     @Override
968     final
969     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
970         super.intoByteBuffer0Template(Short512Mask.class, bb, offset, (Short512Mask) m);
971     }
972 
973     @ForceInline
974     @Override
975     final
976     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
977         super.intoCharArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);
978     }
979 
980     // End of specialized low-level memory operations.
981 
982     // ================================================
983 
984 }

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

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

708                 this, species,
709                 (m, s) -> s.maskFactory(m.toArray()).check(s));
710         }
711 
712         @Override
713         @ForceInline
714         public Short512Mask eq(VectorMask<Short> mask) {
715             Objects.requireNonNull(mask);
716             Short512Mask m = (Short512Mask)mask;
717             return xor(m.not());
718         }
719 
720         // Unary operations
721 
722         @Override
723         @ForceInline
724         public Short512Mask not() {
725             return xor(maskAll(true));
726         }
727 
728         @Override
729         @ForceInline
730         public Short512Mask compress() {
731             return (Short512Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
732                 Short512Vector.class, Short512Mask.class, ETYPE, VLENGTH, null, this,
733                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
734         }
735 
736 
737         // Binary operations
738 
739         @Override
740         @ForceInline
741         public Short512Mask and(VectorMask<Short> mask) {
742             Objects.requireNonNull(mask);
743             Short512Mask m = (Short512Mask)mask;
744             return VectorSupport.binaryOp(VECTOR_OP_AND, Short512Mask.class, null, short.class, VLENGTH,
745                                           this, m, null,
746                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
747         }
748 
749         @Override
750         @ForceInline
751         public Short512Mask or(VectorMask<Short> mask) {
752             Objects.requireNonNull(mask);
753             Short512Mask m = (Short512Mask)mask;
754             return VectorSupport.binaryOp(VECTOR_OP_OR, Short512Mask.class, null, short.class, VLENGTH,
755                                           this, m, null,
756                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

916 
917 
918     @ForceInline
919     @Override
920     final
921     ShortVector fromCharArray0(char[] a, int offset) {
922         return super.fromCharArray0Template(a, offset);  // specialize
923     }
924 
925     @ForceInline
926     @Override
927     final
928     ShortVector fromCharArray0(char[] a, int offset, VectorMask<Short> m) {
929         return super.fromCharArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);  // specialize
930     }
931 
932 
933     @ForceInline
934     @Override
935     final
936     ShortVector fromMemorySegment0(MemorySegment ms, long offset) {
937         return super.fromMemorySegment0Template(ms, offset);  // specialize
938     }
939 
940     @ForceInline
941     @Override
942     final
943     ShortVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
944         return super.fromMemorySegment0Template(Short512Mask.class, ms, offset, (Short512Mask) m);  // specialize














945     }
946 
947     @ForceInline
948     @Override
949     final
950     void intoArray0(short[] a, int offset) {
951         super.intoArray0Template(a, offset);  // specialize
952     }
953 
954     @ForceInline
955     @Override
956     final
957     void intoArray0(short[] a, int offset, VectorMask<Short> m) {
958         super.intoArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);
959     }
960 
961 
962 
963     @ForceInline
964     @Override
965     final
966     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
967         super.intoMemorySegment0Template(Short512Mask.class, ms, offset, (Short512Mask) m);














968     }
969 
970     @ForceInline
971     @Override
972     final
973     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
974         super.intoCharArray0Template(Short512Mask.class, a, offset, (Short512Mask) m);
975     }
976 
977     // End of specialized low-level memory operations.
978 
979     // ================================================
980 
981 }
< prev index next >