< prev index next >

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

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
















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

660                 this, species,
661                 (m, s) -> s.maskFactory(m.toArray()).check(s));
662         }
663 
664         @Override
665         @ForceInline
666         public Short256Mask eq(VectorMask<Short> mask) {
667             Objects.requireNonNull(mask);
668             Short256Mask m = (Short256Mask)mask;
669             return xor(m.not());
670         }
671 
672         // Unary operations
673 
674         @Override
675         @ForceInline
676         public Short256Mask not() {
677             return xor(maskAll(true));
678         }
679 









680         // Binary operations
681 
682         @Override
683         @ForceInline
684         public Short256Mask and(VectorMask<Short> mask) {
685             Objects.requireNonNull(mask);
686             Short256Mask m = (Short256Mask)mask;
687             return VectorSupport.binaryOp(VECTOR_OP_AND, Short256Mask.class, null, short.class, VLENGTH,
688                                           this, m, null,
689                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
690         }
691 
692         @Override
693         @ForceInline
694         public Short256Mask or(VectorMask<Short> mask) {
695             Objects.requireNonNull(mask);
696             Short256Mask m = (Short256Mask)mask;
697             return VectorSupport.binaryOp(VECTOR_OP_OR, Short256Mask.class, null, short.class, VLENGTH,
698                                           this, m, null,
699                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

859 
860 
861     @ForceInline
862     @Override
863     final
864     ShortVector fromCharArray0(char[] a, int offset) {
865         return super.fromCharArray0Template(a, offset);  // specialize
866     }
867 
868     @ForceInline
869     @Override
870     final
871     ShortVector fromCharArray0(char[] a, int offset, VectorMask<Short> m) {
872         return super.fromCharArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);  // specialize
873     }
874 
875 
876     @ForceInline
877     @Override
878     final
879     ShortVector fromByteArray0(byte[] a, int offset) {
880         return super.fromByteArray0Template(a, offset);  // specialize
881     }
882 
883     @ForceInline
884     @Override
885     final
886     ShortVector fromByteArray0(byte[] a, int offset, VectorMask<Short> m) {
887         return super.fromByteArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);  // specialize
888     }
889 
890     @ForceInline
891     @Override
892     final
893     ShortVector fromByteBuffer0(ByteBuffer bb, int offset) {
894         return super.fromByteBuffer0Template(bb, offset);  // specialize
895     }
896 
897     @ForceInline
898     @Override
899     final
900     ShortVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
901         return super.fromByteBuffer0Template(Short256Mask.class, bb, offset, (Short256Mask) m);  // specialize
902     }
903 
904     @ForceInline
905     @Override
906     final
907     void intoArray0(short[] a, int offset) {
908         super.intoArray0Template(a, offset);  // specialize
909     }
910 
911     @ForceInline
912     @Override
913     final
914     void intoArray0(short[] a, int offset, VectorMask<Short> m) {
915         super.intoArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);
916     }
917 
918 
919 
920     @ForceInline
921     @Override
922     final
923     void intoByteArray0(byte[] a, int offset) {
924         super.intoByteArray0Template(a, offset);  // specialize
925     }
926 
927     @ForceInline
928     @Override
929     final
930     void intoByteArray0(byte[] a, int offset, VectorMask<Short> m) {
931         super.intoByteArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);  // specialize
932     }
933 
934     @ForceInline
935     @Override
936     final
937     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Short> m) {
938         super.intoByteBuffer0Template(Short256Mask.class, bb, offset, (Short256Mask) m);
939     }
940 
941     @ForceInline
942     @Override
943     final
944     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
945         super.intoCharArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);
946     }
947 
948     // End of specialized low-level memory operations.
949 
950     // ================================================
951 
952 }

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

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

676                 this, species,
677                 (m, s) -> s.maskFactory(m.toArray()).check(s));
678         }
679 
680         @Override
681         @ForceInline
682         public Short256Mask eq(VectorMask<Short> mask) {
683             Objects.requireNonNull(mask);
684             Short256Mask m = (Short256Mask)mask;
685             return xor(m.not());
686         }
687 
688         // Unary operations
689 
690         @Override
691         @ForceInline
692         public Short256Mask not() {
693             return xor(maskAll(true));
694         }
695 
696         @Override
697         @ForceInline
698         public Short256Mask compress() {
699             return (Short256Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
700                 Short256Vector.class, Short256Mask.class, ETYPE, VLENGTH, null, this,
701                 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
702         }
703 
704 
705         // Binary operations
706 
707         @Override
708         @ForceInline
709         public Short256Mask and(VectorMask<Short> mask) {
710             Objects.requireNonNull(mask);
711             Short256Mask m = (Short256Mask)mask;
712             return VectorSupport.binaryOp(VECTOR_OP_AND, Short256Mask.class, null, short.class, VLENGTH,
713                                           this, m, null,
714                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
715         }
716 
717         @Override
718         @ForceInline
719         public Short256Mask or(VectorMask<Short> mask) {
720             Objects.requireNonNull(mask);
721             Short256Mask m = (Short256Mask)mask;
722             return VectorSupport.binaryOp(VECTOR_OP_OR, Short256Mask.class, null, short.class, VLENGTH,
723                                           this, m, null,
724                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

884 
885 
886     @ForceInline
887     @Override
888     final
889     ShortVector fromCharArray0(char[] a, int offset) {
890         return super.fromCharArray0Template(a, offset);  // specialize
891     }
892 
893     @ForceInline
894     @Override
895     final
896     ShortVector fromCharArray0(char[] a, int offset, VectorMask<Short> m) {
897         return super.fromCharArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);  // specialize
898     }
899 
900 
901     @ForceInline
902     @Override
903     final
904     ShortVector fromMemorySegment0(MemorySegment ms, long offset) {
905         return super.fromMemorySegment0Template(ms, offset);  // specialize
906     }
907 
908     @ForceInline
909     @Override
910     final
911     ShortVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
912         return super.fromMemorySegment0Template(Short256Mask.class, ms, offset, (Short256Mask) m);  // specialize














913     }
914 
915     @ForceInline
916     @Override
917     final
918     void intoArray0(short[] a, int offset) {
919         super.intoArray0Template(a, offset);  // specialize
920     }
921 
922     @ForceInline
923     @Override
924     final
925     void intoArray0(short[] a, int offset, VectorMask<Short> m) {
926         super.intoArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);
927     }
928 
929 
930 
931     @ForceInline
932     @Override
933     final
934     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Short> m) {
935         super.intoMemorySegment0Template(Short256Mask.class, ms, offset, (Short256Mask) m);














936     }
937 
938     @ForceInline
939     @Override
940     final
941     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
942         super.intoCharArray0Template(Short256Mask.class, a, offset, (Short256Mask) m);
943     }
944 
945     // End of specialized low-level memory operations.
946 
947     // ================================================
948 
949 }
< prev index next >