< prev index next >

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

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
















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

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









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

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

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

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

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

877 
878     @ForceInline
879     @Override
880     final
881     IntVector fromArray0(int[] a, int offset, VectorMask<Integer> m) {
882         return super.fromArray0Template(Int512Mask.class, a, offset, (Int512Mask) m);  // specialize
883     }
884 
885     @ForceInline
886     @Override
887     final
888     IntVector fromArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
889         return super.fromArray0Template(Int512Mask.class, a, offset, indexMap, mapOffset, (Int512Mask) m);
890     }
891 
892 
893 
894     @ForceInline
895     @Override
896     final
897     IntVector fromMemorySegment0(MemorySegment ms, long offset) {
898         return super.fromMemorySegment0Template(ms, offset);  // specialize
899     }
900 
901     @ForceInline
902     @Override
903     final
904     IntVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
905         return super.fromMemorySegment0Template(Int512Mask.class, ms, offset, (Int512Mask) m);  // specialize














906     }
907 
908     @ForceInline
909     @Override
910     final
911     void intoArray0(int[] a, int offset) {
912         super.intoArray0Template(a, offset);  // specialize
913     }
914 
915     @ForceInline
916     @Override
917     final
918     void intoArray0(int[] a, int offset, VectorMask<Integer> m) {
919         super.intoArray0Template(Int512Mask.class, a, offset, (Int512Mask) m);
920     }
921 
922     @ForceInline
923     @Override
924     final
925     void intoArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
926         super.intoArray0Template(Int512Mask.class, a, offset, indexMap, mapOffset, (Int512Mask) m);
927     }
928 
929 
930     @ForceInline
931     @Override
932     final
933     void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
934         super.intoMemorySegment0Template(Int512Mask.class, ms, offset, (Int512Mask) m);














935     }
936 
937 
938     // End of specialized low-level memory operations.
939 
940     // ================================================
941 
942 }
< prev index next >