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 Int256Vector extends IntVector {
43 static final IntSpecies VSPECIES =
44 (IntSpecies) IntVector.SPECIES_256;
45
46 static final VectorShape VSHAPE =
47 VSPECIES.vectorShape();
48
49 static final Class<Int256Vector> VCLASS = Int256Vector.class;
50
51 static final int VSIZE = VSPECIES.vectorBitSize();
457 @ForceInline
458 public Int256Vector rearrange(VectorShuffle<Integer> shuffle,
459 VectorMask<Integer> m) {
460 return (Int256Vector)
461 super.rearrangeTemplate(Int256Shuffle.class,
462 Int256Mask.class,
463 (Int256Shuffle) shuffle,
464 (Int256Mask) m); // specialize
465 }
466
467 @Override
468 @ForceInline
469 public Int256Vector rearrange(VectorShuffle<Integer> s,
470 Vector<Integer> v) {
471 return (Int256Vector)
472 super.rearrangeTemplate(Int256Shuffle.class,
473 (Int256Shuffle) s,
474 (Int256Vector) v); // specialize
475 }
476
477 @Override
478 @ForceInline
479 public Int256Vector selectFrom(Vector<Integer> v) {
480 return (Int256Vector)
481 super.selectFromTemplate((Int256Vector) v); // specialize
482 }
483
484 @Override
485 @ForceInline
486 public Int256Vector selectFrom(Vector<Integer> v,
487 VectorMask<Integer> m) {
488 return (Int256Vector)
489 super.selectFromTemplate((Int256Vector) v,
490 (Int256Mask) m); // specialize
491 }
492
493
494 @ForceInline
495 @Override
496 public int lane(int i) {
644 this, species,
645 (m, s) -> s.maskFactory(m.toArray()).check(s));
646 }
647
648 @Override
649 @ForceInline
650 public Int256Mask eq(VectorMask<Integer> mask) {
651 Objects.requireNonNull(mask);
652 Int256Mask m = (Int256Mask)mask;
653 return xor(m.not());
654 }
655
656 // Unary operations
657
658 @Override
659 @ForceInline
660 public Int256Mask not() {
661 return xor(maskAll(true));
662 }
663
664 // Binary operations
665
666 @Override
667 @ForceInline
668 public Int256Mask and(VectorMask<Integer> mask) {
669 Objects.requireNonNull(mask);
670 Int256Mask m = (Int256Mask)mask;
671 return VectorSupport.binaryOp(VECTOR_OP_AND, Int256Mask.class, null, int.class, VLENGTH,
672 this, m, null,
673 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
674 }
675
676 @Override
677 @ForceInline
678 public Int256Mask or(VectorMask<Integer> mask) {
679 Objects.requireNonNull(mask);
680 Int256Mask m = (Int256Mask)mask;
681 return VectorSupport.binaryOp(VECTOR_OP_OR, Int256Mask.class, null, int.class, VLENGTH,
682 this, m, null,
683 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
836
837 @ForceInline
838 @Override
839 final
840 IntVector fromArray0(int[] a, int offset, VectorMask<Integer> m) {
841 return super.fromArray0Template(Int256Mask.class, a, offset, (Int256Mask) m); // specialize
842 }
843
844 @ForceInline
845 @Override
846 final
847 IntVector fromArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
848 return super.fromArray0Template(Int256Mask.class, a, offset, indexMap, mapOffset, (Int256Mask) m);
849 }
850
851
852
853 @ForceInline
854 @Override
855 final
856 IntVector fromByteArray0(byte[] a, int offset) {
857 return super.fromByteArray0Template(a, offset); // specialize
858 }
859
860 @ForceInline
861 @Override
862 final
863 IntVector fromByteArray0(byte[] a, int offset, VectorMask<Integer> m) {
864 return super.fromByteArray0Template(Int256Mask.class, a, offset, (Int256Mask) m); // specialize
865 }
866
867 @ForceInline
868 @Override
869 final
870 IntVector fromByteBuffer0(ByteBuffer bb, int offset) {
871 return super.fromByteBuffer0Template(bb, offset); // specialize
872 }
873
874 @ForceInline
875 @Override
876 final
877 IntVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Integer> m) {
878 return super.fromByteBuffer0Template(Int256Mask.class, bb, offset, (Int256Mask) m); // specialize
879 }
880
881 @ForceInline
882 @Override
883 final
884 void intoArray0(int[] a, int offset) {
885 super.intoArray0Template(a, offset); // specialize
886 }
887
888 @ForceInline
889 @Override
890 final
891 void intoArray0(int[] a, int offset, VectorMask<Integer> m) {
892 super.intoArray0Template(Int256Mask.class, a, offset, (Int256Mask) m);
893 }
894
895 @ForceInline
896 @Override
897 final
898 void intoArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
899 super.intoArray0Template(Int256Mask.class, a, offset, indexMap, mapOffset, (Int256Mask) m);
900 }
901
902
903 @ForceInline
904 @Override
905 final
906 void intoByteArray0(byte[] a, int offset) {
907 super.intoByteArray0Template(a, offset); // specialize
908 }
909
910 @ForceInline
911 @Override
912 final
913 void intoByteArray0(byte[] a, int offset, VectorMask<Integer> m) {
914 super.intoByteArray0Template(Int256Mask.class, a, offset, (Int256Mask) m); // specialize
915 }
916
917 @ForceInline
918 @Override
919 final
920 void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Integer> m) {
921 super.intoByteBuffer0Template(Int256Mask.class, bb, offset, (Int256Mask) m);
922 }
923
924
925 // End of specialized low-level memory operations.
926
927 // ================================================
928
929 }
|
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 Int256Vector extends IntVector {
43 static final IntSpecies VSPECIES =
44 (IntSpecies) IntVector.SPECIES_256;
45
46 static final VectorShape VSHAPE =
47 VSPECIES.vectorShape();
48
49 static final Class<Int256Vector> VCLASS = Int256Vector.class;
50
51 static final int VSIZE = VSPECIES.vectorBitSize();
457 @ForceInline
458 public Int256Vector rearrange(VectorShuffle<Integer> shuffle,
459 VectorMask<Integer> m) {
460 return (Int256Vector)
461 super.rearrangeTemplate(Int256Shuffle.class,
462 Int256Mask.class,
463 (Int256Shuffle) shuffle,
464 (Int256Mask) m); // specialize
465 }
466
467 @Override
468 @ForceInline
469 public Int256Vector rearrange(VectorShuffle<Integer> s,
470 Vector<Integer> v) {
471 return (Int256Vector)
472 super.rearrangeTemplate(Int256Shuffle.class,
473 (Int256Shuffle) s,
474 (Int256Vector) v); // specialize
475 }
476
477 @Override
478 @ForceInline
479 public Int256Vector compress(VectorMask<Integer> m) {
480 return (Int256Vector)
481 super.compressTemplate(Int256Mask.class,
482 (Int256Mask) m); // specialize
483 }
484
485 @Override
486 @ForceInline
487 public Int256Vector expand(VectorMask<Integer> m) {
488 return (Int256Vector)
489 super.expandTemplate(Int256Mask.class,
490 (Int256Mask) m); // specialize
491 }
492
493 @Override
494 @ForceInline
495 public Int256Vector selectFrom(Vector<Integer> v) {
496 return (Int256Vector)
497 super.selectFromTemplate((Int256Vector) v); // specialize
498 }
499
500 @Override
501 @ForceInline
502 public Int256Vector selectFrom(Vector<Integer> v,
503 VectorMask<Integer> m) {
504 return (Int256Vector)
505 super.selectFromTemplate((Int256Vector) v,
506 (Int256Mask) m); // specialize
507 }
508
509
510 @ForceInline
511 @Override
512 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 Int256Mask eq(VectorMask<Integer> mask) {
667 Objects.requireNonNull(mask);
668 Int256Mask m = (Int256Mask)mask;
669 return xor(m.not());
670 }
671
672 // Unary operations
673
674 @Override
675 @ForceInline
676 public Int256Mask not() {
677 return xor(maskAll(true));
678 }
679
680 @Override
681 @ForceInline
682 public Int256Mask compress() {
683 return (Int256Mask)VectorSupport.comExpOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
684 Int256Vector.class, Int256Mask.class, ETYPE, VLENGTH, null, this,
685 (v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT, m1.trueCount()));
686 }
687
688
689 // Binary operations
690
691 @Override
692 @ForceInline
693 public Int256Mask and(VectorMask<Integer> mask) {
694 Objects.requireNonNull(mask);
695 Int256Mask m = (Int256Mask)mask;
696 return VectorSupport.binaryOp(VECTOR_OP_AND, Int256Mask.class, null, int.class, VLENGTH,
697 this, m, null,
698 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
699 }
700
701 @Override
702 @ForceInline
703 public Int256Mask or(VectorMask<Integer> mask) {
704 Objects.requireNonNull(mask);
705 Int256Mask m = (Int256Mask)mask;
706 return VectorSupport.binaryOp(VECTOR_OP_OR, Int256Mask.class, null, int.class, VLENGTH,
707 this, m, null,
708 (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
861
862 @ForceInline
863 @Override
864 final
865 IntVector fromArray0(int[] a, int offset, VectorMask<Integer> m) {
866 return super.fromArray0Template(Int256Mask.class, a, offset, (Int256Mask) m); // specialize
867 }
868
869 @ForceInline
870 @Override
871 final
872 IntVector fromArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
873 return super.fromArray0Template(Int256Mask.class, a, offset, indexMap, mapOffset, (Int256Mask) m);
874 }
875
876
877
878 @ForceInline
879 @Override
880 final
881 IntVector fromMemorySegment0(MemorySegment ms, long offset) {
882 return super.fromMemorySegment0Template(ms, offset); // specialize
883 }
884
885 @ForceInline
886 @Override
887 final
888 IntVector fromMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
889 return super.fromMemorySegment0Template(Int256Mask.class, ms, offset, (Int256Mask) m); // specialize
890 }
891
892 @ForceInline
893 @Override
894 final
895 void intoArray0(int[] a, int offset) {
896 super.intoArray0Template(a, offset); // specialize
897 }
898
899 @ForceInline
900 @Override
901 final
902 void intoArray0(int[] a, int offset, VectorMask<Integer> m) {
903 super.intoArray0Template(Int256Mask.class, a, offset, (Int256Mask) m);
904 }
905
906 @ForceInline
907 @Override
908 final
909 void intoArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
910 super.intoArray0Template(Int256Mask.class, a, offset, indexMap, mapOffset, (Int256Mask) m);
911 }
912
913
914 @ForceInline
915 @Override
916 final
917 void intoMemorySegment0(MemorySegment ms, long offset, VectorMask<Integer> m) {
918 super.intoMemorySegment0Template(Int256Mask.class, ms, offset, (Int256Mask) m);
919 }
920
921
922 // End of specialized low-level memory operations.
923
924 // ================================================
925
926 }
|