< prev index next >

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

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
















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

636                 this, species,
637                 (m, s) -> s.maskFactory(m.toArray()).check(s));
638         }
639 
640         @Override
641         @ForceInline
642         public Short64Mask eq(VectorMask<Short> mask) {
643             Objects.requireNonNull(mask);
644             Short64Mask m = (Short64Mask)mask;
645             return xor(m.not());
646         }
647 
648         // Unary operations
649 
650         @Override
651         @ForceInline
652         public Short64Mask not() {
653             return xor(maskAll(true));
654         }
655 









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

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

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

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

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

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














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














912     }
913 
914     @ForceInline
915     @Override
916     final
917     void intoCharArray0(char[] a, int offset, VectorMask<Short> m) {
918         super.intoCharArray0Template(Short64Mask.class, a, offset, (Short64Mask) m);
919     }
920 
921     // End of specialized low-level memory operations.
922 
923     // ================================================
924 
925 }
< prev index next >