< prev index next >

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

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
















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

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









680         // Binary operations
681 
682         @Override
683         @ForceInline
684         public Byte128Mask and(VectorMask<Byte> mask) {
685             Objects.requireNonNull(mask);
686             Byte128Mask m = (Byte128Mask)mask;
687             return VectorSupport.binaryOp(VECTOR_OP_AND, Byte128Mask.class, null, byte.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 Byte128Mask or(VectorMask<Byte> mask) {
695             Objects.requireNonNull(mask);
696             Byte128Mask m = (Byte128Mask)mask;
697             return VectorSupport.binaryOp(VECTOR_OP_OR, Byte128Mask.class, null, byte.class, VLENGTH,
698                                           this, m, null,
699                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

859 
860 
861 
862     @ForceInline
863     @Override
864     final
865     ByteVector fromBooleanArray0(boolean[] a, int offset) {
866         return super.fromBooleanArray0Template(a, offset);  // specialize
867     }
868 
869     @ForceInline
870     @Override
871     final
872     ByteVector fromBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
873         return super.fromBooleanArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);  // specialize
874     }
875 
876     @ForceInline
877     @Override
878     final
879     ByteVector fromByteArray0(byte[] a, int offset) {
880         return super.fromByteArray0Template(a, offset);  // specialize
881     }
882 
883     @ForceInline
884     @Override
885     final
886     ByteVector fromByteArray0(byte[] a, int offset, VectorMask<Byte> m) {
887         return super.fromByteArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);  // specialize
888     }
889 
890     @ForceInline
891     @Override
892     final
893     ByteVector fromByteBuffer0(ByteBuffer bb, int offset) {
894         return super.fromByteBuffer0Template(bb, offset);  // specialize
895     }
896 
897     @ForceInline
898     @Override
899     final
900     ByteVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Byte> m) {
901         return super.fromByteBuffer0Template(Byte128Mask.class, bb, offset, (Byte128Mask) m);  // specialize
902     }
903 
904     @ForceInline
905     @Override
906     final
907     void intoArray0(byte[] a, int offset) {
908         super.intoArray0Template(a, offset);  // specialize
909     }
910 
911     @ForceInline
912     @Override
913     final
914     void intoArray0(byte[] a, int offset, VectorMask<Byte> m) {
915         super.intoArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);
916     }
917 
918 
919     @ForceInline
920     @Override
921     final
922     void intoBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
923         super.intoBooleanArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);
924     }
925 
926     @ForceInline
927     @Override
928     final
929     void intoByteArray0(byte[] a, int offset) {
930         super.intoByteArray0Template(a, offset);  // specialize
931     }
932 
933     @ForceInline
934     @Override
935     final
936     void intoByteArray0(byte[] a, int offset, VectorMask<Byte> m) {
937         super.intoByteArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);  // specialize
938     }
939 
940     @ForceInline
941     @Override
942     final
943     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Byte> m) {
944         super.intoByteBuffer0Template(Byte128Mask.class, bb, offset, (Byte128Mask) m);
945     }
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 Byte128Vector extends ByteVector {
 43     static final ByteSpecies VSPECIES =
 44         (ByteSpecies) ByteVector.SPECIES_128;
 45 
 46     static final VectorShape VSHAPE =
 47         VSPECIES.vectorShape();
 48 
 49     static final Class<Byte128Vector> VCLASS = Byte128Vector.class;
 50 
 51     static final int VSIZE = VSPECIES.vectorBitSize();

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

676                 this, species,
677                 (m, s) -> s.maskFactory(m.toArray()).check(s));
678         }
679 
680         @Override
681         @ForceInline
682         public Byte128Mask eq(VectorMask<Byte> mask) {
683             Objects.requireNonNull(mask);
684             Byte128Mask m = (Byte128Mask)mask;
685             return xor(m.not());
686         }
687 
688         // Unary operations
689 
690         @Override
691         @ForceInline
692         public Byte128Mask not() {
693             return xor(maskAll(true));
694         }
695 
696         @Override
697         @ForceInline
698         public Byte128Mask compress() {
699             return (Byte128Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
700                 Byte128Vector.class, Byte128Mask.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 Byte128Mask and(VectorMask<Byte> mask) {
710             Objects.requireNonNull(mask);
711             Byte128Mask m = (Byte128Mask)mask;
712             return VectorSupport.binaryOp(VECTOR_OP_AND, Byte128Mask.class, null, byte.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 Byte128Mask or(VectorMask<Byte> mask) {
720             Objects.requireNonNull(mask);
721             Byte128Mask m = (Byte128Mask)mask;
722             return VectorSupport.binaryOp(VECTOR_OP_OR, Byte128Mask.class, null, byte.class, VLENGTH,
723                                           this, m, null,
724                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));

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














913     }
914 
915     @ForceInline
916     @Override
917     final
918     void intoArray0(byte[] a, int offset) {
919         super.intoArray0Template(a, offset);  // specialize
920     }
921 
922     @ForceInline
923     @Override
924     final
925     void intoArray0(byte[] a, int offset, VectorMask<Byte> m) {
926         super.intoArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);
927     }
928 
929 
930     @ForceInline
931     @Override
932     final
933     void intoBooleanArray0(boolean[] a, int offset, VectorMask<Byte> m) {
934         super.intoBooleanArray0Template(Byte128Mask.class, a, offset, (Byte128Mask) m);
935     }
936 
937     @ForceInline
938     @Override
939     final
940     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Byte> m) {
941         super.intoMemorySegment0Template(Byte128Mask.class, ms, offset, (Byte128Mask) m);














942     }
943 
944 
945     // End of specialized low-level memory operations.
946 
947     // ================================================
948 
949 }
< prev index next >